There is QtBrowserPlugin which contains QWebView that load a page that contains other plugin.
(opera
(some_page
(my_qtbrowser_plugin
(QWebView
(some_other_page
(some_other_plugin))))))
Why after loading a page which loads or attempts to load some other plugin it stops dispatching events to the QtBrowserPlugin (crashes on any JS call from the outside: http://sprunge.us/HeZA)
In the stacktrace I see:
#3 <signal handler called>
#4 0xb63ae1f2 in WebCore::IdentifierRep::string() const () from /usr/local/Trolltech/Qt-4.7.0/lib/libQtWebKit.so.4
#5 0xb63b339c in _NPN_UTF8FromIdentifier () from /usr/local/Trolltech/Qt-4.7.0/lib/libQtWebKit.so.4
#6 0xb76e3d51 in NPN_UTF8FromIdentifier (identifier=0x7ffffffe) at .../src/qtbrowserplugin.cpp:200
#7 0xb76e4aaf in NPClass_HasMethod (npobj=0x80e5c80, name=0x7ffffffe) at .../src/qtbrowserplugin.cpp:364
Why the code in qtbrowserplugin calls things in QtWebKit? Are there any other ideas how to debug/fix it?
Update I've also just found that it calls qtbrowserplugin.cpp:NP_Initialize twice ( http://sprunge.us/BdfQ ):
*** GDB BACKTRACE ***
#2 0xb78ad817 in NP_Initialize (nFuncs=0x807599c, pFuncs=0x8074740) at /mnt/sda8/src/p/qtbrowserplugin-2.4_1-opensource/src/qtbrowserplugin.cpp:1273
#3 0x080556ea in Handle::Open(char const*, _NPNetscapeFuncs*) ()
#4 0x08056692 in pluginController::open(char const*) ()
#5 0x08055ca8 in main ()
*** END OF BACKTRACE ***
** (operapluginwrapper:1281): DEBUG: NP_Initialize
** (operapluginwrapper:1281): DEBUG: NP_Initialize succeeded
*** GDB BACKTRACE ***
#2 0xb78ad817 in NP_Initialize (nFuncs=0xb4357094, pFuncs=0xb4357058) at /mnt/sda8/src/p/qtbrowserplugin-2.4_1-opensource/src/qtbrowserplugin.cpp:
#3 0xb6af7dae in WebCore::PluginPackage::load() () from /usr/local/Trolltech/Qt-4.7.0/lib/libQtWebKit.so.4
#4 0xb6af774d in WebCore::PluginPackage::fetchInfo() () from /usr/local/Trolltech/Qt-4.7.0/lib/libQtWebKit.so.4
#5 0xb69578ae in WebCore::PluginPackage::createPackage(WebCore::String const&, long const&) () from /usr/local/Trolltech/Qt-4.7.0/lib/libQtWebKit.so.4
...
Update 2 Is my fix correct? http://vi-server.org/vi/bin/qtbrowserplugin-2.4_1-opensource-netsing-fix.patch :
diff --git a/qtbrowserplugin-2.4_1-opensource.orig/src/qtbrowserplugin.cpp b/qtbrowserplugin-2.4_1-opensource/src/qtbrowserplugin.cpp
index e7c6f31..632d546 100644
--- a/qtbrowserplugin-2.4_1-opensource.orig/src/qtbrowserplugin.cpp
+++ b/qtbrowserplugin-2.4_1-opensource/src/qtbrowserplugin.cpp
@@ -1271,6 +1271,10 @@ extern "C" NPError WINAPI NP_Initialize(NPNetscapeFuncs* nFuncs, NPPluginFuncs*
{
if(!nFuncs)
return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ if(qNetscapeFuncs) {
+ return NPERR_INVALID_PLUGIN_ERROR;
+ }
qNetscapeFuncs = nFuncs;
int navMajorVers = qNetscapeFuncs->version >> 8;