View Single Post
Posts: n/a
Default 04-20-2007, 12:12 PM

Originally Posted by DrJim View Post
However, it does add more levels of hierarchy to the method call that must be retraced and "stabilized" (Dick, maybe you can say this better) when the method is stopped - a possible reason the "end abruptly" may cause the problem.
I'm going to take a pass on this and say that if the code is effectively sending a thread.stop message to the Java thread on which the event handler method is running, that is a clear violation of Sun's recommendations for multi-threaded programming. It is sort of like letting your teenager ride in a car with a drunk teenage driver. Anything can happen, and something bad probably will.

Whatever the cause, this sort of behavior is clearly a bug in Alice, as you, DrJim have demonstrated with some very simple sample programs. It simply shouldn't happen, and the bug should be avoided, just as your teenager should avoid getting into a car with a drunk teenage driver.

Please forgive my graphic language, but I'm trying to emphasize the seriousness of this bug. My advice is, don't use any of the while events and don't allow your students use them either, except possibly While the program is running. With that one, if an error occurs when the conditional goes false, you won't care because the program will have already terminated anyway.

Dick Baldwin
Reply With Quote