Closed Bug 375070 Opened 15 years ago Closed 13 years ago

Java Plugin bug hangs FireFox if page contains broken link to an applet

Categories

(Core :: Plug-ins, defect)

defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cowwoc2020, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

The fix for bug #315841 fixes a critical bug whereby if an applet fails to load the entire browser hangs and the task has to be killed manually. In light of the severity of this issue I am requesting that the fix be backported to the 2.x branch.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Version: unspecified → 1.8 Branch
do you have a repeatable test case?
Not much that can be done with this bug without a testcase.  The fix for bug 315841 only touches code that doesn't even exist on branch, so there's no meaningful way to "backport it".  New solutions have to be found for any problems it fixed, which means there needs to be a way to reproduce said problems.
I should also note that bug 315841 did not hang the entire browser.  So you're just seeing a totally different issue.  Still need a testcase. ;)
Here you go:

1) Install FireFox 2.0.0.3 with AdBlock (Pro) plugin (pro or non-pro version will cause the same problem)
2) hit http://bbs.darktech.org/test2.html
3) Browser will hang

Please let me know if you can reproduce it on your end.
I forgot step 1.1: install Java6 from http://java.sun.com/javase/downloads/index.jsp
What's the url to the exact extension you're installing?
My mistake, it's "AdBlock Plus" not "AdBlock Pro" and it can be found here: https://addons.mozilla.org/en-US/firefox/addon/1865
Interesting.  I can reproduce the problem with the 1.6 JRE, but NOT the 1.5 JRE.
So when we hang, breaking in the debugger gives me this stack:

#0  0x00a127a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0xb7cc3404 in poll () from /lib/tls/libc.so.6
#2  0xb27abb18 in JavaVM5::ProcessWorkQueue ()
   from /usr/java/jre1.6.0_01/lib/i386/libjavaplugin_nscp.so
#3  0xb27acf1d in JavaVM5::GetJavaObjectForInstance ()
   from /usr/java/jre1.6.0_01/lib/i386/libjavaplugin_nscp.so
#4  0xb27a77d4 in JavaPluginFactory5::GetJavaObjectForInstance ()
   from /usr/java/jre1.6.0_01/lib/i386/libjavaplugin_nscp.so
#5  0xb27a9de0 in JavaPluginInstance5::GetJavaObject ()
   from /usr/java/jre1.6.0_01/lib/i386/libjavaplugin_nscp.so
#6  0xb2809e5f in CNSAdapter_JavaPlugin::GetJavaObject ()
   from /usr/java/jre1.6.0_01/plugin/i386/ns7/libjavaplugin_oji.so
#7  0xb58634cc in nsHTMLAppletElementSH::GetPluginJSObject (this=0x8d73998, 
    cx=0x8a6fd60, obj=0x8d7b180, plugin_inst=0x8d46c28, plugin_obj=0xbfffc5ac, 
    plugin_proto=0xbfffc5a8) at ../../../../mozilla/dom/src/base/nsDOMClassInfo.cpp:9116
#8  0xb5862d38 in nsHTMLExternalObjSH::PostCreate (this=0x8d73998, wrapper=0x8d72718, 
    cx=0x8a6fd60, obj=0x8d7b180)
    at ../../../../mozilla/dom/src/base/nsDOMClassInfo.cpp:8867
#9  0xb5438565 in nsObjectFrame::NotifyContentObjectWrapper (this=0xaf25e02c)
    at ../../../mozilla/layout/generic/nsObjectFrame.cpp:2173

So this is a hang inside the plug-in itself.  Have you filed a bug on Sun?

The only reason the adblock thing is relevant here is a timing issue -- the JS object wrapper for the object exists before the plugin is instantiated.  You could get the same result without adblock by having the <object> start out as display:none, and then from script toggling its display to "inline".  That should hang as well, even if adblock is not installed.  Again, the key is that we ask the plug-in for its JSObject, and it hangs instead of returning one... and that's not something we can fix in the browser.
This hangs both trunk and branch, whether adblock is installed or not, as expected.
Invalid as filed (since there is nothing to really backport, and since the reasons for asking for the backport are based on incorrect assumptions).

Please do file a bug on Sun to fix this but in the plug-in!
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Hey Boris,

I wanted to thank you for providing the stack-trace and the testcase that does not use adblock. I have forwarded this issue back to Sun.

Thanks again!
Gili
Guys, there are tons of bug reports in Bugzilla which discuss applets hanging the browser and are probably duplicates of this issue. Whoever is in charge of reviewing bug reports should probably set them all to duplicate and point back to this issue.

The related BugParade issue can be found here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6540719
Duplicate of this bug: 332185
gili: if you want to use this bug to track the bug you discovered in Sun's JRE as it affects firefox users, please change the summary.  i think it would be clearer, though, if you just filed a new bug for that purpose.

re: bug 332185, what makes you think this is a dupe of it?  just because both sites make your browser hang and they both use java doesn't mean the root cause is the same java bug.  i'd undupe them until you know they are the same.
Anytime you hit a website containing an applet which hangs the browser right away open up the Java Console. If the first error you see is a ClassNotFoundException (example below) then it is a result of the aforementioned Sun Java Plugin bug.

Here is the exception I see for bug 332185:

load: class TotalNEWSfeed.class not found.
java.lang.ClassNotFoundException: TotalNEWSfeed.class
[snip]
Summary: Please backport fix for bug #315841 to FireFox 2.x → Java Plugin bug hangs FireFox if page contains broken link to an applet
OK.  if you want to use this bug to track the Sun bug as it affects firefox users, so be it :)

Version -> Trunk
OS, Hardware -> All
URL -> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6540719
Status: RESOLVED → UNCONFIRMED
OS: Windows XP → All
Hardware: PC → All
Resolution: INVALID → ---
Version: 1.8 Branch → Trunk
the java bug tracker says this had been fixed.  closing.  feel free to re-open.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago13 years ago
Resolution: --- → FIXED
This was not a browser code fix, so really should have been Tech Evangelism or resolved as WORKSFORME...
Resolution: FIXED → WORKSFORME
It may be a java bug, but other browsers appear to handle this bug better, and eventually recover. Firefox seems to hang indefinitely. Try the tags <applet code=y onerror>
On mac version of FF only.
(In reply to superevr from comment #20)
> It may be a java bug, but other browsers appear to handle this bug better,
> and eventually recover. Firefox seems to hang indefinitely. Try the tags
> <applet code=y onerror>
You need to log in before you can comment on or make changes to this bug.