This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In dev build #200311231900 when you do a graphical diff, the IDE will deadlock. Several exceptions will be thrown: java.lang.IllegalStateException: This must happen in the event thread! This started to happen after changes in the window system. It's necessary to go through the whole codebase and: 1) Mark all actions that open GUI as not asychronous, 2) Find all places where TopComponents are opened and assure that this is done in AWT thread.
Created attachment 12273 [details] The deadlock after PVCS -> Diff
This is really a critical issue, the VCS support is seriously broken. Starting to work on it immediately...
This problem was already solved for several actions: /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/VersioningExplorerAction.java,v <-- VersioningExplorerAction.java new revision: 1.12; previous revision: 1.10 /cvs/vcscore/src/org/netbeans/modules/vcscore/runtime/CommandOutputTextViewAction.java,v <-- CommandOutputTextViewAction.java new revision: 1.4; previous revision: 1.2 /cvs/vcscore/src/org/netbeans/modules/vcscore/runtime/CommandOutputViewAction.java,v <-- CommandOutputViewAction.java new revision: 1.9; previous revision: 1.7 http://vcscore.netbeans.org/source/browse/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandSupport.java.diff?r1=1.27&r2=1.28
Fixed for actions that extend CallableSystemAction and NodeAction: /cvs/vcscore/src/org/netbeans/modules/vcscore/grouping/VcsGroupMenuAction.java,v <-- VcsGroupMenuAction.java new revision: 1.16; previous revision: 1.15 /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/VcsSettingsAction.java,v <-- VcsSettingsAction.java new revision: 1.11; previous revision: 1.10 /cvs/vcscore/src/org/netbeans/modules/vcscore/annotation/AddVariableAction.java,v <-- AddVariableAction.java new revision: 1.4; previous revision: 1.3 /cvs/vcscore/src/org/netbeans/modules/vcscore/annotation/AddIfDefinedAction.java,v <-- AddIfDefinedAction.java new revision: 1.4; previous revision: 1.3 /cvs/vcscore/src/org/netbeans/modules/vcscore/annotation/AddTextAction.java,v <-- AddTextAction.java new revision: 1.3; previous revision: 1.2 /cvs/vcscore/src/org/netbeans/modules/vcscore/runtime/KillRunningCommandAction.java,v <-- KillRunningCommandAction.java new revision: 1.5; previous revision: 1.4 /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/VcsMountFromTemplateAction.java,v <-- VcsMountFromTemplateAction.java new revision: 1.17; previous revision: 1.16 /cvs/vcscore/src/org/netbeans/modules/vcscore/grouping/RemoveVcsGroupAction.java,v <-- RemoveVcsGroupAction.java new revision: 1.9; previous revision: 1.8 /cvs/vcscore/src/org/netbeans/modules/vcscore/grouping/AddVcsGroupAction.java,v <-- AddVcsGroupAction.java new revision: 1.9; previous revision: 1.8 /cvs/vcscore/src/org/netbeans/modules/vcscore/VcsRevisionAction.java,v <-- VcsRevisionAction.java new revision: 1.6; previous revision: 1.5
GeneralCommandAction made synchronous (this have an impact on a bunch of other actions that extends this one): /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/GeneralCommandAction.java,v <-- GeneralCommandAction.java new revision: 1.21; previous revision: 1.20 /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/CommandActionSupporter.java,v <-- CommandActionSupporter.java new revision: 1.4; previous revision: 1.3
Fixed for VcsGeneric module (diff component must be opened in AWT): /cvs/vcsgeneric/src/org/netbeans/modules/vcs/profiles/commands/AbstractDiffCommand.java,v <-- AbstractDiffCommand.java new revision: 1.4; previous revision: 1.3 All profiles must be checked and also Diff module.
Fixed in diff module: /cvs/diff/src/org/netbeans/modules/diff/DiffAction.java,v <-- DiffAction.java new revision: 1.16; previous revision: 1.15 /cvs/diff/src/org/netbeans/modules/diff/PatchAction.java,v <-- PatchAction.java new revision: 1.14; previous revision: 1.13
Fixed for conflict resolvers in CVS and PVCS profiles: /cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsResolveConflicts.java,v <-- CvsResolveConflicts.java new revision: 1.11; previous revision: 1.10 /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsResolveConflicts.java,v <-- PvcsResolveConflicts.java new revision: 1.2; previous revision: 1.1 The problem is hopefully fixed everywhere (in VCS + Diff modules).
This problem was not fully fixed when calling methods on TopComponents. There's still a problem with method calls outside of AWT thread in build #200312071900: [catch]java.lang.IllegalStateException: Assertion failed. WindowsAPI is required to be called from AWT thread only, see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/threading.html at org.netbeans.core.windows.WindowManagerImpl.assertEventDispatchThreadWeak(WindowManagerImpl.java:875) at org.netbeans.core.windows.WindowManagerImpl.topComponentIconChanged(WindowManagerImpl.java:807) at org.openide.windows.TopComponent.setIcon(TopComponent.java:558) at org.netbeans.modules.vcscore.commands.CommandOutputVisualizer.<init>(CommandOutputVisualizer.java:72) at org.netbeans.modules.vcscore.cmdline.UserCommandTask.getVisualizerText(UserCommandTask.java:358) ... [catch]java.lang.IllegalStateException: Assertion failed. WindowsAPI is required to be called from AWT thread only, see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/threading.html at org.netbeans.core.windows.WindowManagerImpl.assertEventDispatchThreadWeak(WindowManagerImpl.java:875) at org.netbeans.core.windows.WindowManagerImpl.topComponentDisplayNameChanged(WindowManagerImpl.java:789) at org.openide.windows.TopComponent.setName(TopComponent.java:508) at org.netbeans.modules.vcscore.commands.CommandOutputVisualizer.setVcsTask(CommandOutputVisualizer.java:123) ... [catch]java.lang.IllegalStateException: Assertion failed. WindowsAPI is required to be called from AWT thread only, see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/threading.html at org.netbeans.core.windows.WindowManagerImpl.assertEventDispatchThreadWeak(WindowManagerImpl.java:875) at org.netbeans.core.windows.WindowManagerImpl.topComponentDisplayNameChanged(WindowManagerImpl.java:789) at org.openide.windows.TopComponent.setDisplayName(TopComponent.java:522) at org.netbeans.modules.vcscore.commands.CommandOutputVisualizer.setVcsTask(CommandOutputVisualizer.java:141) ... This problem is fixed in trunk: /cvs/vcscore/src/org/netbeans/modules/vcscore/commands/CommandOutputVisualizer.java,v <-- CommandOutputVisualizer.java new revision: 1.27; previous revision: 1.26
I believe it's fixed, No deadlocks since that related to this one