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 94901 - NSEE from UndoManager.addItem
Summary: NSEE from UndoManager.addItem
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL: http://deadlock.nbextras.org/hudson/j...
Keywords: RANDOM, TEST
: 93340 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-07 23:11 UTC by Jesse Glick
Modified: 2007-08-14 12:36 UTC (History)
3 users (show)

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 Jesse Glick 2007-02-07 23:11:56 UTC
See URL:

java.util.NoSuchElementException
	at java.util.LinkedList.getFirst(LinkedList.java:109)
	at
org.netbeans.modules.refactoring.spi.impl.UndoManager.addItem(UndoManager.java:252)
	at
org.netbeans.modules.refactoring.spi.impl.UndoManager.addItem(UndoManager.java:238)
	at
org.netbeans.modules.refactoring.api.RefactoringSession.doRefactoring(RefactoringSession.java:100)
	at
org.netbeans.modules.refactoring.spi.impl.ParametersPanel$8.run(ParametersPanel.java:328)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963)
Comment 1 Jiri Skrivanek 2007-02-08 07:55:34 UTC
The test does this:

- call cut action on java node
- call paste action on package node
- confirm Move Class dialog but at this point it failed and class was not moved
Comment 2 Jesse Glick 2007-02-08 17:43:35 UTC
*** Issue 93340 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2007-02-12 15:56:02 UTC
This is just consequence of the Exception before:
org.openide.filesystems.FileAlreadyLockedException:
hudson/workdir/jobs/trunk-nightly/workspace/xtest/instance/work/sys/ide/SampleProject/src/sample1/SampleClass11.java
[ideTestRunner] 	at org.netbeans.modules.masterfs.Delegate.lock(Delegate.java:175)
[ideTestRunner] 	at
org.netbeans.modules.masterfs.MasterFileObject.lock(MasterFileObject.java:165)
[ideTestRunner] 	at
org.openide.loaders.MultiDataObject$Entry.takeLock(MultiDataObject.java:1096)
[ideTestRunner] 	at org.openide.loaders.FileEntry.move(FileEntry.java:82)
[ideTestRunner] 	at
org.openide.loaders.MultiDataObject.handleMove(MultiDataObject.java:587)
[ideTestRunner] 	at org.openide.loaders.DataObject$2Op.run(DataObject.java:630)
[ideTestRunner] 	at org.openide.loaders.DataObject$1WrapRun.run(DataObject.java:776)
[ideTestRunner] 	at
org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:202)
[ideTestRunner] 	at
org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:98)
[ideTestRunner] 	at
org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:471)
[ideTestRunner] 	at
org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java:214)
[ideTestRunner] 	at
org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:796)
[ideTestRunner] 	at org.openide.loaders.DataObject.move(DataObject.java:636)
[ideTestRunner] 	at
org.netbeans.modules.refactoring.plugins.FileMovePlugin$MoveFile$1.commit(FileMovePlugin.java:97)
[ideTestRunner] 	at
org.netbeans.modules.refactoring.api.RefactoringSession.doRefactoring(RefactoringSession.java:94)
[ideTestRunner] 	at
org.netbeans.modules.refactoring.spi.impl.ParametersPanel$8.run(ParametersPanel.java:328)
[ideTestRunner] 	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541)
[ideTestRunner] 	at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963)

Have no idea how to reproduce.
Comment 5 Jesse Glick 2007-02-23 17:39:45 UTC
Failed again in #2216.
Comment 6 Jesse Glick 2007-03-02 00:04:47 UTC
Failed again in #2281. Whether or not you can reproduce this, can you at least
make it stop breaking commit validation?
Comment 7 Jan Becicka 2007-03-16 16:45:14 UTC
The root of the problem seems to be in FileAlreadyLockedException. Refactoring
module does not explicitly lock files. It uses java/source module for file
content manipulation and DataObject.rename()/move for metadata manipulation. I
do not blame  anyone. I'm just asking you guys to evaluate this issue. I'm OOO
next week.

Similar FileAlreadyLockedException is thrown during refactoring tests. Ask Jirka
Prox.


Comment 8 Jan Becicka 2007-03-27 11:17:02 UTC
> Similar FileAlreadyLockedException is thrown during refactoring tests. Ask Jirka
Prox.

Exception in tests fixed. Problem was, that Trivial impl. of LifecycleManager
did not save modified objects.
Comment 9 Jan Becicka 2007-04-26 12:21:28 UTC
Did you see this issue recently?
Comment 10 Tomas Zezula 2007-04-26 13:37:04 UTC
Yes, I already read this. But I don't have more ideas. Probably turn on the
logging of FileObject.lock() FileLock.unlock() and try to reproduce it to see
who holds the lock.

Comment 11 Jan Becicka 2007-04-26 13:59:01 UTC
I meant "did anyone see this failure recently? Is this issue still valid?" :)
Comment 12 Jiri Prox 2007-04-26 14:08:41 UTC
The problems with tests are solved as was mentioned earlier
Comment 13 Jesse Glick 2007-04-26 19:07:17 UTC
I don't think I have seen it recently.
Comment 14 Jan Becicka 2007-04-27 10:24:27 UTC
Let's mark this issue as fixed. Please reopen if it appears again.