When a method invocation is running while debugger is detached, this JDWP error is thrown after debugger is attached again and a method is invoked. To reproduce: A) In one terminal: 1) Unzip the attached project, 2) cd build/classes; java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8777 -cp . minc.Main B) In second terminal: 1) jdb -attach 8777 2) stop at minc.Main:34 3) "wait for breakpoint hit" 4) print m() 5) Press CTRL-C before the method invocation completes. (Treminal A will write "Method 'm' started 1 times and finished 0 times.") 6) Wait for "Method 'm' finished." message printed on terminal A 7) jdb -attach 8777 8) stop at minc.Main:34 9) "wait for breakpoint hit" 11) print m() 12) com.sun.jdi.InternalException: Unexpected JDWP Error: 502
|