Closed Bug 904835 Opened 7 years ago Closed 3 years ago

LiveConnect fails to make function calls from Javascript into the Applet. It fails after the Applet properly rebounds from a Crash.

Categories

(Core :: Plug-ins, defect)

24 Branch
x86_64
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: oren, Assigned: johns)

Details

(Whiteboard: [leave open])

Attachments

(4 files, 1 obsolete file)

Attached file moz_bug.zip
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36

Steps to reproduce:

Enable Java Logging and Show Console by way of the Java Control Panel.

1. Serve HTML page 'app.htm' from server. See Zip file attachment.
2. Click the LOAD button to load the Java Applet (Your Java Security settings should be set to the recommended HIGH, with Applets enabled. Applet does nothing special, but is not signed)
3. After the Applet loads, Click the PING button to see the Java Console print PING. At this point LiveConnect works fine.
4. Kill the Applet. You can do this using the Activity Monitor
5. Click the LOAD button as done in Step 2 to (re-)load the Java Applet once again.
6. After the Applet loads, Click PING. 


Actual results:

The LiveConnect call to the PING function in the Applet will fail consistently


Expected results:

The first time, PING will fail. You'll see the failure in your Firebug Console. Subsequent clicks on PING will work.
Summary: LiveConnect fails to call Java Applet after Applet Crashes and Reloaded with Javascript → LiveConnect fails to make functions calls from Javascript into the Applet. It fails after the Applet properly rebounds from a Crash.
Component: Untriaged → General
Hardware: x86 → x86_64
Summary: LiveConnect fails to make functions calls from Javascript into the Applet. It fails after the Applet properly rebounds from a Crash. → LiveConnect fails to make function calls from Javascript into the Applet. It fails after the Applet properly rebounds from a Crash.
This feature is important as it lets us recover the applet automatically after an applet crash. It's a feature that's been working well up until this beta release + aurora.
This functionality works fine on 10.6.x, fails on Mac OSX 10.8
Product: Firefox → Core
Component: General → Plug-ins
This is not a bug in Firefox. Apple/Oracle have changed the Java plugin on newer versions of MacOS and so when Java crashes, it may not recover the same way.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
I know that we've come up against interoperability problems between newer versions of FireFox and Java. A recent issue to which we discovered a workaround for can be found in this bug report -> https://bugzilla.mozilla.org/show_bug.cgi?id=872969.

However, the current production version of Firefox (version 23) has NO ISSUES and works perfectly well with the workaround.  The next version of FireFox (version 24), currently in beta, and slated for launch in September (I believe) is where the problem exists.


(In reply to Benjamin Smedberg  [:bsmedberg] workweek high latency 19-Aug through 23-Aug from comment #3)
> This is not a bug in Firefox. Apple/Oracle have changed the Java plugin on
> newer versions of MacOS and so when Java crashes, it may not recover the
> same way.
(In reply to Oren from comment #4)
> I know that we've come up against interoperability problems between newer
> versions of FireFox and Java. A recent issue to which we discovered a
> workaround for can be found in this bug report ->
> https://bugzilla.mozilla.org/show_bug.cgi?id=872969.
> 
> However, the current production version of Firefox (version 23) has NO
> ISSUES and works perfectly well with the workaround.  The next version of
> FireFox (version 24), currently in beta, and slated for launch in September
> (I believe) is where the problem exists.

Bug 872969 was found to be a java bug, recent comments suggest that it may be fixed in 7u40. A firefox change triggered this, but only because it changed the order of some events, exposing an issue in the applet code. Given your description, your issue could be a special case of that bug.

If you can reliably reproduce this, using the mozregression tool to figure out what change caused this could at least help narrow down what may be going wrong:
http://mozilla.github.io/mozregression/
Hi John,

I can reliably reproduce this bug consistently.  It crept up in the following change sets
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2013-07-19&enddate=2013-07-20

In other words, there was no issue in the nightly build on 07-19-2013 (Applet worked perfectly), but the nightly build from 07-20-2013 fails consistently. I've run through mozregression a number of times to confirm this.

Please advise on next steps.


(In reply to John Schoenick [:johns] from comment #5)
> (In reply to Oren from comment #4)
> > I know that we've come up against interoperability problems between newer
> > versions of FireFox and Java. A recent issue to which we discovered a
> > workaround for can be found in this bug report ->
> > https://bugzilla.mozilla.org/show_bug.cgi?id=872969.
> > 
> > However, the current production version of Firefox (version 23) has NO
> > ISSUES and works perfectly well with the workaround.  The next version of
> > FireFox (version 24), currently in beta, and slated for launch in September
> > (I believe) is where the problem exists.
> 
> Bug 872969 was found to be a java bug, recent comments suggest that it may
> be fixed in 7u40. A firefox change triggered this, but only because it
> changed the order of some events, exposing an issue in the applet code.
> Given your description, your issue could be a special case of that bug.
> 
> If you can reliably reproduce this, using the mozregression tool to figure
> out what change caused this could at least help narrow down what may be
> going wrong:
> http://mozilla.github.io/mozregression/
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(In reply to Oren from comment #6)
> I can reliably reproduce this bug consistently.  It crept up in the
> following change sets
> http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2013-07-
> 19&enddate=2013-07-20

I don't see any obvious candidates in that range - could you maybe continue to bisect further when mozregression offers you to? 
(using "mozregression --good=2013-07-19 --bad=2013-07-20", this will take some time due to the builds)
Alright Georg, will do. But what are the chances that it has to do with this revision http://hg.mozilla.org/mozilla-central/rev/6030c759a502 and the new "PluginRemoved" handler that was added.  Seems like new conditions have been added to accommodate this new state line 7.22 for instance.


(In reply to Georg Fritzsche [:gfritzsche] from comment #7)
> (In reply to Oren from comment #6)
> > I can reliably reproduce this bug consistently.  It crept up in the
> > following change sets
> > http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2013-07-
> > 19&enddate=2013-07-20
> 
> I don't see any obvious candidates in that range - could you maybe continue
> to bisect further when mozregression offers you to? 
> (using "mozregression --good=2013-07-19 --bad=2013-07-20", this will take
> some time due to the builds)
(In reply to Oren from comment #8)
> Alright Georg, will do. But what are the chances that it has to do with this
> revision http://hg.mozilla.org/mozilla-central/rev/6030c759a502 and the new
> "PluginRemoved" handler that was added.  Seems like new conditions have been
> added to accommodate this new state line 7.22 for instance.

That specific changeset ([1] actually) just added an event and frontend handling for when plugins get removed from the page. Of course it's always possible one of the click-to-play bugs affected this behavior, but none of them stand out suspiciously enough as to warrant a longer look (to me anyway).

E.g. the line you refer specifically just changes the behavior when the event got fired that tells the frontend code that a plugin was removed.

[1] http://hg.mozilla.org/mozilla-central/rev/678e1cb9f587
Note that the nightly builds aren't triggered exactly at midnight, the specific changesets are af4e3ce8c487 (07-19 nightly) through bf73e10f5e54 (07-20 nightly):

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=af4e3ce8c487&tochange=bf73e10f5e54

The only interesting changes are front-end CTP changes and some XBL changes -- the plugin crashed dialog/placeholder uses XBL, so that may be breaking some timing assumption.

Oren, it may be useful to get a verbose debug log of what is going on when this bug is triggered, if you feel up to more debugging:

1) Download and extract a recent m-c debug build: http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-macosx64-debug/1377613126/
2) Open a terminal and change to <extract location>/FirefoxNightlyDebug.app/Contents/MacOS/
3) Run:
> mkdir profile && NSPR_LOG_MODULES=objc:5,Plugin:5,PluginNPP:5,PluginNPN:5 ./firefox -no-remote -foreground -profile ./profile &> plugin.log
4) Reproduce the issue in the debug browser that opens
5) Close the debug browser, and attach FirefoxNightlyDebug.app/Contents/MacOS/plugin.log to this bug
Hi John,

Had some issues launching firefox with the -profile switch. In addition, I simply could not reproduce the bug on the the nightly build from the link you sent.  I launched Firefox Nightly per your instruction, but without the profile switch.  I did, however, launch FireFox Aurora in the same manner and had no issues reproducing the bug. I didn't see a reason to attach logs (didn't seem to offer much), but I can if you'd like.

I'll see if can use mozregression to offer more info in regards to specific changesets, but your reference to timing certainly has merit.




(In reply to John Schoenick [:johns] from comment #10)
> Note that the nightly builds aren't triggered exactly at midnight, the
> specific changesets are af4e3ce8c487 (07-19 nightly) through bf73e10f5e54
> (07-20 nightly):
> 
> https://hg.mozilla.org/mozilla-central/
> pushloghtml?fromchange=af4e3ce8c487&tochange=bf73e10f5e54
> 
> The only interesting changes are front-end CTP changes and some XBL changes
> -- the plugin crashed dialog/placeholder uses XBL, so that may be breaking
> some timing assumption.
> 
> Oren, it may be useful to get a verbose debug log of what is going on when
> this bug is triggered, if you feel up to more debugging:
> 
> 1) Download and extract a recent m-c debug build:
> http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-
> central-macosx64-debug/1377613126/
> 2) Open a terminal and change to <extract
> location>/FirefoxNightlyDebug.app/Contents/MacOS/
> 3) Run:
> > mkdir profile && NSPR_LOG_MODULES=objc:5,Plugin:5,PluginNPP:5,PluginNPN:5 ./firefox -no-remote -foreground -profile ./profile &> plugin.log
> 4) Reproduce the issue in the debug browser that opens
> 5) Close the debug browser, and attach
> FirefoxNightlyDebug.app/Contents/MacOS/plugin.log to this bug
(In reply to Oren from comment #11)
> Hi John,
> 
> Had some issues launching firefox with the -profile switch. In addition, I
> simply could not reproduce the bug on the the nightly build from the link
> you sent.  I launched Firefox Nightly per your instruction, but without the
> profile switch.  I did, however, launch FireFox Aurora in the same manner
> and had no issues reproducing the bug. I didn't see a reason to attach logs
> (didn't seem to offer much), but I can if you'd like.
> 
> I'll see if can use mozregression to offer more info in regards to specific
> changesets, but your reference to timing certainly has merit.

Did the mkdir command succeed? That should create an empty ./profile folder, and then ask firefox to use it instead of your user's profile, ensuring this all happens on a fresh/blank profile. -no-remote also asks it not to talk to any existing firefox sessions, so the two together let you run independent instances of firefox on independent profiles.

It's interesting that you couldn't reproduce it there -- can you still reproduce the issue on today's nightly build? Perhaps it has un-regressed at some point.

m-c debug builds are only kept around for a month or so it seems, the oldest is from July 25th, which should still be after your regression window: http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-macosx64-debug/1374507348/
OK. So here's where we are.
- mkdir worked. the -profile switch seems to prefer absolute paths (weird).
- NightlyBuild version 26.0a1 Worked fine.

- NIghtlyBuild version 25.0a1(2013-07-22) Worked when I downloaded it from the previous link you provided.  However, using MozRegression the nightly build for 07-22-2013 failed, so I'm kind of confused about that. Should I rerun MozRegression?
 
- Aurora updated itself to (25.0a2 - 2013-08-27) and continues to Fail. I ran Aurora by way of command line with the switches you gave.

So on an overall summary. This is an issue that I can only reproduce on Mac 10.8.
This issue does not occur on FF 23.  FF 24 was failing last I checked, FF 25 Aurora was failing, but Nightly Build 26.0a1 was working.  The odd one here is FF 25.0a1 (2013-07-22) which fails in MozRegression but succeeds when downloading the Nightly.  I'm a bit confused about that. Should I re-test that one?




(In reply to John Schoenick [:johns] from comment #12)
> (In reply to Oren from comment #11)
> > Hi John,
> > 
> > Had some issues launching firefox with the -profile switch. In addition, I
> > simply could not reproduce the bug on the the nightly build from the link
> > you sent.  I launched Firefox Nightly per your instruction, but without the
> > profile switch.  I did, however, launch FireFox Aurora in the same manner
> > and had no issues reproducing the bug. I didn't see a reason to attach logs
> > (didn't seem to offer much), but I can if you'd like.
> > 
> > I'll see if can use mozregression to offer more info in regards to specific
> > changesets, but your reference to timing certainly has merit.
> 
> Did the mkdir command succeed? That should create an empty ./profile folder,
> and then ask firefox to use it instead of your user's profile, ensuring this
> all happens on a fresh/blank profile. -no-remote also asks it not to talk to
> any existing firefox sessions, so the two together let you run independent
> instances of firefox on independent profiles.
> 
> It's interesting that you couldn't reproduce it there -- can you still
> reproduce the issue on today's nightly build? Perhaps it has un-regressed at
> some point.
> 
> m-c debug builds are only kept around for a month or so it seems, the oldest
> is from July 25th, which should still be after your regression window:
> http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-
> central-macosx64-debug/1374507348/
> So on an overall summary. This is an issue that I can only reproduce on Mac
> 10.8.
> This issue does not occur on FF 23.  FF 24 was failing last I checked, FF 25
> Aurora was failing, but Nightly Build 26.0a1 was working.  The odd one here
> is FF 25.0a1 (2013-07-22) which fails in MozRegression but succeeds when
> downloading the Nightly.  I'm a bit confused about that. Should I re-test
> that one?

The link I gave is to a m-c debug build from that date, but is not necessarily the same revision as that day's nightly build. If it works for you on nightly, can you try tracking down the nightly where it started working?

E.g. run mozregression with |--good=2013-07-20 --bad=2013-08-27|, treating the builds where it fails as "good", and the builds where it works as "bad", to find the first build where it resumed working, which could give us a hint as to what fixed it.
Took some time to build up a Dev environment, and I couldn't reproduce the issue using Debug Builds.

Nonetheless, I can reproduce the issue consistently, and it seems to be tied to changeset 139257:678e1cb9f587.  I ran the bisect utility a couple of times to confirm.

https://hg.mozilla.org/mozilla-central/rev/678e1cb9f587

How would you like to proceed?


(In reply to John Schoenick [:johns] from comment #14)
> > So on an overall summary. This is an issue that I can only reproduce on Mac
> > 10.8.
> > This issue does not occur on FF 23.  FF 24 was failing last I checked, FF 25
> > Aurora was failing, but Nightly Build 26.0a1 was working.  The odd one here
> > is FF 25.0a1 (2013-07-22) which fails in MozRegression but succeeds when
> > downloading the Nightly.  I'm a bit confused about that. Should I re-test
> > that one?
> 
> The link I gave is to a m-c debug build from that date, but is not
> necessarily the same revision as that day's nightly build. If it works for
> you on nightly, can you try tracking down the nightly where it started
> working?
> 
> E.g. run mozregression with |--good=2013-07-20 --bad=2013-08-27|, treating
> the builds where it fails as "good", and the builds where it works as "bad",
> to find the first build where it resumed working, which could give us a hint
> as to what fixed it.
The issue appears to be in this snippet change:

handleEvent : function(event) {
    1.12 -    let plugin = event.target;
    1.13 -    let doc = plugin.ownerDocument;
    1.14 -
    1.15 -    // We're expecting the target to be a plugin.
    1.16 -    if (!(plugin instanceof Ci.nsIObjectLoadingContent))
    1.17 -      return;
    1.18 +    let plugin;
    1.19 +    let doc;
    1.20  
    1.21      let eventType = event.type;
    1.22 +    if (eventType === "PluginRemoved") {
    1.23 +      doc = event.target;
    1.24 +    }
    1.25 +    else {
    1.26 +      plugin = event.target;
    1.27 +      doc = plugin.ownerDocument;
    1.28 +
    1.29 +      if (!(plugin instanceof Ci.nsIObjectLoadingContent))
    1.30 +        return;
    1.31 +    }

(In reply to Oren from comment #15)
> Took some time to build up a Dev environment, and I couldn't reproduce the
> issue using Debug Builds.
> 
> Nonetheless, I can reproduce the issue consistently, and it seems to be tied
> to changeset 139257:678e1cb9f587.  I ran the bisect utility a couple of
> times to confirm.
> 
> https://hg.mozilla.org/mozilla-central/rev/678e1cb9f587
> 
> How would you like to proceed?
> 
> 
> (In reply to John Schoenick [:johns] from comment #14)
> > > So on an overall summary. This is an issue that I can only reproduce on Mac
> > > 10.8.
> > > This issue does not occur on FF 23.  FF 24 was failing last I checked, FF 25
> > > Aurora was failing, but Nightly Build 26.0a1 was working.  The odd one here
> > > is FF 25.0a1 (2013-07-22) which fails in MozRegression but succeeds when
> > > downloading the Nightly.  I'm a bit confused about that. Should I re-test
> > > that one?
> > 
> > The link I gave is to a m-c debug build from that date, but is not
> > necessarily the same revision as that day's nightly build. If it works for
> > you on nightly, can you try tracking down the nightly where it started
> > working?
> > 
> > E.g. run mozregression with |--good=2013-07-20 --bad=2013-08-27|, treating
> > the builds where it fails as "good", and the builds where it works as "bad",
> > to find the first build where it resumed working, which could give us a hint
> > as to what fixed it.
// I can't speak to the original intent of the change, but
// consider the following re-write. 

plugin = event.target;
if (!(plugin instanceof Ci.nsIObjectLoadingContent))
  return;

let eventType = event.type;
if (eventType === "PluginRemoved") {
  doc = event.target;
}
else {
  doc = plugin.ownerDocument;
}

(In reply to Oren from comment #16)
> The issue appears to be in this snippet change:
> 
> handleEvent : function(event) {
>     1.12 -    let plugin = event.target;
>     1.13 -    let doc = plugin.ownerDocument;
>     1.14 -
>     1.15 -    // We're expecting the target to be a plugin.
>     1.16 -    if (!(plugin instanceof Ci.nsIObjectLoadingContent))
>     1.17 -      return;
>     1.18 +    let plugin;
>     1.19 +    let doc;
>     1.20  
>     1.21      let eventType = event.type;
>     1.22 +    if (eventType === "PluginRemoved") {
>     1.23 +      doc = event.target;
>     1.24 +    }
>     1.25 +    else {
>     1.26 +      plugin = event.target;
>     1.27 +      doc = plugin.ownerDocument;
>     1.28 +
>     1.29 +      if (!(plugin instanceof Ci.nsIObjectLoadingContent))
>     1.30 +        return;
>     1.31 +    }
> 
> (In reply to Oren from comment #15)
> > Took some time to build up a Dev environment, and I couldn't reproduce the
> > issue using Debug Builds.
> > 
> > Nonetheless, I can reproduce the issue consistently, and it seems to be tied
> > to changeset 139257:678e1cb9f587.  I ran the bisect utility a couple of
> > times to confirm.
> > 
> > https://hg.mozilla.org/mozilla-central/rev/678e1cb9f587
> > 
> > How would you like to proceed?
> > 
> > 
> > (In reply to John Schoenick [:johns] from comment #14)
> > > > So on an overall summary. This is an issue that I can only reproduce on Mac
> > > > 10.8.
> > > > This issue does not occur on FF 23.  FF 24 was failing last I checked, FF 25
> > > > Aurora was failing, but Nightly Build 26.0a1 was working.  The odd one here
> > > > is FF 25.0a1 (2013-07-22) which fails in MozRegression but succeeds when
> > > > downloading the Nightly.  I'm a bit confused about that. Should I re-test
> > > > that one?
> > > 
> > > The link I gave is to a m-c debug build from that date, but is not
> > > necessarily the same revision as that day's nightly build. If it works for
> > > you on nightly, can you try tracking down the nightly where it started
> > > working?
> > > 
> > > E.g. run mozregression with |--good=2013-07-20 --bad=2013-08-27|, treating
> > > the builds where it fails as "good", and the builds where it works as "bad",
> > > to find the first build where it resumed working, which could give us a hint
> > > as to what fixed it.
For the "PluginRemoved" event |event.target| is the document, not the plugin element (and not a |nsIObjectLoadingContent|) - that was the
point that change adressed.

How did you narrow it down to that specific part?
I ran hg bisect and narrowed the issue down to this specific changeset. That bit of code looked suspicious so I rewrote it to revert some of that logic to its original form then built FireFox.  As an aside, to be consistent and certain I ran bisect a few times to confirm the changeset where this bug was introduced, and I re/built FireFox with and without the changes a couple of times at least as validation. My tests were consistent as I always test in the same manner using the attached sample, and I run through tests twice at least to be certain.

This fix is important to us, so please keep me posted. Thanks.


(In reply to Georg Fritzsche [:gfritzsche] from comment #18)
> For the "PluginRemoved" event |event.target| is the document, not the plugin
> element (and not a |nsIObjectLoadingContent|) - that was the
> point that change adressed.
> 
> How did you narrow it down to that specific part?
Oren, using your test case here, I can reproduce the bug on any FF version -- that is because the load() function in applet.js is creating a new <object> tag, but ping() is using the old (pre-reload) object tag:

> try {
>   if (!that.applet) {
>     that.applet = document.getElementById(that.appletID);
>   }
>   that.applet.ping();
> } catch (e) {
>   that.applet = null;
>   console.error('Applet.sendEvent received error handling event: ' +
>               'the applet likely crashed');
>   console.log("arguments:",arguments);
>   console.log("error:",e);
> }

that.applet will be the old <object> tag, causing .ping() to fail. Since the exception nulls out that.applet, the second attempt will get the new object and succeed.

Accordingly, this test fails on 23 and 24 for me with your STR, but doesn't explain why you were able to only reproduce the bugs on certain nightlies. Are you using a different test case than the one posted here? Maybe something got lost in the translation.
Flags: needinfo?(oren)
Hi John. I could never reproduce the issue when I built or used a Debug version of FF. The reason version 26a worked without any issues was because it was a Debug version.

I recorded a screen capture to hopefully eliminate any ambiguity. Machine was running a bit slow, so loading the applet initially took some time. Let me know how else I can assist.

http://youtu.be/I1c7Fg8SaTU


(In reply to John Schoenick [:johns] from comment #20)
> Oren, using your test case here, I can reproduce the bug on any FF version
> -- that is because the load() function in applet.js is creating a new
> <object> tag, but ping() is using the old (pre-reload) object tag:
> 
> > try {
> >   if (!that.applet) {
> >     that.applet = document.getElementById(that.appletID);
> >   }
> >   that.applet.ping();
> > } catch (e) {
> >   that.applet = null;
> >   console.error('Applet.sendEvent received error handling event: ' +
> >               'the applet likely crashed');
> >   console.log("arguments:",arguments);
> >   console.log("error:",e);
> > }
> 
> that.applet will be the old <object> tag, causing .ping() to fail. Since the
> exception nulls out that.applet, the second attempt will get the new object
> and succeed.
> 
> Accordingly, this test fails on 23 and 24 for me with your STR, but doesn't
> explain why you were able to only reproduce the bugs on certain nightlies.
> Are you using a different test case than the one posted here? Maybe
> something got lost in the translation.
Flags: needinfo?(oren)
When you watch the video, change to HD and make full screen.

(In reply to Oren from comment #21)
> Hi John. I could never reproduce the issue when I built or used a Debug
> version of FF. The reason version 26a worked without any issues was because
> it was a Debug version.
> 
> I recorded a screen capture to hopefully eliminate any ambiguity. Machine
> was running a bit slow, so loading the applet initially took some time. Let
> me know how else I can assist.
> 
> http://youtu.be/I1c7Fg8SaTU
> 
> 
> (In reply to John Schoenick [:johns] from comment #20)
> > Oren, using your test case here, I can reproduce the bug on any FF version
> > -- that is because the load() function in applet.js is creating a new
> > <object> tag, but ping() is using the old (pre-reload) object tag:
> > 
> > > try {
> > >   if (!that.applet) {
> > >     that.applet = document.getElementById(that.appletID);
> > >   }
> > >   that.applet.ping();
> > > } catch (e) {
> > >   that.applet = null;
> > >   console.error('Applet.sendEvent received error handling event: ' +
> > >               'the applet likely crashed');
> > >   console.log("arguments:",arguments);
> > >   console.log("error:",e);
> > > }
> > 
> > that.applet will be the old <object> tag, causing .ping() to fail. Since the
> > exception nulls out that.applet, the second attempt will get the new object
> > and succeed.
> > 
> > Accordingly, this test fails on 23 and 24 for me with your STR, but doesn't
> > explain why you were able to only reproduce the bugs on certain nightlies.
> > Are you using a different test case than the one posted here? Maybe
> > something got lost in the translation.
I have a workaround. 

If you reference the applet.js source file and the function "load". After a crash, the applet object is removed by way of this line ->

  document.body.removeChild(appletTag);

and then immediately re-inserted via this line -> 

  if (document.body.firstChild){
    body.insertBefore(div, document.body.firstChild);
  } else {
    body.appendChild(div);
  }

There must be some sort of timing issue between the DOM change and how or when FF is alerted to Plugin "Crashes" or Plugin "Removal"


Adding the following bit of code appears to fix the issue, though I still need to vet this fix a bit more. Just thought I would let you know.

setTimeout(function() {
  if (document.body.firstChild){
    body.insertBefore(div, document.body.firstChild);
  } else {
    body.appendChild(div);
  }
},0);



(In reply to Oren from comment #22)
> When you watch the video, change to HD and make full screen.
> 
> (In reply to Oren from comment #21)
> > Hi John. I could never reproduce the issue when I built or used a Debug
> > version of FF. The reason version 26a worked without any issues was because
> > it was a Debug version.
> > 
> > I recorded a screen capture to hopefully eliminate any ambiguity. Machine
> > was running a bit slow, so loading the applet initially took some time. Let
> > me know how else I can assist.
> > 
> > http://youtu.be/I1c7Fg8SaTU
> > 
> > 
> > (In reply to John Schoenick [:johns] from comment #20)
> > > Oren, using your test case here, I can reproduce the bug on any FF version
> > > -- that is because the load() function in applet.js is creating a new
> > > <object> tag, but ping() is using the old (pre-reload) object tag:
> > > 
> > > > try {
> > > >   if (!that.applet) {
> > > >     that.applet = document.getElementById(that.appletID);
> > > >   }
> > > >   that.applet.ping();
> > > > } catch (e) {
> > > >   that.applet = null;
> > > >   console.error('Applet.sendEvent received error handling event: ' +
> > > >               'the applet likely crashed');
> > > >   console.log("arguments:",arguments);
> > > >   console.log("error:",e);
> > > > }
> > > 
> > > that.applet will be the old <object> tag, causing .ping() to fail. Since the
> > > exception nulls out that.applet, the second attempt will get the new object
> > > and succeed.
> > > 
> > > Accordingly, this test fails on 23 and 24 for me with your STR, but doesn't
> > > explain why you were able to only reproduce the bugs on certain nightlies.
> > > Are you using a different test case than the one posted here? Maybe
> > > something got lost in the translation.
Okay, I see what you mean with the test case - the first ping is supposed to fail (this.applet should be set to null in load() to avoid this), but you can get it into a state where all pings fail. Unfortunately, I can't reproduce the latter.

It sounds like the issue is that the "PluginRemoved" event is causing the plugin to be scripted earlier in the event cycle than it would be without the event. This shouldn't really affect much, but it may be causing an odd interaction with java.

Can you check and see if you can reproduce the issue with this build?
https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jschoenick@mozilla.com-c7f370f02c9c/try-macosx64/

This is a opt (non-debug) build based on the 07-20 nightly, but with additional logging enabled.

If the issue reproduces there, can you try running the build with:
|NSPR_LOG_MODULES=IPCPlugins:5 ./firefox -no-remote ....|

And attach the output here?
I was able to reproduce the issue. I ran through the test case a few times just to be complete and reproduced it every time. Hope this helps.


Prudence:MacOS junctionnetworks$ NSPR_LOG_MODULES=IPCPlugins ./firefox -no-remote
2013-09-04 17:07:19.019 firefox[3792:7613] invalid context
JVMLauncher.afterStart(): starting JVM process watcher
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe$1.run(Unknown Source)
	at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
	at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	at sun.plugin2.main.server.JVMInstance$WorkerThread.run(Unknown Source)
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe$2.run(Unknown Source)
	at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
	at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	at sun.plugin2.main.server.HeartbeatThread.run(Unknown Source)
Exception in thread "main" netscape.javascript.JSException: Plugin instance for applet ID 1 was already released
	at sun.plugin2.main.server.LiveConnectSupport.getInfo(Unknown Source)
	at sun.plugin2.main.server.LiveConnectSupport.shutdown(Unknown Source)
	at sun.plugin2.main.server.JVMInstance.unregisterApplet(Unknown Source)
	at sun.plugin2.main.server.JVMInstance.recycleAppletID(Unknown Source)
	at sun.plugin2.main.server.JVMManager.recycleAppletID(Unknown Source)
	at sun.plugin2.main.server.MozillaPlugin.stopApplet(Unknown Source)
	at sun.plugin2.main.server.MozillaPlugin.destroy(Unknown Source)
JVMLauncher.afterStart(): starting JVM process watcher
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe$1.run(Unknown Source)
	at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
	at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	at sun.plugin2.main.server.JVMInstance$WorkerThread.run(Unknown Source)
Exception in thread "Thread-6" netscape.javascript.JSException: Plugin instance for applet ID 2 was already released
	at sun.plugin2.main.server.LiveConnectSupport.getInfo(Unknown Source)
	at sun.plugin2.main.server.LiveConnectSupport.shutdown(Unknown Source)
	at sun.plugin2.main.server.JVMInstance.unregisterApplet(Unknown Source)
	at sun.plugin2.main.server.JVMInstance.recycleAppletID(Unknown Source)
	at sun.plugin2.main.server.JVMManager.recycleAppletID(Unknown Source)
	at sun.plugin2.main.server.MozillaPlugin.stopApplet(Unknown Source)
	at sun.plugin2.main.server.MozillaPlugin.destroy(Unknown Source)
JVMLauncher.afterStart(): starting JVM process watcher
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe$2.run(Unknown Source)
	at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
	at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	at sun.plugin2.main.server.HeartbeatThread.run(Unknown Source)
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe$1.run(Unknown Source)
	at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
	at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	at sun.plugin2.main.server.JVMInstance$WorkerThread.run(Unknown Source)









Exception in thread "Thread-9" netscape.javascript.JSException: Plugin instance for applet ID 3 was already released
	at sun.plugin2.main.server.LiveConnectSupport.getInfo(Unknown Source)
	at sun.plugin2.main.server.LiveConnectSupport.shutdown(Unknown Source)
	at sun.plugin2.main.server.JVMInstance.unregisterApplet(Unknown Source)
	at sun.plugin2.main.server.JVMInstance.recycleAppletID(Unknown Source)
	at sun.plugin2.main.server.JVMManager.recycleAppletID(Unknown Source)
	at sun.plugin2.main.server.MozillaPlugin.stopApplet(Unknown Source)
	at sun.plugin2.main.server.MozillaPlugin.destroy(Unknown Source)
JVMLauncher.afterStart(): starting JVM process watcher



(In reply to John Schoenick [:johns] from comment #24)
> Okay, I see what you mean with the test case - the first ping is supposed to
> fail (this.applet should be set to null in load() to avoid this), but you
> can get it into a state where all pings fail. Unfortunately, I can't
> reproduce the latter.
> 
> It sounds like the issue is that the "PluginRemoved" event is causing the
> plugin to be scripted earlier in the event cycle than it would be without
> the event. This shouldn't really affect much, but it may be causing an odd
> interaction with java.
> 
> Can you check and see if you can reproduce the issue with this build?
> https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/
> jschoenick@mozilla.com-c7f370f02c9c/try-macosx64/
> 
> This is a opt (non-debug) build based on the 07-20 nightly, but with
> additional logging enabled.
> 
> If the issue reproduces there, can you try running the build with:
> |NSPR_LOG_MODULES=IPCPlugins:5 ./firefox -no-remote ....|
> 
> And attach the output here?
(In reply to Oren from comment #25)
> I was able to reproduce the issue. I ran through the test case a few times
> just to be complete and reproduced it every time. Hope this helps.
> 
> 
> Prudence:MacOS junctionnetworks$ NSPR_LOG_MODULES=IPCPlugins ./firefox
> -no-remote

This needs to be NSPR_LOG_MODULES=IPCPlugins:5 (not just IPCPlugins) - you should see a lot more output.
1945555328[100567070]: static mozilla::PluginLibrary *mozilla::plugins::PluginModuleParent::LoadModule(const char *)
1945555328[10671b070]: bool mozilla::plugins::PluginModuleChild::Init(const std::string &, base::ProcessHandle, MessageLoop *, IPC::Channel *) [106705830]
1945555328[100567070]: virtual nsresult mozilla::plugins::PluginModuleParent::NP_Initialize(NPNetscapeFuncs *, NPError *) [10ee1b000]
1945555328[10671b070]: virtual bool mozilla::plugins::PluginModuleChild::AnswerNP_Initialize(const uint32_t &, NPError *) [106705830]
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: virtual bool mozilla::plugins::PluginModuleChild::AnswerNP_GetEntryPoints(NPError *) [106705830]
1945555328[100567070]: virtual nsresult mozilla::plugins::PluginModuleParent::NPP_New(NPMIMEType, NPP, uint16_t, int16_t, char **, char **, NPSavedData *, NPError *) [10ee1b000]
1945555328[10671b070]: virtual mozilla::plugins::PPluginInstanceChild *mozilla::plugins::PluginModuleChild::AllocPPluginInstanceChild(const nsCString &, const uint16_t &, const nsTArray<nsCString> &, const nsTArray<nsCString> &, NPError *) [106705830]
1945555328[10671b070]: virtual bool mozilla::plugins::PluginModuleChild::AnswerPPluginInstanceConstructor(PPluginInstanceChild *, const nsCString &, const uint16_t &, const nsTArray<nsCString> &, const nsTArray<nsCString> &, NPError *) [106705830]
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalue(NPP, NPNVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_GetValue(NPNVariable, void *) (aVar=3002)
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalue(NPP, NPNVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_GetValue(NPNVariable, void *) (aVar=2003)
1945555328[10671b070]: NPError mozilla::plugins::child::_setvalue(NPP, NPPVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_SetValue(NPPVariable, void *) (aVar=1000, aValue=3)
1945555328[10671b070]:   Plugin requested drawing model id  #3
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalue(NPP, NPNVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_GetValue(NPNVariable, void *) (aVar=3001)
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalue(NPP, NPNVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_GetValue(NPNVariable, void *) (aVar=15)
1945555328[10671b070]: static NPObject *mozilla::plugins::PluginModuleChild::NPN_CreateObject(NPP, NPClass *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: bool mozilla::plugins::child::_getproperty(NPP, NPObject *, NPIdentifier, NPVariant *)
1945555328[10671b070]: static NPObject *mozilla::plugins::PluginModuleChild::NPN_CreateObject(NPP, NPClass *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: static NPObject *mozilla::plugins::PluginModuleChild::NPN_CreateObject(NPP, NPClass *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: NPError mozilla::plugins::child::_setvalue(NPP, NPPVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_SetValue(NPPVariable, void *) (aVar=13, aValue=1)
1945555328[10671b070]: In PluginInstanceChild::NPN_SetValue: Unhandled NPPVariable 13 (NPPVpluginKeepLibraryInMemory)
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalue(NPP, NPNVariable, void *)
1945555328[10671b070]: NPError mozilla::plugins::PluginInstanceChild::NPN_GetValue(NPNVariable, void *) (aVar=15)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: bool mozilla::plugins::child::_getproperty(NPP, NPObject *, NPIdentifier, NPVariant *)
1945555328[10671b070]: static NPObject *mozilla::plugins::PluginModuleChild::NPN_CreateObject(NPP, NPClass *)
1945555328[10671b070]: static NPIdentifier mozilla::plugins::PluginModuleChild::NPN_GetStringIdentifier(const NPUTF8 *)
1945555328[10671b070]: bool mozilla::plugins::child::_getproperty(NPP, NPObject *, NPIdentifier, NPVariant *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
1945555328[10671b070]: const char *mozilla::plugins::child::_useragent(NPP)
1945555328[100567070]: int16_t mozilla::plugins::PluginInstanceParent::NPP_HandleEvent(void *)
1945555328[10671b070]: virtual bool mozilla::plugins::PluginInstanceChild::AnswerNPP_HandleEvent(const mozilla::plugins::NPRemoteEvent &, int16_t *)
1945555328[10671b070]: [InstanceChild][10980e400] AsyncSetWindow to <x=8,y=73, w=0,h=0>
1945555328[10671b070]: [InstanceChild][10980e400] UpdateWindow w=<x=8,y=73, w=0,h=0>, clip=<l=0,t=0,r=0,b=0>
1945555328[10671b070]: const char *mozilla::plugins::child::_useragent(NPP)
159113216[10671d670]: NPError mozilla::plugins::child::_getvalue(NPP, NPNVariable, void *)
1945555328[10671b070]: static NPObject *mozilla::plugins::PluginModuleChild::NPN_CreateObject(NPP, NPClass *)
1945555328[10671b070]: GOT SCRIPTABLE OBJECT: 10f1eaac0
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
292618240[1110632d0]: void mozilla::plugins::child::_pluginthreadasynccall(NPP, PluginThreadCallback, void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
292618240[1110632d0]: void mozilla::plugins::child::_pluginthreadasynccall(NPP, PluginThreadCallback, void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalueforurl(NPP, NPNURLVariable, const char *, char **, uint32_t *)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
292618240[1110632d0]: void mozilla::plugins::child::_pluginthreadasynccall(NPP, PluginThreadCallback, void *)
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalueforurl(NPP, NPNURLVariable, const char *, char **, uint32_t *)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
292618240[1110632d0]: void mozilla::plugins::child::_pluginthreadasynccall(NPP, PluginThreadCallback, void *)
1945555328[10671b070]: NPError mozilla::plugins::child::_getvalueforurl(NPP, NPNURLVariable, const char *, char **, uint32_t *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)

 ....

287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[100567070]: int16_t mozilla::plugins::PluginInstanceParent::NPP_HandleEvent(void *)
1945555328[10671b070]: virtual bool mozilla::plugins::PluginInstanceChild::AnswerNPP_HandleEvent(const mozilla::plugins::NPRemoteEvent &, int16_t *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)

 ....

287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
292618240[1110632d0]: void mozilla::plugins::child::_pluginthreadasynccall(NPP, PluginThreadCallback, void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)

 ....

287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[100567070]: int16_t mozilla::plugins::PluginInstanceParent::NPP_HandleEvent(void *)
1945555328[10671b070]: virtual bool mozilla::plugins::PluginInstanceChild::AnswerNPP_HandleEvent(const mozilla::plugins::NPRemoteEvent &, int16_t *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)

 ....

287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: GOT SCRIPTABLE OBJECT: 10f1eaac0
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: static bool mozilla::plugins::PluginModuleChild::NPN_IdentifierIsString(NPIdentifier)
1945555328[10671b070]: static NPUTF8 *mozilla::plugins::PluginModuleChild::NPN_UTF8FromIdentifier(NPIdentifier)
1945555328[10671b070]: void mozilla::plugins::child::_memfree(void *)
1945555328[10671b070]: void mozilla::plugins::child::_releasevariantvalue(NPVariant *)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
287313920[10671fed0]: NPBool mozilla::plugins::child::_convertpoint(NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace)
Attached file FF Nightly w/ Logging
Attached a file of the output. First attempt of pasting the output didn't go to well.

(In reply to John Schoenick [:johns] from comment #26)
> (In reply to Oren from comment #25)
> > I was able to reproduce the issue. I ran through the test case a few times
> > just to be complete and reproduced it every time. Hope this helps.
> > 
> > 
> > Prudence:MacOS junctionnetworks$ NSPR_LOG_MODULES=IPCPlugins ./firefox
> > -no-remote
> 
> This needs to be NSPR_LOG_MODULES=IPCPlugins:5 (not just IPCPlugins) - you
> should see a lot more output.
The log shows we appear to be getting the scriptable object from the plugin when expected, which should rule out Bug 872969. This means the issue is in the prototype code. Looking at it, I think we're missing a re-entrance guard when we spawn a new plugin synchronously inside StopPluginInstance(). The outer StopPluginInstance call will throw away the inner prototype. There's a similar issue with delayed stop, but there's other issues there so I'll leave that to bug 818785.
Attachment #800427 - Flags: review?(joshmoz)
Bonus, this was always showing up as |Firing event "P"| in logs due to String/CString fail (and lack of printf validation in PR_LOG...)
Attachment #800430 - Flags: review?(joshmoz)
This also explains why 678e1cb9f587 triggered the issue for you, and why adding a setTimeout before spawning the new plugin fixes it. The PluginRemoved event scripts the new plugin instance, causing it to spawn. If java spins the event loop while being destroyed (it does), this means it will cause its own tag to be scripted, which will cause the *new* plugin to spawn. When the outer plugin finishes dying, DoStopPlugin() throws away its prototype chain, despite that chain now belonging to the *new* plugin. I suspect that |document.querySelector("object").__proto__| will return |[object HTMLObjectElement]| instead of |[object NPObject JS wrapper class]| when this bug triggers.

Pushed to try:
https://tbpl.mozilla.org/?tree=Try&rev=b8ef9dee8077
Assignee: nobody → jschoenick
Status: UNCONFIRMED → NEW
Ever confirmed: true
Oren, can you see if this build, based on 25 but with the patch here, reproduces the issue for you?

http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jschoenick@mozilla.com-4227ecbda38f/try-macosx64/
Flags: needinfo?(oren)
Didn't work
Flags: needinfo?(oren)
(In reply to Oren from comment #34)
> Created attachment 800934 [details]
> plugin.25a2.out, Try Build Didn't work
> 
> Didn't work

Crap! Well, we found *a* bug, just not *the* bug. Unfortunately I'm low on ideas, it's very possible that this is a java bug. Could you try the build from comment 24 again with:
NSPR_LOG_MODULES=objlc:5,Plugin:5,PluginNPP:5,PluginNPN:5,IPCPlugins:5

This should give us a ton of spam that might hint at something interesting
I'm not going to pretend that I understood everything in your previous explanation, but to simplify it a bit for my sake, this issue does feel a lot like a race condition (that may be an obvious point).  Some code A is executing and while A is executing some code B executes before code A can finish and doesn't guard against certain state conditions that A is creating while A is executing. But if you can give A just a little bit more time to finish, then when B executes, the state of the program will be such that B will execute properly.  Both setTimeout and running the NightlyBuilds in DEBUG mode create enough of a buffer for A to get through whatever code it needs to get through so that B can run properly.

So to be a bit more precise.
Code A is this -> 
document.body.removeChild(appletTag);
// The applet at this point is long gone, but maybe FF still has a handle on it,
// and it's not until removeChild is called that "PluginRemoved" is triggered (Not sure what triggers it to be honest)


And 

Code B is this  ->
   
let eventType = event.type;
if (eventType === "PluginRemoved") { // In our bug, this condition is TRUE, I'm pretty sure
  doc = event.target;
}
else {
 plugin = event.target;
 doc = plugin.ownerDocument;

  if (!(plugin instanceof Ci.nsIObjectLoadingContent))  // I also think that in our bug this condition is TRUE, but is not executed.
    return;
}


// eventType is most likely == "PluginRemoved" AND
// this condition -> (!(plugin instanceof Ci.nsIObjectLoadingContent)) is TRUE
// I say this because if you refactor the codebase and put this conditional check
// at the top of the function (SEE Comment 17) like it was before the committed change, everything starts working again.
// To be clear, I'm referring to this condition check here
// if (!(plugin instanceof Ci.nsIObjectLoadingContent))
//   return;



// Also because eventType === "PluginRemoved"
// This function -> this._showClickToPlayNotification(browser); 
// will be called
// Whereas in a previous changeset, no function will be called.



So just to summarize my point. It's not the introduction of the "PluginRemoved" handler that causes the issue, but rather it's the fact that this code below doesn't execute anymore, that exposes the issue. That's just been my observation, I can't make the mental leap between the way Inner and Outer prototype chains are handled while the plugin is being torn down and this particular issue at hand. I just don't get the relationship because I can make the bug go away by placing the snippet below at the top of the function and not inside the 'else'. 

if (!(plugin instanceof Ci.nsIObjectLoadingContent))
   return;

I hope that makes sense. It is a Friday and I do feel like I'm babbling a bit. I'll follow up next week with you suggestion to add debug.




(In reply to John Schoenick [:johns] from comment #35)
> (In reply to Oren from comment #34)
> > Created attachment 800934 [details]
> > plugin.25a2.out, Try Build Didn't work
> > 
> > Didn't work
> 
> ****! Well, we found *a* bug, just not *the* bug. Unfortunately I'm low on
> ideas, it's very possible that this is a java bug. Could you try the build
> from comment 24 again with:
> NSPR_LOG_MODULES=objlc:5,Plugin:5,PluginNPP:5,PluginNPN:5,IPCPlugins:5
> 
> This should give us a ton of spam that might hint at something interesting
Attachment #800427 - Flags: review?(joshmoz) → review+
Attachment #800430 - Flags: review?(joshmoz) → review+
(In reply to Oren from comment #36)
> I'm not going to pretend that I understood everything in your previous
> explanation, but to simplify it a bit for my sake, this issue does feel a
> lot like a race condition (that may be an obvious point).  Some code A is
> executing and while A is executing some code B executes before code A can
> finish and doesn't guard against certain state conditions that A is creating
> while A is executing. But if you can give A just a little bit more time to
> finish, then when B executes, the state of the program will be such that B
> will execute properly.  Both setTimeout and running the NightlyBuilds in
> DEBUG mode create enough of a buffer for A to get through whatever code it
> needs to get through so that B can run properly.
> 
> So to be a bit more precise.
> Code A is this -> 
> document.body.removeChild(appletTag);
> // The applet at this point is long gone, but maybe FF still has a handle on
> it,
> // and it's not until removeChild is called that "PluginRemoved" is
> triggered (Not sure what triggers it to be honest)

I think part of the issue here may be that the applet is not long gone - java spins up its own process, and killing that doesn't cause the plugin-container to shut down, so firefox doesn't know of the crash. However, that should not break subsequent loads.

> And 
> 
> Code B is this  ->
>    
> let eventType = event.type;
> if (eventType === "PluginRemoved") { // In our bug, this condition is TRUE,
> I'm pretty sure
>   doc = event.target;
> }
> else {
>  plugin = event.target;
>  doc = plugin.ownerDocument;
> 
>   if (!(plugin instanceof Ci.nsIObjectLoadingContent))  // I also think that
> in our bug this condition is TRUE, but is not executed.
>     return;
> }
> 
> 
> // eventType is most likely == "PluginRemoved" AND
> // this condition -> (!(plugin instanceof Ci.nsIObjectLoadingContent)) is
> TRUE
> // I say this because if you refactor the codebase and put this conditional
> check
> // at the top of the function (SEE Comment 17) like it was before the
> committed change, everything starts working again.
> // To be clear, I'm referring to this condition check here
> // if (!(plugin instanceof Ci.nsIObjectLoadingContent))
> //   return;
> 
> 
> 
> // Also because eventType === "PluginRemoved"
> // This function -> this._showClickToPlayNotification(browser); 
> // will be called
> // Whereas in a previous changeset, no function will be called.
> 
> 
> 
> So just to summarize my point. It's not the introduction of the
> "PluginRemoved" handler that causes the issue, but rather it's the fact that
> this code below doesn't execute anymore, that exposes the issue. That's just
> been my observation, I can't make the mental leap between the way Inner and
> Outer prototype chains are handled while the plugin is being torn down and
> this particular issue at hand. I just don't get the relationship because I
> can make the bug go away by placing the snippet below at the top of the
> function and not inside the 'else'. 
> 
> if (!(plugin instanceof Ci.nsIObjectLoadingContent))
>    return;
> 
> I hope that makes sense. It is a Friday and I do feel like I'm babbling a
> bit. I'll follow up next week with you suggestion to add debug.

The issue here is that the PluginRemoved event is firing against the document, not the plugin. Checking that event.target is a OBJLC (that is, seeing that it is a plugin-implementing tag) doesn't make sense if event.target is a document. This is a benign and seemingly-proper change, the reason that I suspect it is causing issues is because _showClickToPlayNotification ends up touching the new plugin.

There's a lot of events involved here, as well as quirky java behavior.

- Java handles individual plugin crashes itself, so its master "plugin-container" is still alive, and firefox does not treat java itself as having crashed. This means the old (crashed) plugin is still running as far as firefox is concerned, since java is still alive and well and other java plugins are okay.
- Java likes to cause events to be processed while inside its own event loop. This could include PluginRemoved.
- When a new plugin is created, it doesn't spawn instantly to avoid causing unnecessary lag (loading a plugin + plugin-container can be expensive). Instead a new event is queued to spawn it.
- But, since pages expect to be able to append a plugin and immediately talk to it, there's a short-cut: If you cause script-access to a plugin tag, and it isn't spawned yet, we will finish spawning it right then and there.
- The PluginRemoved event calls showClickToPlayNotification which touches the newly created plugin. Due to the previous point, this can cause it to spawn right then, whereas before it would wait until its spawn event reached the top of the event loop.
- How plugins are torn down: |body.removeChild(plugin); otherPlace.appendChild(plugin);| should move, not re-spawn, the plugin. So when a plugin is removed from the document, an event is queued to destroy it. If, when the event fires, it has made its way back into the document, it is left alone.

So a potential scenario might be:
- You remove PluginA, CheckPluginStopEvent is queued to tear it down. Then, PluginRemoved is queued to tell CTP
- You add PluginB. AsyncInstantiatePlugin event is queued to start it.
- CheckPluginStopEvent fires, and calls into java to stop the old defunct plugin.
- Java causes a nested event loop to spin, because it always does to make our day worse
- Inside CheckPluginStopEvent->StopJava->SpinEventLoop(), PluginRemoved runs
- PluginRemoved touches PluginA. Since AsyncInstantiatePlugin hasn't run yet, we move to spawn it right now.
- Now the stack looks like: CheckPluginStopEvent->StopJava->SpinEventLoop->PluginRemoved->TouchPlugin->SpawnPluginB

There are seemingly endless ways for one missing check to cause this to go wrong. Just reading the code I found a bug and created the patch attached here, but that turns out to be yet-another bug.

The log I suggested in comment 35 might show us the exact order these events are all happening in, and might at least hint at where to look for the issue.
Comment on attachment 800430 [details] [diff] [review]
Fix nsSimplePluginEvent log statement

(This was fixed as part of a patch in bug 934774)
Attachment #800430 - Attachment is obsolete: true
Comment on attachment 800427 [details] [diff] [review]
Don't stomp on the new plugin's prototype if we load a plugin nested inside unloading a plugin.

https://hg.mozilla.org/integration/mozilla-inbound/rev/141085686227
Attachment #800427 - Flags: checkin+
Whiteboard: [leave open]
Hi John,

Sorry for being MIA.  Once I found a workaround, I had to get back to other work stuff.  I downloaded Aurora last Friday and today I ran the test sample (included in this bug report) and it did seem to work as expected.  However, I have upgraded my MacOSX to Mavericks and Java had a recent update as well, so my test environment has changed which isn't ideal to confirm the resolution.  Anyway, I'll leave it at that. Thanks for staying on top of this.
I'm pretty sure that this can be marked as FIXED

or as WONTFIX per bug #1269807 ( https://blog.mozilla.org/futurereleases/2015/10/08/npapi-plugins-in-firefox/ )
Status: NEW → RESOLVED
Closed: 7 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.