Community
Participate
Working Groups
This bug is related to Bug 12966. 1. Import the example classes from the J2ME Wireless Toolkit (WTK) found in $WTK_HOME/apps/demos/classes 2. Place a method entry breakpoint on a method in the example.manyballs.ManyBalls class. 3. Launch the J2ME WTK gray phone emulator with the "ManyBalls" example with the following commandline and attach with a remote java launch config: emulator -Xdebug -Xdevice:DefaultGrayPhone -classpath ../apps/demos/classes:../lib/midpapi.zip -Xrunjdwp:transport=dt_socket,address=8000,server=y example.manyballs.ManyBalls 4. The following exception occurs: java.lang.InternalError: Got event of unknown type at org.eclipse.jdi.internal.request.EventRequestManagerImpl.findRequest(EventRe questManagerImpl.java:498) at org.eclipse.jdi.internal.event.EventImpl.read(EventImpl.java:153) at org.eclipse.jdi.internal.event.EventSetImpl.read(EventSetImpl.java:147) at org.eclipse.jdi.internal.event.EventQueueImpl.remove(EventQueueImpl.java:59) at org.eclipse.jdi.internal.event.EventQueueImpl.remove(EventQueueImpl.java:42) at org.eclipse.jdt.internal.debug.core.EventDispatcher.run(EventDispatcher.java :194) at java.lang.Thread.run(Thread.java:536) This exception is thrown while receiving the class prepare event for the ManyBalls class. The error message here is misleading. The problem isn't really an unknown event type, it's the fact that the ClassPrepareEvent is coming to us from the VM with a status of VERIFIED instead of PREPARED. Our ClassPrepareEventImpl.read(...) method says: if ((event.fStatus & ReferenceTypeImpl.JDWP_CLASS_STATUS_PREPARED) == 0) return null; EventImpl.read(...) gets this null result from the ClassPrepareEventImpl and passes it into EventRequestManagerImpl.findRequest(...) where the exception is thrown. There are at least three things to look at here: Why does the VM give us a ClassPrepareEvent for an unprepared class? Why do we return null from ClassPrepareEventImpl when we get a class status other than what we expect? Why do we return null from ClassPrepareEventImpl but not handle null in EventImpl.read(...)?
I don't think that Eclipse should drop the ClassPrepareEvent for an unprepared class by returning null.
I agree with Vickie that the code looks like it doesn't belong. I've removed the status check from ClassPrepareEventImpl.read(...) and sent email to the original implementor to double-check that there isn't some case which we're overlooking.
Darin, please verify.
Good.
Verified code change.
Fix released to 2.0.1 and HEAD (2.1)