Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-4361

Convert loadFileWaitTillLoaded to a promise

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.11.3.3, 2.12.0
    • Fix Version/s: 2.12.0
    • Component/s: Dev and Dep
    • Labels:
      None

      Description

      In 2.11.3.3 we occasionally get deadlocks in tests due to off-awt thread calls to awt methods:
         java.lang.Thread.State: BLOCKED (on object monitor)
              at java.awt.Component.setFont(java.desktop@11.0.19/Component.java:1932)
              - waiting to lock <0x00000000c1239508> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.setFont(java.desktop@11.0.19/Container.java:1777)
              at javax.swing.JComponent.setFont(java.desktop@11.0.19/JComponent.java:2769)
              at javax.swing.LookAndFeel.installColorsAndFont(java.desktop@11.0.19/LookAndFeel.java:209)
              at javax.swing.plaf.basic.BasicPanelUI.installDefaults(java.desktop@11.0.19/BasicPanelUI.java:77)
              at javax.swing.plaf.basic.BasicPanelUI.installUI(java.desktop@11.0.19/BasicPanelUI.java:62)
              at com.formdev.flatlaf.ui.FlatPanelUI.installUI(FlatPanelUI.java:69)
              at javax.swing.JComponent.setUI(java.desktop@11.0.19/JComponent.java:685)
              at javax.swing.JPanel.setUI(java.desktop@11.0.19/JPanel.java:150)
              at javax.swing.JPanel.updateUI(java.desktop@11.0.19/JPanel.java:126)
              at javax.swing.JPanel.<init>(java.desktop@11.0.19/JPanel.java:86)
              at javax.swing.JPanel.<init>(java.desktop@11.0.19/JPanel.java:95)
              at jalview.gui.Desktop.addProgressPanel(Desktop.java:2107)
              at jalview.gui.Desktop.startLoading(Desktop.java:2096)
              at jalview.io.FileLoader.run(FileLoader.java:302)
              at jalview.io.FileLoader._LoadFileWaitTillLoaded(FileLoader.java:233)
              at jalview.io.FileLoader.LoadFileWaitTillLoaded(FileLoader.java:186)
              at jalview.bin.Commands.processLinked(Commands.java:310)
              at jalview.bin.Commands.processArgs(Commands.java:131)
              at jalview.bin.Jalview.doMain(Jalview.java:841)

      In this case, moving _LoadFileWaitTillLoaded to another thread that does not contend with any locks on the calling thread should help.

        Attachments

          Activity

            People

            Assignee:
            jprocter James Procter
            Reporter:
            jprocter James Procter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: