Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Next Major Release, Next Patch Release, Some Release
-
None
-
linux;
qt 4.7 from qt git;
qtbrowserplugin-2.4_1;
firefox 3.6.3
Description
in qt 4.7.0 calling QNetworkAccessManager::get() from browser plugin leads to a crash:
Program received signal SIGSEGV, Segmentation fault.
0x00007fffdb4fbb00 in typeinfo for QtNPBindable () from /home/wiecko/.mozilla/plugins/libtestplugin.so
with backtrace
(gdb) bt #0 0x00007fffdb4fbb00 in typeinfo for QtNPBindable () from /home/wiecko/.mozilla/plugins/libtestplugin.so #1 0x00007fffd87a77f4 in QNetworkAccessManager::get (this=0x7fffd612e708, request=<value optimized out>) at /home/development/64-bit/qt-git/src/network/access/qnetworkaccessmanager.cpp:651 #2 0x00007fffdb2a88bb in TestWidget::init() () from /home/wiecko/.mozilla/plugins/libtestplugin.so #3 0x00007fffdb2a3bc1 in TestWidgetWrapper::TestWidgetWrapper(QWidget*) () from /home/wiecko/.mozilla/plugins/libtestplugin.so #4 0x00007fffdb2a5c5d in QtNPClass<TestWidgetWrapper>::createObject(QString const&) () from /home/wiecko/.mozilla/plugins/libtestplugin.so #5 0x00007fffdb2da196 in NPP_SetWindow () from /home/wiecko/.mozilla/plugins/libtestplugin.so
Details, explaining the backtrace:
- I have a class (TestWidget) which inherits QWidget
- following qt's http example, class has two members: QNetworkAccessManager my_qnam; QNetworkReply * my_net_reply;
- in it's init() function I do: my_net_reply = my_qnam.get(QNetworkRequest(QUrl("http://www.google.nl/index.html")));
- and connect my slots to signals finished() and readyRead()
I use this class in two ways:
1) either as stand-alone application (just main() which creates TestWidget object, calls init() etc.)
2) or as browser plugin (I have a new class TestWidgetWrapper which inherits TestWidget and QtNPBindable and from constructor calls TestWidget::init(); resulting libtestplugin.so is put into my mozilla plugin directory; I open in firefox a html page with one object of type defined in libtestplugin.so).
In qt 4.6.2 both stand-alone and plugin (when I load my html page) worked: QNetworkAccessManager::get() succeeds, and I get requested page contents in slot connected to readyRead() etc.
In qt 4.7 (current git clone) the stand-alone application works, but browser plugin segfaults: when I load my html page I get a segfault with backtrace as above.