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 126487 - AssertionError: JavaSource.runModificationTask called under Document write lock.
Summary: AssertionError: JavaSource.runModificationTask called under Document write lock.
Status: RESOLVED DUPLICATE of bug 117403
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jan Lahoda
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-01 12:47 UTC by unr303
Modified: 2008-02-01 12:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 23876


Attachments
ide log (431.80 KB, text/plain)
2008-02-01 12:48 UTC, unr303
Details

Note You need to log in before you can comment on or make changes to this bug.
Description unr303 2008-02-01 12:47:59 UTC
Code is 
// Дата последней ревизии  $Date: 2008-01-18 12:36:05 +0300 (Пт, 18 янв 2008) $
// Дата последней проверки        YYYY-MM-DD
package foo;

/**
 * TODO: требуется документирование
 */
public class Foo<A extends List<Integer>,B,C,D extends Set<Integer>> {
}
Fix imports -> exception. Before doing fix imports i had problems with http://www.netbeans.org/issues/show_bug.cgi?id=117403


Build: NetBeans IDE Dev (Build 200801290002)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: Windows XP, 5.1, x86
User comments: doing fix imports
STACKTRACE: (first 10 lines)
java.lang.AssertionError: JavaSource.runModificationTask called under Document write lock.
        at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:820)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.fixAllImports(JavaFixAllImports.java:257)
        at org.netbeans.modules.editor.java.JavaKit$JavaFixImports.actionPerformed(JavaKit.java:772)
        at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:290)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
Comment 1 unr303 2008-02-01 12:48:19 UTC
Created attachment 55908 [details]
ide log
Comment 2 Jan Lahoda 2008-02-01 12:57:58 UTC
Same root cause as issue #117403 - the ModificationResult.commit() tries to rollback the changes it did (using
BaseDocument.atomicUndo), but it fails due to the same problem, and so BaseDocument.atomicUnlock is never really called,
keeping the document locked.

*** This issue has been marked as a duplicate of 117403 ***