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 171275 - [68cat] javax.swing.undo.CannotUndoException at javax.swing.undo.AbstractUndoableEdit.undo
Summary: [68cat] javax.swing.undo.CannotUndoException at javax.swing.undo.AbstractUndo...
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Miloslav Metelka
URL: http://statistics.netbeans.org/except...
Keywords:
: 176815 177956 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-01 17:45 UTC by Michel Graciano
Modified: 2010-04-11 23:16 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 3760


Attachments
stacktrace (1.33 KB, text/plain)
2009-09-01 17:45 UTC, Michel Graciano
Details
stacktrace (1.04 KB, text/plain)
2009-09-21 15:37 UTC, Michel Graciano
Details
stacktrace (3.27 KB, text/plain)
2009-09-21 18:33 UTC, Michel Graciano
Details
stacktrace (4.41 KB, text/plain)
2009-09-30 16:50 UTC, Petr Chytil
Details
stacktrace (1.03 KB, text/plain)
2009-10-14 14:38 UTC, aldobrucale
Details
stacktrace (1.04 KB, text/plain)
2009-11-13 09:59 UTC, misterm
Details
stacktrace (1.33 KB, text/plain)
2009-12-01 06:03 UTC, Ivan Sidorkin
Details
stacktrace (1.25 KB, text/plain)
2010-03-30 02:08 UTC, host
Details
stacktrace (1.25 KB, text/plain)
2010-03-30 13:42 UTC, stefan79
Details
stacktrace (2.40 KB, text/plain)
2010-04-02 13:26 UTC, laurin1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2009-09-01 17:45:43 UTC
Build: NetBeans IDE Dev (Build 200909010201)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, i386

User Comments:
GUEST: When try Subversion->Revert Modification

ramonrails: I refreshed my web page in the Flock browser and switched to NB for editing the HTML of that page

GUEST: when revert modify

rienko: Doing a find & replace over a bunch of rhtml files

giorgio42: Right after committing a JSP file to the CVS repository.

hmichel: Performed an cvs 'Revert Modification' action

GUEST: Attempt to revert local changes

gkbrown22: Starting Netbeans



Stacktrace: 
javax.swing.undo.CannotUndoException
        at javax.swing.undo.AbstractUndoableEdit.undo(AbstractUndoableEdit.java:93)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:42)
        at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2181)
        at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1814)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:330)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
Comment 1 Michel Graciano 2009-09-01 17:45:47 UTC
Created attachment 86928 [details]
stacktrace
Comment 2 Vitezslav Stejskal 2009-09-02 14:40:00 UTC
Any steps how to reproduce this? All reports in the exception reporter are from 6.0, 6.1 version. Only one is from
6.8dev (090901).
Comment 3 Michel Graciano 2009-09-21 15:37:36 UTC
Build: NetBeans IDE Dev (Build 200909190201)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, i386

User Comments: 


Stacktrace: 
javax.swing.undo.CannotUndoException
        at javax.swing.undo.AbstractUndoableEdit.undo(AbstractUndoableEdit.java:93)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:42)
        at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2181)
        at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1814)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:330)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
Comment 4 Michel Graciano 2009-09-21 15:37:39 UTC
Created attachment 88025 [details]
stacktrace
Comment 5 Michel Graciano 2009-09-21 18:33:22 UTC
Build: NetBeans IDE Dev (Build 200909190201)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, i386

User Comments: 
Trying to create an delegate method using the thint

Stacktrace: 
javax.swing.undo.CannotUndoException
        at javax.swing.undo.AbstractUndoableEdit.undo(AbstractUndoableEdit.java:93)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:42)
        at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2181)
        at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1814)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:330)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
Comment 6 Michel Graciano 2009-09-21 18:33:26 UTC
Created attachment 88044 [details]
stacktrace
Comment 7 Michel Graciano 2009-09-21 18:34:48 UTC
Trying to create an delegate method using the hint. I just have no steps to reproduce yet.
Comment 8 Petr Chytil 2009-09-30 16:50:36 UTC
Build: NetBeans IDE Dev (Build 2009-09-24_12-05-04 )
VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02-92, Java(TM) SE Runtime Environment, 1.6.0_15-b03-226
OS: Mac OS X, 10.5.8, x86_64

User Comments: 
Just opened existing ruby on rails application.

Stacktrace: 
javax.swing.undo.CannotUndoException
        at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:289)
        at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:69)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
        at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2181)
        at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1814)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:330)
Comment 9 Petr Chytil 2009-09-30 16:50:40 UTC
Created attachment 88616 [details]
stacktrace
Comment 10 aldobrucale 2009-10-14 14:38:51 UTC
Build: NetBeans IDE Dev (Build 200910100201)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, i386

User Comments: 
Selecting "make constructor private" from the editor's light bulb

Stacktrace: 
javax.swing.undo.CannotUndoException
        at javax.swing.undo.AbstractUndoableEdit.undo(AbstractUndoableEdit.java:93)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:42)
        at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2181)
        at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1814)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:330)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
Comment 11 aldobrucale 2009-10-14 14:38:57 UTC
Created attachment 89445 [details]
stacktrace
Comment 12 javydreamercsw 2009-10-27 18:19:03 UTC
Build 200910261401

I'm just fixing imports or using the hints to add the import.

<record>
  <date>2009-10-27T12:18:07</date>
  <millis>1256663887459</millis>
  <sequence>22301</sequence>
  <level>SEVERE</level>
  <thread>184</thread>
  <exception>
    <message>javax.swing.undo.CannotUndoException</message>
    <frame>
      <class>javax.swing.undo.AbstractUndoableEdit</class>
      <method>undo</method>
      <line>93</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.undo.CompoundEdit</class>
      <method>undo</method>
      <line>42</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.editor.BaseDocument$AtomicCompoundEdit</class>
      <method>undo</method>
      <line>2181</line>
      <file>${netBeansDir}modules/org-netbeans-modules-editor-lib.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.editor.BaseDocument</class>
      <method>breakAtomicLock</method>
      <line>1814</line>
      <file>${netBeansDir}modules/org-netbeans-modules-editor-lib.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.editor.GuardedDocument</class>
      <method>runAtomic</method>
      <line>333</line>
      <file>${netBeansDir}modules/org-netbeans-modules-editor-lib.jar</file>
    </frame>
    <frame>
      <class>org.openide.text.NbDocument</class>
      <method>runAtomic</method>
      <line>411</line>
      <file>${netbeans.home}modules/org-openide-text.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.api.java.source.ModificationResult</class>
      <method>commit</method>
      <line>231</line>
      <file>${netBeansDir}modules/org-netbeans-modules-java-source.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.api.java.source.ModificationResult</class>
      <method>commit</method>
      <line>194</line>
      <file>${netBeansDir}modules/org-netbeans-modules-java-source.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.java.hints.errors.ImportClass$FixImport</class>
      <method>implement</method>
      <line>353</line>
      <file>${netBeansDir}modules/org-netbeans-modules-java-hints.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.editor.hints.HintsUI$1</class>
      <method>run</method>
      <line>641</line>
      <file>${netBeansDir}modules/org-netbeans-spi-editor-hints.jar</file>
    </frame>
    <frame>
      <class>org.openide.util.RequestProcessor$Task</class>
      <method>run</method>
      <line>602</line>
      <file>${netbeans.home}lib/org-openide-util.jar</file>
    </frame>
    <frame>
      <class>org.openide.util.RequestProcessor$Processor</class>
      <method>run</method>
      <line>1084</line>
      <file>${netbeans.home}lib/org-openide-util.jar</file>
    </frame>
  </exception>
</record>
Comment 13 misterm 2009-11-13 09:59:37 UTC
Created attachment 91023 [details]
stacktrace
Comment 14 Ivan Sidorkin 2009-12-01 06:03:34 UTC
Created attachment 91919 [details]
stacktrace
Comment 15 masvacaquecarnero 2009-12-14 14:01:38 UTC
This is NOT solved. It happens to me every two minutes or so... very, very frustrating
See
http://statistics.netbeans.org/analytics/exception.do?id=318194
http://statistics.netbeans.org/analytics/exception.do?id=318196

I can't keep closing and re-opening editor windows. Please, please, pleaaaase provide a fix.
Comment 16 Miloslav Metelka 2010-01-06 06:43:18 UTC
I was unable to reproduce with the provided steps.
This seem like a race condition to me. Can anyone clarify whether it reliably fails in some of the mentioned scenarios or whether it's random? Thanks.
I thought the BaseDocument.breakAtomicLock() mechanism could be broken so I've added a test but I can't make the test to fail.  http://hg.netbeans.org/jet-main/rev/26e59fa45c3f
Comment 17 Quality Engineering 2010-01-07 23:45:03 UTC
Integrated into 'main-golden', will be available in build *201001080200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/26e59fa45c3f
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #171275 - Test added for BaseDocument.breakAtomicLock()
Comment 18 Vitezslav Stejskal 2010-02-18 08:57:39 UTC
I'm sorry, but I'm marking this as WORKSFORME until we find a reproducible usecase. Thanks
Comment 19 Vitezslav Stejskal 2010-02-18 09:01:35 UTC
*** Bug 176815 has been marked as a duplicate of this bug. ***
Comment 20 Vitezslav Stejskal 2010-02-18 09:02:29 UTC
*** Bug 177956 has been marked as a duplicate of this bug. ***
Comment 21 host 2010-03-30 02:08:39 UTC
Created attachment 96289 [details]
stacktrace
Comment 22 stefan79 2010-03-30 13:42:45 UTC
Created attachment 96348 [details]
stacktrace
Comment 23 laurin1 2010-04-02 13:26:41 UTC
Created attachment 96599 [details]
stacktrace
Comment 24 err 2010-04-11 22:23:22 UTC
I'm seeing this several times an hour now. Often times happens as part of code completion, and I have seen it in several other situations. Seems to be much more frequent over the last few days.

- Alt-Enter (bring up hint)
- Enter
Exception...

Product Version: NetBeans IDE Dev (Build 201004100201)
Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\erra\.netbeans\dev
Comment 25 err 2010-04-11 23:16:09 UTC
 Bug 183456 was dup'd from here, it is still active. Some of the stack traces I get go here, some there. Think it is the same bug.