Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hopelessly bad GC crash question



Glen Fisher wrote:

Alex Nicolaou wrote:
| I have an applet which reliably crashes the VM during garbage collection
| (at least, I presume it is during garbage collection because of the
| following message). For example:
| | objc: FREED(id): message finish sent to freed object=0x3ad3c0
| | Does anyone have any recommendations for debugging this (obviously I am
| in search of a workaround that will avoid the VM crashing)?


What have you done so far? What steps have you taken to isolate the problem?
What happens before the crash? How much can you change that and still have
the crash occur? Does it happen in *any* browser, or only particular ones?
Does it happen if you run the applet standalone (outside of a browser)? Does
it happen only after specific steps are taken, or does it happen no matter
what the user does?


Answering your questions in sequence:

"What have you done so far?":

I have been running this applet on Windows, Linux, and OS9 for the last 9 years. It runs in appletviewer and in Java-enabled browsers. It has been executed by more than 10,000 different users on more system configurations than I can count.

On Mac OS X (the specific version was provided), in the Java 1.4.2 VM (the specific version was provided), this applet invariably crashes with the message shown above after some slightly inconsistent period of use. The inconsistency is easily explained by the fact that the GC kicks in at different times.

"What steps have you taken to isolate the problem?"

I am looking for recommendations in this regard. I have run many dozens of Java programs on my Mac OS X box without hitting this GC bug, so I assume that the problem is not easily tackled by a divide-and-conquer approach. I do not know how to do even the most basic debugging action on OS X, which would be to have it tell me which java object 0x3ad3c0 corresponds to.

"Does it happen in *any* browser?"

It happens in both mozilla and safari and also in appletviewer. So far as I understand the architecture of the browsers and Mac OS X, this is no surprise at all as I believe that all of these methods are in fact using the exact same underlying VM. If you meant browsers other than Mac OS X browsers, then the answer is no, as the applet runs without fault on many other platforms.

"Does it happen if you run the applet standalone?"

In fact the code can be run as an application as well as in applet mode, and running it directly with java -jar ... also crashes the same way.

"Does it happen only if specific steps are taken ... or no matter what the user does?"

I have not verified but believe that if the user doesn't operate the applet the applet will not crash. I'll leave it running idle overnight and see. If the user operates the applet, the crash occurs. The applet in question is a game in which the user must click more than once per second while simultaneously pressing keys on the keyboard at intervals, so it is difficult to judge how many user actions are involved prior to the crash - I would guess a few hundred clicks and perhaps 90 keystrokes.

I continually marvel at the number of *developers* who apparently believe
that posting messages that say little more than "My program doesn't work.
How can I fix it?" will yield useful advice.


If you had paid attention to the subject line, you'll see that it says "Hopelessly bad GC crash question". I know it's a bad question, I'm not an idiot. On the other hand, it isn't like there's an FAQ out there that says "When your VM crashes during garbage collection, you can tell why the crash happened by doing X, Y, and Z". Because let's face it, the VM is not supposed to crash during GC, and since many thousands of objects are being collected at once it is rather difficult to narrow it down without causing the problem to disappear entirely.


thanks
alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Hopelessly bad GC crash question (From: Glen Fisher <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.