Firefox plugin crashes in Chrome

From what I gather, Google Chrome can run browser plugins written using NPAPI.

I've written one that does its job just fine in Firefox, but makes Chrome crash and burn as soon as you embed it on a page. I don't even have to call any of my methods, embedding is enough to cause a crash.

How do I debug this? I tried attaching the debugger to chrome but the stack traces I get are deep down in Chrome itself and like I said, none of "my" actual code is being run, but supposedly just the NPAPI init code.

I'd appreciate some pointers.

Answers


The Chromium dev docs describe some tricks for attaching Visual Studio to Chrome processes: Chromium Developer Documentation > Debugging Chromium.

Some problems you might be facing with an NPAPI plugin in Chrome:

  • Your plugin will be running in a separate process from the Chrome UI. (You probably know this already :)
  • If multiple instances of your plugin are loaded (in the same HTML page or in different Chrome tabs), your plugin instances will be running in the same process together. If you have global variables, your plugin instances might be stomping on each other.
  • Chrome uses DEP (Data Execution Protection), but Firefox does not. If you are using ATL or other JITted code tricks, DEP can crash your plugin.

Need Your Help

CSS menu bar to span page width

css menu width

I'd like the main menu from this page http://www2.gardencomedyclub.co.uk to use the entire width of the page. I've tried using margin: 0 auto; in varying places in the #menu css tags but it keeps b...

Java - Problems with scanner

java

I'm getting frustrated with something really basic here.. scanner just isn't doing what I want and I don't know why, I'd be really grateful if someone could help me

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.