Menu

#255 java.lang.Error: Interrupted attempt to aquire read lock

1.7.2
closed
None
3
2014-11-09
2010-02-19
No

Had the following error once:

UncaughtException on thread class java.awt.EventDispatchThread:
java.lang.Error: Interrupted attempt to aquire read lock
at javax.swing.text.AbstractDocument.readLock(AbstractDocument.java:1376)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:896)
at javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(BasicTextAreaUI.java:103)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.JTextArea.getPreferredSize(JTextArea.java:617)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
at java.awt.Container.layout(Container.java:1421)
at java.awt.Container.doLayout(Container.java:1410)
at java.awt.Container.validateTree(Container.java:1507)
at java.awt.Container.validate(Container.java:1480)
at javax.swing.JViewport.validateView(JViewport.java:498)
at javax.swing.JViewport.scrollRectToVisible(JViewport.java:372)
at javax.swing.JComponent.scrollRectToVisible(JComponent.java:3065)
at javax.swing.text.DefaultCaret.adjustVisibility(DefaultCaret.java:268)
at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:1296)
at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:1270)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Had it happen with "yk.JahRoslav 1.1", but given how the bot is not in the stack trace I'd assume that it's guess it's in theory not specific to that bot. It seemed to occur one time after the WinException in https://sourceforge.net/tracker/?func=detail&aid=2952549&group_id=37202&atid=419486 when it seemed like Robocode was trying to clean up the battle.

Discussion

  • Alexander Schultz

    Forgot to add, version 1.7.2.0 Beta

     
  • Pavel Šavara

    Pavel Šavara - 2010-02-21

    To me it looks like we were in the process of cleanup/deconstruction of robot dialog log panel when event for scroll arrived from OS/mouse/keyboard. I think it's not related to robot/host but rather to battleListener/UI/synchronization.

    It's not critical probably, let's keep it open for while, if it will happen again.

     
  • Pavel Šavara

    Pavel Šavara - 2010-02-21

    Flemming, was there any change to scrolling recently ?

     
  • Flemming N. Larsen

    Hmm.. I made one change at least due to:

    Req [2641759] - Scrollable properties. The robot properties in the robot console are now scrollable.

    Here I changed ConsoleScrollPane:

    public void scrollToBottom() {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                getViewport().scrollRectToVisible(new Rectangle(0, 32767, 1, 1));
                getViewport().repaint();
            }
        });
    }
    

    Into:

    public void scrollToBottom() {
        textArea.setCaretPosition(textArea.getDocument().getLength());
    }
    

    I could be that we miss the SwingUtilities.invokeLater?

    Anyways, I will have a look into this one later.

     
  • Flemming N. Larsen

    Alex, are you still able to reproduce it? I can't reproduce this issue at all.

     
  • Alexander Schultz

    I haven't been able to no. Since I only saw it with yk.JahRoslav before... I'd suspect fixing the WinException bug before is hiding whatever this was.

     
  • Flemming N. Larsen

    I am almost convinced that this bug has vanished with the previous fix for WinException, as the console output could be "interrupted" due to an Error thrown with the WinException.

    In addition, the fix for bug [2970414] - "Occasionally losing the bit of text in the robot console" (https://sourceforge.net/tracker/?func=detail&aid=2970414&group_id=37202&atid=419486) should take care of the remaining issue, if it still existed.

     
  • Flemming N. Larsen

    Fixed in version 1.7.2.0 Beta 3. Please verify the fix. :-)

     
  • Flemming N. Larsen

    Fixed in version 1.7.2.0 Beta 3. Please verify the fix. :-)

    This one might not be fixed yet...

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.