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.

Bug 58220

Summary: Regenerating build-impl.xml deadlocked IDE
Product: platform Reporter: _ lcincura <lcincura>
Component: TextAssignee: mslama <mslama>
Status: RESOLVED FIXED    
Severity: blocker CC: jglick
Priority: P4 Keywords: THREAD
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Thread dump

Description _ lcincura 2005-04-22 13:01:01 UTC
NetBeans IDE 4.1 RC1 [200504200735]  on jdk 1.5.0_03

I modified build-impl.xml externally (in NB editor, file was saved but not closed). Then I opened project 
properties, changed something and closed the dialog. I got message that build-impl.xml has to be 
regenerated. When regenerate started, IDE deadlocked.
Comment 1 _ lcincura 2005-04-22 13:04:12 UTC
Created attachment 21824 [details]
Thread dump
Comment 2 Jesse Glick 2005-04-22 16:55:31 UTC
*Never* edit build-impl.xml. Edit build.xml only. Since the bug is only known to
occur as a result of user error, lowering priority.

Re. cause of deadlock, I can see two things wrong:

1. Usual stupid CloneableEditorSupport behavior of spawning a task in a
different thread, then waiting for it to finish, rather than simply doing what
it needs to do synchronously. Until this is fixed, we will always have deadlocks.

2. Why is CES attempting to reload its document *while the editor window is
being closed*? Surely this is unnecessary.
Comment 3 _ lcincura 2005-04-25 09:09:52 UTC
Ad) *Never* edit build-impl.xml:
It is not corner use case. Usually when there is some error in the project, the
build fails with error in build-impl.xml. In output window user get link to the
error, so clicking the link is normal for users. This leads to opening the
build-impl.xml in editor. What can happen then is in my firts comment.
Comment 4 Jesse Glick 2005-04-25 18:22:43 UTC
"Usually when there is some error in the project, the build fails with error in
build-impl.xml. In output window user get link to the error, so clicking the
link is normal for users. This leads to opening the build-impl.xml in editor." -
yes, we are well aware of this already. Please see e.g. issue #41252 and issue
#42734.
Comment 5 Antonin Nebuzelsky 2008-04-17 15:15:17 UTC
Reassigning to new module owner mslama.
Comment 6 mslama 2009-04-30 13:55:56 UTC
CloneableEditor initialization is not synchronous now so this deadlock should be fixed. It means that if
CloneableEditor.componentShowing() is called from AWT thread it is not blocked by loading document by different thread /
waitFinished.