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

How to setup sub-domains like blogspot

apache dns subdomain

What should do to setup a sub-domain for the users when they sign-up into my site.

PHP Array_$POST to SQL

php sql arrays post radio

I am trying to get the current PHP code and insert into the database. Currently I am able to save the first name, last name, and email but unable to get the rest of my form data "gender", and "cons...

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.