Segmentation fault on dummy app
-
-
@VincentB
As I see you useQApplication
which is designed for GUI apps. I don't think that this is the reason but can you try to replaceQApplication
withQCoreApplication
and repeat the test?Footnote: I can't reproduce the error with Qt 5.5 on Ubuntu (no crash).
-
@VincentB said:
With QCoreApplication, there is no problem. What could we conclude ?
Fine - we found a solution :) But I have no idea what the problem is.
QApplication
inheritsQGuiApplication
which inheritsQCoreApplication
. In my opinion the child classes just add additional GUI related functionality but should not have different behaviour (and shall not have following the Liskov substitution principle).
The documentation only says thatQCoreApplication
should be used for non-GUI applications because it has no dependencies to QWidgets. But there is no note that you have to use onlyQCoreApplication
.
Perhaps someone else here knows more about the internas of the three classes? -
@VincentB @micland
Well,
QCoreApplication
does almost nothing - it starts an event loop, whileQApplication
is fat and heavy and loads plugins and platform integrations and widgety things, so it may simply be a bug. But in any case @raven-worx's request is relevant, you should obtain a stack trace from the crash (how depends on the IDE and its setup).Kind regards.
-
@VincentB
from where do you have the console output? From your IDE?
If so there should also be a window which shows the stack trace at the time of the crash. -
Hi, ok, I'll check this
-