Author Topic: RC5: WinX64 Java Debugger hang  (Read 4325 times)

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
RC5: WinX64 Java Debugger hang
« on: April 26, 2015, 07:52:06 PM »
I have repeatedly complained that SE19 Java debugging is broken and also filed a case with support, all with little traction.  SE17 was the last release where Java debugging worked reliably, but that's of no help since it does not support Java 8.

So, here is one more attempt to put a spotlight on the problem, which is that the SE Java debugger no longer shows when the debugee hits a breakpoint. It may work properly for a few times but then it no longer processes a JWDP breakpoint event and the debug UI acts as if the debugee is still running while it is really suspended. I can coerce the UI to show the breakpoint by doing something seemingly unrelated such as setting another breakpoint somewhere in the code.

To experience the problem, use the attached sample project. Set a breakpoint at line 11, then debug run (F5) the program. It should hit the breakpoint about once a second.  Continue to hit F5 when the breakpoint is reached (watch the status line at the bottom). Continue pressing F5 until the program no longer stops. It takes me anywhere from 2-10 F5's until it freezes.   

You can then set/clear a breakpoint at line 15. This will unleash the debugger and it will stop at line 11 and give you one more opportunity to press F5. Nonsensical, but I do this a lot just to get some primitive testing done.

Attached is the sample project, a copy of the JWDT trace, and a recording of the bug.

Marcel

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: RC5: WinX64 Java Debugger hang
« Reply #1 on: April 28, 2015, 06:00:07 PM »
FWIW, I've seen this happen as well, though I don't have such a nice repro.


It usually happens to me during startup of the debugger -- so I thought it was related to the problem where starting the debugger hangs sometimes.

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: RC5: WinX64 Java Debugger hang
« Reply #2 on: April 29, 2015, 02:53:50 PM »
@jporkathtc

The two are probably related.
I don't presume to know how the SE Java debugger works, but it seems to me that the view controller got miswired when the UI framework was replaced. The bug reported here as well as the fact that stepping (F10) is absolutely glacial point to some defect where the resulting event from the VM doesn't update the view.

I have run into startup problem as well, with at least 3 scenarios:
  • SE did not clean up from a previous debug run. The debugee VM is still running and/or the ntpinit instance that started it.  The task manager shows stray java and ntpinit instances that need to be manually terminated before you can run the debugger again.
  • You hit F5 and expect the debugee to run to some breakpoint you've set earlier, but it never hits it.  That's the same bug reported here
  • You hit F5 and the debugee starts to run but then never fully initializes. That's when I stop the debug session and end up with the leftover processes described above, indicating that SE wasn't able to shut down the VM. Clearing out the leftovers and retrying then usually works. I have not been able to trace this one, but it is clearly more prevalent with complex apps (e.g. Tomcat)

All of this has probably a common root cause.

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: RC5: WinX64 Java Debugger hang
« Reply #3 on: April 29, 2015, 10:59:54 PM »
Thanks for the complete test case.  That made it possible to reproduce the problem and fix it.  It will be fixed in our next release (not in 19.0.2, unless we create an RC6 build).

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: RC5: WinX64 Java Debugger hang
« Reply #4 on: April 29, 2015, 11:46:05 PM »
Thanks Dennis!
Because this is such a serious problem for me, I would be eager and willing to hand-patch my installation. Any chance to get those bits?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: RC5: WinX64 Java Debugger hang
« Reply #5 on: April 30, 2015, 12:11:16 AM »
19.0.2 RC5 was already promoted to final so there can't be and RC6. We are not expecting a 19.0.3 either because it's already pretty late in the year.

Thanks for posting an excellent example for reproducing this bug. This bug has been quite the squirmy  ;D Give us some time and we will try to figure out a way to build you a special binary if we can.
« Last Edit: April 30, 2015, 12:14:55 AM by Clark »

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: RC5: WinX64 Java Debugger hang
« Reply #6 on: April 30, 2015, 04:03:03 PM »
@Marcel  I am attaching a special hot fix for Windows 64-bit.

NOTE:  This fix is for Windows 64-bit ONLY.

To load this hot fix, you will need to start SlickEdit as Administrator  (Right click on the icon and select Run As Administrator...).  Then select Help > Product Updates > Load hot fix... in the usual manner and select the hot fix and apply it as usual.  Then close SlickEdit and restart normally.

If you do not run as Administrator the hot fix will refuse to load (and, as I've discovered, there will be a Slick-C stack in the hot fix loader).  So don't do that.

Alternatively, you can extract the copy of vsdebug.dll from the zip file and copy it directly to your "slickedit/win" installation directory.

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: RC5: WinX64 Java Debugger hang
« Reply #7 on: April 30, 2015, 05:10:09 PM »
Many thanks for the patch!  :D