Firefox crash instantiating NPAPI plugin -


I already had a complete plugin working as a very simple implementation with many global and stable variables, I have now changed it to an object based design, so I can safely instantify several instances.

However, since I have done this, when creating an example of a plugin, it becomes MyScriptableNPObject :: NewObject () method, where it tries to call the createobject but never Also does not return and the browser crashes.

  ScriptableNPObject * ScriptableNPObject :: NewObject (NPP npp) {_DebugLog ("ScriptableNPObject :: NewObject"); ScriptTableNPOBject * Newbase = (MyScacheNOPObject *) NPNFunks- & gt; ProjectObact (NPP, & amp; _npclass); _DebugLog ("ScriptableNPObject :: NewObject - end"); Return new obz; }  

I'm getting some basic logging as a quick way to debug it and I can see that this method is expected from getValue (), but never end logs On getting out, something is obviously going wrong in the createobject ().

I have defined my own allocation () method for NPObject and NP class can be defined properly, as far as I can tell, these are as follows -

  NPObject * ScriptableNPObject :: _Olotate (NPP NPP, NP class * Excel) {Return (NPObject *) New ScriptTableNPOject (NPP); } NPClass ScriptableNPObject :: _ npclass = {NP_CLASS_STRUCT_VERSION}, scriptable NPObject :: _ allocated, scriptable NPObject :: _ Deallocate, NULL, ScriptableNPObject :: _HessDystem, ScriptableNPObject :: _Invoice, ScriptableNPObject :: _AnvoicDefault, ScriptableNPObject :: _Hesproperty, ScriptableNPObject :: _GetProperty, NULL, NULL, Faucet, ScriptTableNPOBJJ :: _ Creation;};  

npnfuncs struct is also valid from the I can see. That's why I'm a little wrong!

Any help would be greatly appreciated,

thanks.

Check the NPNFanks Pointer in your DPor; I'm sure there is a problem with it.

Except that, get the Mozilla source and create a debug version so that you can take action through the code and see why it is crashing. This is the easiest way to track pointers issues like the ones you have mentioned.

Seriously, however, George said the second (although I am certainly biased): Second, check FireBreath, it will save you a lot of troubleshooting and make the port easier in IE if you Want to do anytime.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -