WebKitPluginHost 在 OS X 10.6 上默默退出我的 32 位插件

发布于 2024-08-16 08:50:44 字数 518 浏览 3 评论 0原文

我有一个作为通用 32 位捆绑包构建的自定义 OS X NPAPI 插件。它在 Firefox 的 OS x 10.6 下运行良好。它在以 32 位模式启动的 Safari 中也运行良好。

然而,在以 64 位模式启动的 Safari 中,它会默默地失败。 64 位 Safari 在单独的进程 (WebKitPluginHost) 中运行 32 位插件。插件日志显示主机启动插件,调用NP_Initialize,然后调用NP_GetEntryPoints,然后调用NPP_New,成功返回创建的实例。通常,调用的下一个插件方法是 NPP_SetWindow,但是主机永远不会调用它。相反,它会在启动后大约 10 秒内默默退出,没有任何消息或其他任何内容。我设法使用 GDB 附加到主机进程,但运气不佳,它只是指出该进程已正常完成。

我非常感谢任何提示我在插件中可能做错了什么,或者已知在 WebKitPluginHost 下工作的开源 NPAPI 插件的 URL,甚至提示调试此问题的最佳方法是什么(构建调试) WebKit 版本是最后的手段,我已经经历过,现在我需要更快地找到解决方案)

I have a custom OS X NPAPI plugin built as universal 32 bit bundle. It works fine under OS x 10.6 in Firefox. It also runs fine in Safari launched in 32 bit mode.

However, it silently fails in Safari launched in 64 bit mode. The 64 bit Safari runs 32 bit plugins in a separate process (WebKitPluginHost). Plugin log shows that the host starts the plugin, calls NP_Initialize, then NP_GetEntryPoints, then NPP_New, which successfully returns created instance. Typically, the next plugin method called would be NPP_SetWindow, however, host never calls it. Instead it silently quits in about 10 seconds after launch, with no messages or whatever. I managed to attach to the host process with GDB, but with no luck, it just notes that the process has finished normally.

I'd much appreciate any hint what I might have done wrong in the plugin, or a URL of open sourced NPAPI plugin which is known to work under WebKitPluginHost, or even a hint what would be the best way to debug this issue (building debug version of WebKit is a last resort, I've been there and now I need to find a solution a bit more quicker)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

好多鱼好多余 2024-08-23 08:50:44

看来 WebKitPluginHost 明确需要插件来设置 NPPVpluginDrawingModel。由于该插件没有窗口,我从来没有费心这样做,而且效果很好。

我花了不到六个小时才把它挖出来:(

It appeared that WebKitPluginHost explicitly requires plugin to set NPPVpluginDrawingModel. Since the plugin was windowless I never bothered to do that, and it worked out fine.

Minus six hours of my life for digging that out :(

一抹微笑 2024-08-23 08:50:44

在二进制文件中构建具有 64 位段的胖版本似乎是最明显的首先要做的事情。

Building a fat version with a 64-bit segment in the binary would seem to be the most obvious thing to do first.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文