FireWyrmNativeMessageHost.exe shutting down with memory access violation

441 views
Skip to first unread message

Debjit Das

unread,
Jan 16, 2017, 6:59:34 AM1/16/17
to firebreath-dev
Hi

I have created a sample plugin using Firebreath 2.0. When I try to use it with a test HTML on Chrome, the FireWyrmNativeMessageHost.exe native client host crashes the browser. The following information gets logged in the windows event. I have not added/changed any code in the plugin which was generated by the prep script

Faulting application name: FireWyrmNativeMessageHost.exe, version: 0.0.0.0, time stamp: 0x587cabc8
Faulting module name: npDemoPlugin2.dll, version: 1.0.0.0, time stamp: 0x587cac7a
Exception code: 0xc0000005
Fault offset: 0x0003cc1b
Faulting process id: 0x21b0
Faulting application start time: 0x01d26fecb6aca43f
Faulting application path: D:\Test\DemoPlugin2\build\Debug\FireWyrmNativeMessageHost.exe
Faulting module path: D:\Test\DemoPlugin2\build\Debug\npDemoPlugin2.dll
Report Id: f4664e8d-dbdf-11e6-9d3f-20689d2d1c97

When I debugged the plugin I found that the exception happens in the destructor of 'any' class defined in  src\3rdParty\boost\boost\any.hpp. Is this a known issue? Are there any fixes for this?

I would appreciate an advice on this.

Thanks,
Debjit

Richard Bateman

unread,
Jan 16, 2017, 12:51:20 PM1/16/17
to FireBreath Dev Group
I seem to remember this being fixed; are you on the latest version
from the 2.0 branch?
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "firebreath-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to firebreath-de...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Debjit Das

unread,
Jan 17, 2017, 12:38:57 AM1/17/17
to firebreath-dev
I got the FB 2.0 package from Github a month back from the 2.0 branch. Not sure if the fix was merged at that time or not. I will try again with the latest version.

Thanks,
Debjit

Debjit Das

unread,
Jan 17, 2017, 3:04:12 AM1/17/17
to firebreath-dev
I have checked this issue again. I took the latest FB package from branch 2.0 and created a sample plugin using the auto generated code. The problem (FireWyrmNativeMessageHost.exe crash) still persist in the latest code. I got the exact same error reported in the event log and the exception is happening at the exactly same location in the code (src\3rdParty\boost\boost\any.hpp). This issue is either not fixed or the fix is not yet merged into the branch. Please confirm.

Thanks,
Debjit

On Monday, 16 January 2017 23:21:20 UTC+5:30, taxilian wrote:

Richard Bateman

unread,
Jan 17, 2017, 8:38:14 AM1/17/17
to FireBreath Dev Group
Which compiler are you using? What version of vs?

Richard

Debjit Das

unread,
Jan 20, 2017, 1:47:27 AM1/20/17
to firebreath-dev
I am using Visual Studio 2013 (Professional Edition)

Debjit Das

unread,
Jan 20, 2017, 1:47:56 AM1/20/17
to firebreath-dev

Debjit Das

unread,
Feb 2, 2017, 1:37:59 AM2/2/17
to firebreath-dev
HI Richard

Do you have any further input on this issue?

Debjit


On Friday, 20 January 2017 12:17:56 UTC+5:30, Debjit Das wrote:

Richard Bateman

unread,
Feb 2, 2017, 1:40:00 AM2/2/17
to FireBreath Dev Group
Yep. It's fixed in the latest 2.0 branch.

Make sure you update submodules; I had to update to the latest boost.

Richard

Debjit Das

unread,
Oct 9, 2017, 8:37:59 AM10/9/17
to firebreath-dev
Hi Richard

It seems the issue(FireWyrmNativeMessageHost.exe  crash) still persists. I took the latest version of Firebreath 2.0 and built it with with latest version of Boost library but encountered the same issue.

Please advise.

Debjit

Richard Bateman

unread,
Oct 9, 2017, 10:34:31 AM10/9/17
to FireBreath Dev Group
Have you tried attaching a debugger and catching the exception to see
what it is? I haven't seen the issue since the fix, so it's likely
you're seeing something different from what we saw.

Richard

Richard Fan

unread,
Nov 19, 2017, 9:55:16 PM11/19/17
to firebreath-dev
the same error:
>        npmyPluginDemo.dll!boost::any::~any() 行 77        C++
        [外部代码]        
        npmyPluginDemo.dll!FB::FireWyrm::WyrmBrowserHost::init() 行 40        C++
        npmyPluginDemo.dll!FB::FireWyrm::WyrmColony::New(std::vector<FB::variant,std::allocator<FB::variant> > args) 行 362        C++
        npmyPluginDemo.dll!FB::FireWyrm::WyrmColony:nCommand(const unsigned int cmdId, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > command) 行 287        C++
        npmyPluginDemo.dll!FW_onCommand(const unsigned int colonyId, const unsigned int cmdId, const char * strCommand, unsigned int strCommandLen) 行 225        C++
        FireWyrmNativeMessageHost.exe!MainLoop::processBrowserMessage(messageInfo & message) 行 324        C++
        FireWyrmNativeMessageHost.exe!MainLoop::run() 行 247        C++
        FireWyrmNativeMessageHost.exe!main(int argc, char * * argv) 行 64        C++

Debjit Das

unread,
Dec 1, 2017, 9:36:06 AM12/1/17
to firebreath-dev
OK, now I am able to successfully call plugin APIs using native messaging. However, I have noticed one thing. If the page using the plugin is refreshed then two instances of "FireWyrmNativeMessageHost" process is created. This increases with the number of refresh. Same happens if I use the plugin both from Firefox and Chrome on the same machine (i.e. I can see two instances of "FireWyrmNativeMessageHost" in the task list)

I want only one instance of "FireWyrmNativeMessageHost" loaded and shared between Firefox and Chrome and also to prevent multiple instances getting created on page refresh. Is there a way to achieve this?

Thanks & Regards,
Debjit

Richard Bateman

unread,
Dec 1, 2017, 5:07:07 PM12/1/17
to FireBreath Dev Group
There is no way to achieve that; each browser will open its own host.  In fact, each browser is likely to open multiple copies.  You could try doing your own ipc mechanism which runs a singleton process, but there is no built-in method for solving that problem.

Richard

To unsubscribe from this group and stop receiving emails from it, send an email to firebreath-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages