Java VM crashes after closing the application (a QSettings problem?)
Eskil Abrahamsen Blomfeldt
eblomfel at trolltech.com
Tue Feb 12 12:12:26 CET 2008
Florian Hübner wrote:
> I use QSettings to store the current state of various settings in my
> application but for some reason my VM started crashing when I closed
> my program.
> After reading up on the various problems that can cause a VM crash and
> trying out the most common fixes (using the Java HotSpot Client VM
> instead of the Server one, use -Xcheck:jni as VM argument) I came to
> the conclusion that I should post the problem here because the last
> native code instruction on the stack was from "libqtjambi.so.1.0.0".
>
> I include the last few echos I received from the -verbose commands and
> an excerpt from the error log file.
Hi, Florian.
I think I may already have a fix for this, but I need to try to
reproduce the bug to be sure, so I have some questions to try to get an
overview:
1. Does this only happen when your QSettings code is active? (if you
comment out all the code that writes or reads to QSettings and run the
application otherwise unchanged, will the crash disappear?)
2. Precisely what types are you storing in QSettings? Do each of these
support the Serializable interface?
3. Does the crash by any chance disappear if you add the following code
at the end of your main() method:
if (QApplication.instance() != null) QApplication.instance().dispose();
Also, of course, any code sample which reproduces the crash would be
extremely helpful.
-- Eskil
More information about the Qt-jambi-interest
mailing list