Bug 104853
Summary: | Qt5 RC1 globalSettings crashes in main w/o event loop | ||
---|---|---|---|
Product: | WebKit | Reporter: | That Dude <deadbeef> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | bfulgham |
Priority: | P2 | Keywords: | Qt |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows 7 |
That Dude
Not sure about version I'm using default WebKit build version that comes bundled with Qt5.0 RC1
Qt 5.0 RC 1
QtCreator 2.6.1
Qt is 32 bit running on Windows7 64 bit
This code crashes in main()
#include <QWebSettings>
int main(int, char **)
{
QWebSettings * globalSettings = QWebSettings::globalSettings();
//qDebug() << "WebGLEnabled: " << globalSettings->testAttribute(QWebSettings::WebGLEnabled);
return 0;
}
The example above works only after I set it on QTimer::singleShot(0, someClass, SLOT(someSlot));
i.e. requires event loop
It used to be working right from main() on previous versions e.g.
Same example works on QtCreator 2.4.1 Qt 4.8.0
on Fedora 17 64 bit where Qt suite is also 64 bit
Either fix this or document it if it's a "feature"..
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
That Dude
Same error with Qt 5.0.0 RC2
The program has unexpectedly finished.
exited with code -1073741819
And C0000005 is the code for access violation.
That Dude
Qt debugger shows:
+d -> <Memory access error>
WindDbg Release:
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\TEMP\zzzz\Qt5Gui.dll -
Qt5Gui!QWindowPrivate::globalPosition+0x151:
0f73c771 8b01 mov eax,dword ptr [ecx] ds:002b:00000000=????????
WindDbg Debug:
(16a4.16c0): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for C:\PROGRAMS\Qt\500rc2\5.0.0-rc2\msvc2010\bin\Qt5Guid.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\PROGRAMS\Qt\500rc2\5.0.0-rc2\msvc2010\bin\Qt5Guid.dll -
Qt5Guid!QTransform::fromTranslate+0x5a659:
02413100 8b10 mov edx,dword ptr [eax] ds:002b:00000000=????????
That Dude
Qt 5.0 RC2
Seems to be working if QApplication is created before calling static
QWebSettings::globalSettings();
i.e. this works
#include <QApplication>
#include <QDebug>
#include <QWebSettings>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWebSettings * globalSettings = QWebSettings::globalSettings();
qDebug() << "WesbGLEnabled: " << globalSettings->testAttribute(QWebSettings::WebGLEnabled);
return 0;
}
// HTH
Brent Fulgham
The QT port is no longer part of WebKit.