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 54222 - AssertionError: Document was locked
Summary: AssertionError: Document was locked
Status: RESOLVED DUPLICATE of bug 51872
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-31 14:54 UTC by vtec
Modified: 2005-02-14 09:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vtec 2005-01-31 14:54:01 UTC
I am running build 200501271900 on JDK 1.5.0 update 1.

Sometimes when I do following in fast order
1] apply "Tools-->Synchronize" menu action
2] back in source editor I do type any key to goon
typing my code.

I get following assertion failed error, it seems
like the "Synchronize" did not accomplish some
kind of clean up properly.

java.lang.AssertionError: Document was locked
before starting the MDR transaction.
	at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.java:116)
	at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.java:227)
	at
org.netbeans.modules.java.bridge.ClassElementImpl.isClassOrInterface(ClassElementImpl.java:177)
	at
org.openide.src.ClassElement.isClassOrInterface(ClassElement.java:153)
	at
org.netbeans.modules.java.codesync.SourceConnectionSupport.createClassSyncCookie(SourceConnectionSupport.java:822)
	at
org.netbeans.modules.java.bridge.LangEnvImpl.findCookie(LangEnvImpl.java:133)
	at
org.netbeans.modules.java.bridge.DefaultLangModel.findElementCookie(DefaultLangModel.java:582)
	at
org.netbeans.modules.java.bridge.ElementImpl.getCookie(ElementImpl.java:905)
	at
org.openide.src.Element.getCookie(Element.java:113)
	at
org.openide.src.nodes.ElementNode.getCookie(ElementNode.java:270)
	at
org.openide.nodes.FilterNode.getCookie(FilterNode.java:741)
	at
org.netbeans.modules.java.ui.nodes.JavaSourceNodeFactory$OldElementNodeWithoutDO.getCookie(JavaSourceNodeFactory.java:319)
	at
org.openide.nodes.NodeLookup.addCookie(NodeLookup.java:60)
	at
org.openide.nodes.NodeLookup.updateLookupAsCookiesAreChanged(NodeLookup.java:122)
	at
org.openide.nodes.NodeLookup.beforeLookup(NodeLookup.java:89)
	at
org.openide.util.lookup.AbstractLookup.lookupItem(AbstractLookup.java:306)
	at
org.openide.util.lookup.ProxyLookup.lookupItem(ProxyLookup.java:159)
	at
org.openide.nodes.FilterNode$FilterLookup.lookupItem(FilterNode.java:1543)
	at
org.openide.util.actions.CookieAction.resolveSupported(CookieAction.java:137)
	at
org.openide.util.actions.CookieAction.doEnable(CookieAction.java:111)
	at
org.openide.util.actions.CookieAction.enable(CookieAction.java:101)
	at
org.openide.util.actions.CookieAction$1.run(CookieAction.java:230)
	at org.openide.util.Mutex.doEvent(Mutex.java:1024)
	at org.openide.util.Mutex.writeAccess(Mutex.java:330)
	at
org.openide.util.actions.CookieAction$CookiesChangeListener.propertyChange(CookieAction.java:228)
	at
org.openide.nodes.Node.fireOwnPropertyChange(Node.java:1046)
	at
org.openide.nodes.Node.fireCookieChange(Node.java:1021)
	at
org.openide.nodes.Node$LookupEventList.resultChanged(Node.java:1503)
	at
org.openide.nodes.FilterNode$FilterLookup$ProxyResult.resultChanged(FilterNode.java:1648)
	at
org.openide.util.lookup.AbstractLookup.notifyListeners(AbstractLookup.java:405)
	at
org.openide.util.lookup.ProxyLookup$R.resultChanged(ProxyLookup.java:415)
	at
org.openide.util.lookup.AbstractLookup$R.fireStateChanged(AbstractLookup.java:695)
	at
org.openide.util.lookup.AbstractLookup.notifyListeners(AbstractLookup.java:390)
	at
org.openide.util.lookup.AbstractLookup.removePair(AbstractLookup.java:196)
	at
org.openide.util.lookup.AbstractLookup$Content.removePair(AbstractLookup.java:886)
	at
org.openide.util.lookup.InstanceContent.remove(InstanceContent.java:66)
	at
org.netbeans.modules.java.ui.nodes.elements.ElementNode$DOListener.updateCookies(ElementNode.java:974)
	at
org.netbeans.modules.java.ui.nodes.elements.ElementNode$DOListener.propertyChange(ElementNode.java:965)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at
org.openide.loaders.DataObject.firePropertyChange(DataObject.java:797)
	at
org.openide.loaders.MultiDataObject.fireCookieChange(MultiDataObject.java:696)
	at
org.openide.loaders.MultiDataObject$3.stateChanged(MultiDataObject.java:750)
	at
org.openide.nodes.CookieSet.fireChangeEvent(CookieSet.java:148)
	at
org.openide.nodes.CookieSet.remove(CookieSet.java:68)
	at
org.netbeans.modules.java.JavaDataObject.removeSaveCookie(JavaDataObject.java:405)
	at
org.netbeans.modules.java.JavaEditor.notifyUnmodified(JavaEditor.java:223)
	at
org.openide.text.CloneableEditorSupport$4.run(CloneableEditorSupport.java:728)
	at
org.netbeans.editor.BaseDocument.render(BaseDocument.java:951)
	at
org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:710)
	at
org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:250)
	at
org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:519)
	at
org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:506)
	at
org.netbeans.modules.java.JavaEditor$Save.save(JavaEditor.java:230)
	at
org.openide.actions.SaveAction.performAction(SaveAction.java:47)
	at
org.openide.util.actions.NodeAction$3.run(NodeAction.java:440)
	at
org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
	at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:438)
	at
org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:788)
	at
javax.swing.JComponent.processKeyBindings(JComponent.java:2776)
	at
javax.swing.JComponent.processKeyEvent(JComponent.java:2693)
	at
java.awt.Component.processEvent(Component.java:5265)
	at
java.awt.Container.processEvent(Container.java:1966)
	at
java.awt.Component.dispatchEventImpl(Component.java:3955)
	at
java.awt.Container.dispatchEventImpl(Container.java:2024)
	at
java.awt.Component.dispatchEvent(Component.java:3803)
	at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:668)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:916)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:794)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:632)
	at
java.awt.Component.dispatchEventImpl(Component.java:3841)
	at
java.awt.Container.dispatchEventImpl(Container.java:2024)
	at
java.awt.Window.dispatchEventImpl(Window.java:1766)
	at
java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at
java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Daniel Prusa 2005-02-14 09:47:55 UTC

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