Closed Bug 377215 Opened 17 years ago Closed 17 years ago

Crash when loading Investools ProphetCharts since JEP 0.9.6.1 landed

Categories

(Plugins Graveyard :: Java (Java Embedding Plugin), defect)

PowerPC
macOS
defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: alqahira, Assigned: smichaud)

References

()

Details

(4 keywords)

Attachments

(3 files, 1 obsolete file)

Attached file crash log
STR:

1. Go to your investools account
2. Load the ProphetCharts
3. Accept the security dialogue
4. Watch Camino vanish just as "Applet inited" appears in the status bar

This was fine yesterday on branch, so it seems to be the JEP update.

I haven't had a chance to check Firefox yet to see if it crashes.

The crashlog isn't very helpful here, and this is behind a password, so if there's anything I can do to help debug this, Steven, please let me know.
Is there any way to reproduce this with a publicly accessible URL?

Without one, there isn't (of course) anything I can do.

You're crashing on the branch (not on the trunk)?  Which one?

The crash on thread 26 is very peculiar.  It looks like a recursion
problem.  But stacks made with the bundled JEP (whose debug symbols
have been stripped) are often at least slightly corrupt.  Please post
a stack made with a copy of JEP 0.9.6.1 that you've downloaded from my
Sourceforge site (and which is therefore unstripped).
I notice that you've got a couple of "input managers".  These are (as
a group) notoriously troublesome.  Have you been using them for long?
Does disabling them (removing them from the /Library/InputManagers/
folder) make any difference?

Ditto for your "Contextual Menu Items".
Both branch and trunk.  Branch crash just began today, which is the first JEP0961 build; I haven't tracked back when trunk began....

I've not added any CM Items or InputManagers recently (ChimericalConsole doesn't function when I run Camino in troubleshooting mode, anyway, and the ecamm thing only works in safari and has been installed for years).

I'll try with the unstripped JEP and see if it helps; this is the only Java applet that I use, but in a quick test of other applets (e.g. gemal.dk, Xerox Arabic app), only the ProphetCharts crash.
Smokey, I need as much information as you can provide, as soon as
possible.  Otherwise I won't be able to address this problem before
Firefox 2.0.0.4 and 1.5.0.12 come out.

Here are specific items, more or less in order of importance:

1. Do the crashes also happen in Firefox (or only in Camino)?  Please
   test on both branch and trunk.

2. Please attach crash logs made with the non-stripped JEP 0.9.6.1
   (downloaded from http://javaplugin.sourceforge.net/).

3. The prophet.net charts are available at a separate site
   (http://www.prophet.net/).  Are these the ones that you've been
   using via http://www.investools.com?  If so, I may be able to
   access them via prophet.net (since they have a 7-day free trial).
   But I need to know precisely which ones you've crashed on --
   prophet.net has three levels of subscription, and some charts may
   only be available at the more expensive levels.
One more thing:  Do you have any way to test on other versions of Mac
OS X (besides 10.3.9)?  If possible, I'd like to know if you crash
(with the prophet.net charts) on 10.4.9 or 10.2.8.
Steven, I've been swamped, but I should be able to get to all of these items this weekend :(
Thanks!
I can crash both 1.8(.1) and 1.8.0 branches and trunk, Firefox and Camino.  I also verified that the crash happens in a clean user account.  (I'm also trying to get a relative to check on 10.4, but no guarantees on that.)

With the JEP-with-symbols, I don't get any better crash logs, but a JavaNativeCrash log is now generated.  This attachment contains the crash log and JavaNativeCrash log for today's official Camino 1.8(.1) branch nightly with JEP 0.9.6.1-with-symbols, and a similar pair of logs for my trunk Camino debug build.

I'm not sure how helpful they are going to be, but I think I have discovered something else that may be helpful.
You new log(s) actually are helpful -- particularly the
JavaNativeCrash parts.  They don't clinch the problem, but at least
they give more detail about what I'd already guessed was a recursion
crash.  And it helps that they have line numbers for JEP code.  But
most importantly, I have a lot more confidence they don't contain
crazy corruptions.

I can now predict that these crashes won't happen on OS X 10.4.X, but
might happen on 10.2.8 -- the code where they occur is only used on
10.3.X and 10.2.8.  So testing on 10.4.X is less urgent.

But I _really_ need to have more information about which charts you
crash on, so I know where to look when I do prophet.net's seven-day
free trial.

Thanks for the information you've given me so far, and thanks in
advance for the additional prophet.net info.

> but I think I have discovered something else that may be helpful

Something you haven't yet discussed here?  Let us know.
Smokey has now given me (in private email) a way to trigger his crash
without being logged in to his investools account.  But his method
still (potentially) exposes sensitive information, so he's not going
to post it here.

Thanks, Smokey!  Now that I have a way to reproduce the problem, it
shouldn't be too long before I find a fix.
I've figured out that these crashes are caused by a subtle (but still
dumb) mistake on my part.  Here's a patch to JEP 0.9.6.1 that fixes
the problem.

Smokey, are you up to rebuilding the JEP with this patch (for testing
purposes)?  You'd only need to do it for Mac OS X 10.3.9 (and
targeting just one OS version is _much_ simpler than trying to target
them all).  I've revised the Building.txt doc (in the distro's
Source directory) as of JEP 0.9.6.1 ... so it should be a bit easier
to follow.

I've got to do my taxes :-(  So I'm not going to be able to spend any
more time on this today.  But early next week I'll do another round of
tests, and with luck I'll have a JEP 0.9.6.2 out by Tuesday or
Wednesday.

Just to make clear:  This problem effects all Mozilla.org browsers
using JEP 0.9.6.1 on OS X 10.3.X and 10.2.8.  It doesn't happen on OS
X 10.4.X or 10.5.

JEP 0.9.6.1 contains newly written code (used on OS X 10.3.X and
10.2.8) to wrap many Java threads' run() methods with calls to
allocate and release Objective-C autorelease pools -- to deal with
memory leaks (caused by Apple bugs) on these OSs.  But my code made an
unwarranted assumption -- that none of these run() methods would ever
call super.run() (or its equivalent).  Calling super.run() from a
Thread object's run() method is completely useless, and I'm quite sure
very few applets do this (though the prophet.net applet that Smokey
uses is one example).  But if they do, JEP 0.9.6.1 (on OS X 10.3.X and
10.2.8) will go into an infinite loop and crash.  My patch works
around this edge case.
Assignee: nobody → smichaud
Flags: blocking1.8.1.4?
Flags: blocking1.8.0.12?
Product: Camino → Core
QA Contact: plugins → plugins
Assuming I've compiled the JEP+patch correctly, I have some good news and some bad news.  The good news is that the applet indeed no longer crashes.  However, it seems there may have been another problem lurking, too: the applet now is unable to ever finish loading :(  

(That is, it used to crash with 0.9.6.1 when it would first draw stuff to the screen; the first things it draws is a "splash screen" of sorts where it gives the "ProphetCharts RC 235" version and draws a progress bar-like thing, before it eventually loads the actual chart.  It's at this progress bar screen where I get "stuck" now, even giving it several minutes beyond the minute or so it took to finish with JEP 0.9.6.)
I saw something like this myself with your test case (the one you sent
me), after I'd patched the crash bug.  I figured it was just an
artifact of not being logged in.  Tomorrow I'll test more thoroughly.

It's possible that I misunderstood what the prophet.net applet is
doing (I disassembled it, but the source code is all obfuscated).

(The best way to confirm that you have a "valid" JEP is (of course) to
test it out on various sites -- like gemal.dk (which you can get to
from about:plugins), weather.gov, and other sites from my list at bug
371084 comment #3.)
You should see a "ProphetCharts was unable to log on" dialogue when the applet works with my testcase, or at least I did when I tested it with JEP 0.9.6.  This dialogue actually appeared before the "splash screen" stuff would even draw (with 0.9.6).

I tested the JEP+patch I built with a number of the sites from bug 371084 comment 3 and it worked with all of them, so it looks like I built it properly :)
Smokey, here's another patch to try (it's against JEP 0.9.6.1).

With this patch I see the "unable to log on" message (as I also do
using your test case with JEP 0.9.6).

> Calling super.run() from a Thread object's run() method is completely
> useless

This is still true.  But it turns out that the recursion crashes also
happen with Thread subclass objects.  And it's possible (though very
unusual) to construct a Thread subclass object in such a way that
calling super.run() in its run() method actually does something.  My
new patch allows for this possibility.

(In fact the prophet.net recursion crashes always happen with Thread
subclass objects ... and I didn't notice this because I didn't believe
it was possible.)
Attachment #261609 - Attachment is obsolete: true
Blocking for either a fix or a back-out of the new JEP on the branches.
Flags: blocking1.8.1.4?
Flags: blocking1.8.1.4+
Flags: blocking1.8.0.12?
Flags: blocking1.8.0.12+
Comment on attachment 261688 [details] [diff] [review]
JEP patch that fixes this problem (rev1)

Steven, this patch seems to work perfectly with the Investools ProphetCharts in some quick testing with today's Camino 1.1b+ (1.8branch) build :)  Thanks for the quick turn-around on this!

I'll do some more extensive testing later today with other branches and products, but I wanted to let everyone know right away that this patch (and a JEP 0.9.6.2 based on it) looks like a winner.
Glad to hear it!

I'll be testing through the rest of the day.  If all goes well I
should be able to release JEP 0.9.6.2 (containing this fix) tomorrow.
I've just released JEP 0.9.6.2, which fixes this bug.  For more info
see bug 377779.
Component: Plug-ins → Java Embedding Plugin
QA Contact: plugins → java.jep
Depends on: 377779
Josh has checked bug 377779 in everywhere, so this is FIXED.  I've verified that this morning's Camino 1.8-branch nightly no longer crashes when trying to load the charts.  I believe I've verified trunk already, but I'll re-verify it and do 1.8.0 later today.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Trunk and 1.8.0 are fine, too, so the fixed JEP was successfully checked in properly ;)
Marking verified on both branches and trunk, per Smokey.
Status: RESOLVED → VERIFIED
Component: Java Embedding Plugin → Java (Java Embedding Plugin)
Product: Core → Plugins
Product: Plugins → Plugins Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: