0

我已经为 firefox/chrome 开发了基于 npruntime 的插件,它在 ff3.6/chrome 10 上运行良好,但是当我在加载插件后在 firefox 4.0 或更高版本中加载任何其他插件时,如果我在插件之后打开 gmail,firefox 就会挂起已经加载,然后firefox停止响应,我已经验证它与插件容器有关。谁能建议我到底哪里出错了?任何指针将不胜感激。提前致谢

这是 ff6 的调用堆栈

ntdll.dll!_ZwWaitForSingleObject@12()
ntdll.dll!_ZwWaitForSingleObject@12()
kernel32.dll!_WaitForSingleObjectExImplementation@12() kernel32.dll!_WaitForSingleObject@8()
nspr4.dll!_PR_MD_WAIT_CV(_MDCVar * cv, _MDLock * lock, unsigned int timeout)
nspr4.dll!_PR_WaitCondVar(PRThread * thread, PRCondVar * cvar, PRLock * lock, unsigned int timeout)
nspr4.dll!PR_WaitCondVar(PRCondVar * cvar, unsigned int timeout)
xul.dll!mozilla::CondVar::等待(无符号整数间隔)
xul.dll!mozilla::ipc::GeckoChildProcessHost::SyncLaunch(std::vector,std::allocator >,std::allocator,std::allocator > > > aExtraOpts, int aTimeoutMs, base ::ProcessArchitecture arch) xul.dll!mozilla::plugins::PluginProcessParent::Launch(int timeoutMs)
xul.dll!mozilla::plugins::PluginModuleParent::LoadModule(const char * aFilePath)
xul.dll!GetNewPluginLibrary(nsPluginTag * aPluginTag) xul.dll!nsNPAPIPlugin::CreatePlugin(nsPluginTag * aPluginTag, nsNPAPIPlugin * * aResult)
xul. dll!CreateNPAPIPlugin(nsPluginTag * aPluginTag, nsNPAPIPlugin * * aOutNPAPIPlugin)
xul.dll!nsPluginHost::EnsurePluginLoaded(nsPluginTag * plugin)
xul.dll!nsPluginHost::GetPlugin(const char * aMimeType, nsNPAPIPlugin * * aPlugin)
xul.dll!nsPluginHost ::TrySetUpPluginInstance(const char * aMimeType, nsIURI * aURL, nsIPluginInstanceOwner * aOwner) xul.dll!nsPluginHost::SetUpPluginInstance(const char * aMimeType, nsIURI * aURL, nsIPluginInstanceOwner * aOwner)
xul.dll!nsPluginHost::InstantiateEmbeddedPlugin(const char * aMimeType, nsIURI * aURL, nsIPluginInstanceOwner * aOwner, int aAllowOpeningStreams) ...

4

2 回答 2

1

I would try turning off IPC mode first; your stack seems to indicate that it is hanging while waiting for the plugin process to start up, but I don't know why it would hang there since it should have a timeout. If turning off IPC mode helps, then the problem is likely something interfering with the IPC between the browser and the plugin host processes.

Next I'd try adding breakpoints to all of the entrypoints in the DLL. You can connect a debugger by putting sleep(10000) or something similar in DllMain; when the plugin starts loading it should hit that first before doing anythign potentially damaging and you can connect to the plugin host process with a debugger and then check to see what entrypoints you make it to, etc. Stepping through long enough should eventually yield some clues about what might be happening.

You could also try porting it to something like FireBreath, which is known to be working and removes most chances that you'd have to make an obscure mistake like this likely is that some browsers don't like.

于 2011-09-12T18:37:41.870 回答
0

我为每个浏览器开发了 npruntime。它在所有浏览器中运行良好,但 Firefox 仅在 Windows 7 中冻结。

我解决了将 firefox 配置“dom.ipc.plugins.enabled”编辑为 false 的问题。我不知道它会起作用,但它值得一试。

于 2013-06-17T09:47:14.147 回答