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.
Summary: | IllegalStateException: Should not acquire Children.MUTEX while holding ProjectManager.mutex() | ||
---|---|---|---|
Product: | projects | Reporter: | Jesse Glick <jglick> |
Component: | Maven | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | giorgio42, jtulach |
Priority: | P2 | Keywords: | THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 172143 |
Bug Depends on: | 192051 | ||
Bug Blocks: | 156972 | ||
Attachments: | stacktrace |
Description
Jesse Glick
2010-08-25 14:47:46 UTC
Created attachment 101663 [details]
stacktrace
Rather than okListener, use just storeListener which is invoked outside of AWT thread. For complex I/O operations that shall be preferred solution anyway: # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -174,7 +174,7 @@ Lookup context = Lookups.fixed(new Object[] { project, handle}); Dialog dialog = ProjectCustomizer.createCustomizerDialog("Projects/org-netbeans-modules-maven/Customizer", //NOI18N context, - preselectedCategory, listener, listener, null ); + preselectedCategory, null, listener, null ); dialog.addWindowListener( listener ); listener.setDialog(dialog); dialog.setTitle( MessageFormat.format( @@ -298,7 +298,6 @@ // Listening to OK button ---------------------------------------------- public void actionPerformed( ActionEvent e ) { - if (SwingUtilities.isEventDispatchThread()) { if ( dialog != null ) { dialog.setVisible(false); dialog.dispose(); @@ -321,7 +320,6 @@ } } } - } else { try { project.getProjectDirectory().getFileSystem().runAtomicAction(new FileSystem.AtomicAction() { public void run() throws IOException { @@ -334,7 +332,6 @@ //TODO error reporting on wrong model save } } - } // Listening to window events ------------------------------------------ Original fix does not appear to have worked? That patch does not work. (1) A null OK listener is illegal. (2) Cannot call dialog.setVisible etc. off EQ. (3) XAM requires transactions to be finished in the same thread as the one which started them, in case EQ. This is not a "complex I/O operation", it is saving edits to a single *.xml file. The real problem is DataNode$PropL.propertyChange, which acquires a mutex from a callback, which is very dangerous; should post Node changes asynchronously. Anything else is just a workaround. core-main #d010676c0380 Integrated into 'main-golden', will be available in build *201010160000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/d010676c0380 User: Jesse Glick <jglick@netbeans.org> Log: #189854: IllegalStateException: Should not acquire Children.MUTEX while holding ProjectManager.mutex() *** Bug 175883 has been marked as a duplicate of this bug. *** |