|IRC Nick||Time (GMT-7)||Message|
|jshanab||09:05||FYI The newest FF now ignores the prefs file I added for IPC and puts my plugin back into a plugin-container. The default plugin folder location has changed
I was reworking my plugin shutdown code to shut down faster and it does, but I now am definitlyy creating new plugin instances before the old one dies. Not sure if this is the reason or if the faster shutdown has just exposed this, but I now get weakHost expired And I cannot find the darn thing. Any suggestions welcomed!
|jshanab||10:05||Good Morning taxilian|
|jshanab||10:05||I know i have been absent of late
I am fighting a weakhost has expired issue for the last 3 days. When I get to onPluginReady refcount is 4 then 5. When I hit NPP_destroy it goes down to 2 which != 0. Grrr
|taxilian||10:05||so the issue is that the weakhost *hasn't* expired
not that it has
it means that something you have is holding onto a shared_ptr to the browser_host that needs to be a weak_ptr
|jshanab||10:05||Right the assert is the other way. I have read that explination over and over, I just cannot find any references or any remaining objects at that point in time.
So far I have traced CreateBrowserHost 0->1 then Plugin->SetHost 1-3 then NpapiNewDatHolder 3->4 then getRootJSAPI 4->5 Do these numbers look correct?
is your jsapi object holding a shared_ptr to the browserhost?
|jshanab||10:05||It was as generated, a weakPointer, but i will double check|
|taxilian||10:05||it's possible there is a bug in the system, I suppose, but I'm not seeing it
try to repro on fbtestplugin as well
gotta run. good luck
|jshanab_||20:05||Good evening taxilian.|
|jshanab_||20:05||Well after many hours I kinda know what is wrong. My plugin DTOR never gets called. the ref count is 1 to many. But I cannot find it.|
that sounds like a blast
you could probably manually release the jsapi and browserhost objects in the shutdown method
|jshanab_||20:05||I need to write a smarter smart pointer. One that has bookeeping and can tell me who holds those references.|
|jshanab_||20:05||I tried. I made it look as much like the testplugin, i never had a releaseRootJSAPI in my DTOR, I had a pointer.reset|
|taxilian||20:05||there is a call on the browserhost that will release all retained JSAPI objects|
|jshanab_||20:05||The one that is right after the releaseRootJSAPI in the example? It did not do it. Between the call of "Delete handle" and the assert The plugin dtor does not get called. Even with weak pointers I had to give up for the evening.|
|taxilian||20:05||can you repro the issue iwth the testplugin?|
|jshanab_||20:05||NO the testplugin is fine!|
have you tried a simpler html page to see if it's related to js?
|jshanab_||20:05||Obiously something I am doing wrong. I just cannot see it. I did see the lot of events caused by windows event. Each event calls getPlugin() to call the JS and that bumps the plugin refcount for a moment.
I am hoping that it will just magically show itself in the morning. Sometimes you have to walk away!
wish I could help… maybe another day I can look at it with you
gotta run now