Qt-jambi-interest Archive, March 2007
QMessageBox crash
Message 1 in thread
Calling QMessageBox.critical with a null message causes the jvm to crash.
Message 2 in thread
Hi, Vadim.
Vadim Berezniker wrote:
> Calling QMessageBox.critical with a null message causes the jvm to crash.
>
Trying this with the Qt Jambi beta, I'm getting a null pointer exception
"Exception in thread "main" java.lang.NullPointerException: String is
null pointer" as I would expect.
My very simple test application is as follows:
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QMessageBox;
public class MessageBoxCritical {
public static void main(String args[]) {
QApplication.initialize(args);
QMessageBox.critical(null, null, null);
}
}
How is your usage different from this, please? I suspect it's the
context of the call that's causing the crash and not the call itself. Is
it inside a slot or an event handler?
-- Eskil
Message 3 in thread
Eskil A. Blomfeldt wrote:
> My very simple test application is as follows:
>
> import com.trolltech.qt.gui.QApplication;
> import com.trolltech.qt.gui.QMessageBox;
> public class MessageBoxCritical {
> public static void main(String args[]) {
> QApplication.initialize(args);
> QMessageBox.critical(null, null, null);
> }
> }
>
> How is your usage different from this, please? I suspect it's the
> context of the call that's causing the crash and not the call itself. Is
> it inside a slot or an event handler?
>
> -- Eskil
I just tried your test case and I get a crash.
There's also an error before the crash: createWrapperForQObject(),
failed to resolve class com/trolltech/qt/gui/.QPushButton
I'm using the beta.
Message 4 in thread
Hi, Vadim.
Vadim Berezniker wrote:
>
> I just tried your test case and I get a crash.
> There's also an error before the crash: createWrapperForQObject(),
> failed to resolve class com/trolltech/qt/gui/.QPushButton
>
> I'm using the beta.
>
We have been able to reproduce this now. It may occur whenever null is
passed as a String argument to Jambi. It will be fixed in the next beta.
Thank you for the report! :-)
-- Eskil