I have the problem, that when I'm debugging programs with single stepping, often the UI freezes. I use oracle Java 8 on Windows 10 with 64 bit.
The problem seems to be, that when a jump occures and the text segment window needs to be updated, it fairly often happens. An example program is:
.text
jal L2
loop: addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
jal loop
L2: addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
L1: addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
addi t0,t0,1
bne t0,zero,loop
Sorry, maybe it could be smaller, it is important, that the text segment window need to scroll.
To trigger the problem you need to single step through the program. It runs fine with normal execution.
I have no full java develpoment environment available, but I connected jvisualvm, an got the following output of a thread dump:
Found one Java-level deadlock:
=============================
"RISCV":
waiting to lock monitor 0x000000001f628458 (object 0x00000006c28ef1f0, a java.awt.Component$AWTTreeLock),
which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
waiting to lock monitor 0x000000001f6283a8 (object 0x00000006c3711778, a javax.swing.plaf.metal.MetalCheckBoxUI),
which is held by "RISCV"
Java stack information for the threads listed above:
===================================================
"RISCV":
at javax.swing.plaf.metal.MetalUtils$GradientPainter.paint(Unknown Source)
- waiting to lock <0x00000006c28ef1f0> (a java.awt.Component$AWTTreeLock)
at javax.swing.plaf.metal.MetalUtils.drawGradient(Unknown Source)
at javax.swing.plaf.metal.MetalIconFactory$CheckBoxIcon.paintOceanIcon(Unknown Source)
at javax.swing.plaf.metal.MetalIconFactory$CheckBoxIcon.paintIcon(Unknown Source)
at javax.swing.plaf.metal.MetalRadioButtonUI.paint(Unknown Source)
- locked <0x00000006c3711778> (a javax.swing.plaf.metal.MetalCheckBoxUI)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.CellRendererPane.paintComponent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paintForceDoubleBuffered(Unknown Source)
at javax.swing.JViewport.paintView(Unknown Source)
at javax.swing.JViewport.windowBlitPaint(Unknown Source)
at javax.swing.JViewport.setViewPosition(Unknown Source)
at javax.swing.JViewport.scrollRectToVisible(Unknown Source)
at javax.swing.JComponent.scrollRectToVisible(Unknown Source)
at rars.venus.TextSegmentWindow.highlightStepAtAddress(TextSegmentWindow.java:508)
at rars.venus.TextSegmentWindow.highlightStepAtPC(TextSegmentWindow.java:488)
at rars.venus.run.RunStepAction.stepped(RunStepAction.java:104)
at rars.venus.run.RunStepAction$1.update(RunStepAction.java:83)
at java.util.Observable.notifyObservers(Unknown Source)
at rars.simulator.Simulator.notifyObserversOfExecution(Simulator.java:184)
at rars.simulator.Simulator.access$500(Simulator.java:51)
at rars.simulator.Simulator$SimThread.stopExecution(Simulator.java:244)
at rars.simulator.Simulator$SimThread.run(Simulator.java:441)
- locked <0x00000006c28116a8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)
"AWT-EventQueue-0":
at javax.swing.plaf.metal.MetalRadioButtonUI.paint(Unknown Source)
- waiting to lock <0x00000006c3711778> (a javax.swing.plaf.metal.MetalCheckBoxUI)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.CellRendererPane.paintComponent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
- locked <0x00000006c28ef1f0> (a java.awt.Component$AWTTreeLock)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
- locked <0x00000006c28ef1f0> (a java.awt.Component$AWTTreeLock)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1200(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Found 1 deadlock.
Hopefully, you can fix this. If you need further information, let me know.