When you switch between a page in Mozilla, NPL_EmbedDelete in modules\plugin\src\npglue.cpp is never called anywhere from the browser. Thus, it doesn't stop the applet during page switch. As a result, the applet keep running, but the parent window is already destroyed by the browser. AWT will access a non-exist parent window in the native code, and that's will result in NULL pData exception in Java. The fix is definitely to hook up the browser with NPL_EmbedDelete during page switch. Otherwise, Java applets will run very unstable in Mozilla. This bug also exists for all generic plug-in support, so the plug-in is never being called to clean up itself during page switch.
Hmm..i wonder if this is the same reason for the browser to crash after I run an embedded plugin on a page and then try to go to another page.
modules\plugin\src\npglue.cpp is not part of Mozilla build. All relevent stuff sits in modules\plugin\nglsrc
In modules\plugin\nglsrc\nsPluginHostImpl.cpp, plug-in is never called to stop either.
Marking beta1 as 23672, which is approved PDT+ for beta1, depends on this.
Putting on PDT- radar for beta1. Won't hold beta for this.
Stanley, mInstance->Stop() is called during destruction of the object frame.
Java Plug-in doesn't seem to get called through. Would you please point me to the exact file that mInstance->Stop is called?
Look at nsPluginInstanceOwner::~nsPluginInstanceOwner() in layout/html/base/src/nsObjectFrame.cpp
These are the same bug. *** This bug has been marked as a duplicate of 27486 ***