QT4.7 : Webkit crash when accessing an Url
-
Dear all,
I have a QWebView component that crashes at initialization when it tries to access about:blank page and same thing with my simple code :
@
QUrl url(URL_UPDATE_FILE);
QNetworkRequest request(url);
this->reply = this->manager->get(request); // CRASHES HERE
@with this message :
HEAP[hadop_qt_widget.exe]: Invalid Address specified to RtlValidateHeap( 01910000, 00FE6070 )
Does anyone know what it is about ? I'm running Qt 4.7 just compiled and running a VMWare Fusion VM with Windows XP sp3.
Thank you !
[edit: fixed code / chetankjain]
-
I tried on Win XP, but without VMWare, and no issues. Are you sure this->manager is initialized properly?
Try this, use Designer to add a QWebView to a form, by default you'll see the URL set to about:blank, you can run it without issues, you point to other site, the site opens...
let me know
-
Hi,
When I debug my program I can see the manager has a valid address (not null pointer). I don't know if the manager is well initialized I just did a new on it.
I tried what you suggested and it worked in the designer... I don't know what to think about it. Because when I simply load my program, if I call the widget containing the QWebView it crashes. Though I didn't change anything in the generated ui_MyView class... When I comment the line with "about:blank" in the generated ui_MyView class it works well...
-
ok, I still suspect the manager is not initialized properly, try to add this line ...
@
// in mainwindow.h
QNetworkAccessManager *manager;
@and in mainwindow.cpp file, way before you do other network stuff,
@
manager = new QNetworkAccessManager(this);
@thats all I did ... if it still doesn't work, post your files here (if you can)
-
You should post an small example we could run. The code snippet is not enough to find the bug in your code.
I tend to think like chetankjain, the address of this or manager are invalid.