(2016-06-24, 18:59)Roland Melkert Wrote:(2016-06-24, 18:35)Trevor Sandy Wrote: Well you are experiencing the exact same behavior I am. And like you I find it very strange. More so that I'm not able to find the reason for the problem but I believe I know the source.
I don't think it is the end of your crashes, but let's see. In the mean time, I'm continuing to look for the problem source. Hopefully I can have it resolved this weekend.
Cheers,
This might be caused by an uninitialized variable as debug version/runs usually zero out those while a releases optimized that out. A crash is then left to chance as it depends on the value the variable happens to get on program start.
Don't know how this works combined with a single (non debug) exe though but the debugger might have wiped the used memory or something.
Hi Roland - Actually to give some context on this issue. I saw it the first time after porting to Qt 5.6. This version of Qt introduced a lot of changes to the way graphics drivers are managed on Windows. Some of these changes I don't think are very backward compatible (at least, not without a great deal of rework).
Anyway, this issue first presented with I set the application to force the use of OpenGL (myApp.setAttribute(Qt::AA_UseDesktopOpenGL)) versus using ANGLE which is the Windows-friendly default. However, using ANGLE is not an option as my imbedded LeoCAD module performs direct OpenGL calls. Nevertheless, ANGLE is still somehow a dependency.
I can consistently reproduce the crash if I enable the following MainWindow management code which worked without issue on Qt 4.8:
void Gui::readSettings()
{
QSettings Settings;
Settings.beginGroup(MAINWINDOW);
restoreState(Settings.value("State").toByteArray());
restoreGeometry(Settings.value("Geometry").toByteArray());
QSize size = Settings.value("size", QSize(800, 600)).toSize();
QPoint pos = Settings.value("pos", QPoint(200, 200)).toPoint();
resize(size);
move(pos);
Settings.endGroup();
}
void Gui::writeSettings()
{
QSettings Settings;
Settings.beginGroup(MAINWINDOW);
Settings.setValue("Geometry", saveGeometry());
Settings.setValue("State", saveState());
Settings.setValue("pos", pos());
Settings.setValue("size", size());
Settings.endGroup();
}
With this code, the application will launch without issue the first time. Once I move the window (let's say to another screen - Point(4121 161)) the application will crash. It is as if the pos coordinates become out of bounds or something.
The debugger points to a ScopedPointer problem relates to window management but I can't make heads or tails about where the problem is starting from. The picture below show a view of the debugger at the segmentation fault.
The interesting thing is when I disable the above code the crash is no longer consistent but becomes intermittent - as I have described it above and in the release notes.
The debugging prompt when you encounter the error is just the operating system recognizing that a crash dump file is available and prompting the user to launch whichever application on the system that is designated for debugging.
Cheers,