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 57119 - cvs: IllegalStateException thrown
Summary: cvs: IllegalStateException thrown
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: RANDOM, REGRESSION, THREAD
Depends on:
Blocks:
 
Reported: 2005-03-29 12:32 UTC by Pavel Rehak
Modified: 2006-03-24 12:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception (4.14 KB, text/plain)
2005-03-29 12:33 UTC, Pavel Rehak
Details
Another ISE originated in RequestProcessor. (1.66 KB, text/plain)
2005-04-11 16:07 UTC, Martin Entlicher
Details
The textual patch. (2.80 KB, patch)
2005-04-11 16:18 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Rehak 2005-03-29 12:32:54 UTC
Product Version       = NetBeans IDE Dev (Build 200503281924)
  Operating System      = Windows XP version 5.1 running on x86
  Java; VM; Vendor      = 1.6.0-ea; Java HotSpot(TM) Client VM 1.6.0-ea-b21; Sun 
---
It happens randomly, usually from Versioning view.

Steps to reproduce not 100%): (a bit complicated thought)
1) Start with clean userdir
2) Versioning | Versioning Manager | Add | CVS
3) Use clear workdir,
   pserver = qa-linux-s6
   user = test
   pwd = test
   port = 2401
   repository = /usr/local/CVSrepo
   command line CVS client
4) Select perform checkout, select all modules.
5) After checkout is finished switch to the Versioning view
   and expand JavaApplication2/src/javaapplication2
   and expand all versionins of Main.java
Exception is thrown.
Comment 1 Pavel Rehak 2005-03-29 12:33:41 UTC
Created attachment 21192 [details]
exception
Comment 2 Petr Hrebejk 2005-03-29 13:54:38 UTC
VCS doing something illegal?
Comment 3 Martin Entlicher 2005-03-29 15:38:10 UTC
Possibly yes, I'll check how the nodes and children are created...
Comment 4 Martin Entlicher 2005-04-08 16:17:11 UTC
This might be a regression, leaving still TM 4.1, will check the code...
Comment 5 Martin Entlicher 2005-04-11 15:51:55 UTC
Occurs quite often, not much problem to reproduce.
Really this is a regression in how the revision nodes are created.
Comment 6 Martin Entlicher 2005-04-11 16:07:25 UTC
Created attachment 21546 [details]
Another ISE originated in RequestProcessor.
Comment 7 Martin Entlicher 2005-04-11 16:17:20 UTC
This is a threading issue, there is a race condition due to missing
synchronizatoin. The getNodeDelegate() can be run concurrently from AWT and
RequestProcessor threads.

Upgrading to P2, it occurs quite often, is annoying and the fix is simple:

/cvs/vcscore/src/org/netbeans/modules/vcscore/versioning/RevisionList.java,v 
<--  RevisionList.java
new revision: 1.10; previous revision: 1.9
Comment 8 Martin Entlicher 2005-04-11 16:18:16 UTC
Created attachment 21547 [details]
The textual patch.
Comment 9 Pavel Rehak 2005-04-12 10:53:30 UTC
Verified with build 200504101930.
Comment 10 _ pkuzel 2005-04-13 16:55:56 UTC
nodeDelegatesWithoutChildren, nodeDelegatesWithChildren and existingChildren 
sync is OK, REVIEWED.

A little improvement would be to sync remove*() too. But these are not in
reality called.

Comment 11 Martin Entlicher 2005-04-13 17:31:20 UTC
Thanks for the review.
The additional synchronization is added in trunk for sure:

/cvs/vcscore/src/org/netbeans/modules/vcscore/versioning/RevisionList.java,v 
<--  RevisionList.java
new revision: 1.11; previous revision: 1.10


The fix is merged into release41 branch:

/cvs/vcscore/src/org/netbeans/modules/vcscore/versioning/RevisionList.java,v 
<--  RevisionList.java
new revision: 1.9.4.1; previous revision: 1.9