Here is the error I see quite often. Looks like a bug to me.
java.lang.ClassCastException: MyWorld cannot be cast to MyWorld
at __SHELL2.run(__SHELL2.java:5)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at greenfoot.localdebugger.LocalDebugger$QueuedExecution.run(LocalDebugger.java:271)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:502)
at greenfoot.core.Simulation.maybePause(Simulation.java:305)
at greenfoot.core.Simulation.runContent(Simulation.java:218)
at greenfoot.core.Simulation.run(Simulation.java:211)
I cannot repro it with 100% consistency, but I usually see that when I switch from code to the world view and right-click to test-execute a method.
I am teaching a group of kids and somebody would have that occur to them at least once or twice during the class. The only cure it to restart Greenfoot.
