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 43401 - While doing cvs add: "AssertionError: Tried to set a selected component that was not in the array of open components."
Summary: While doing cvs add: "AssertionError: Tried to set a selected component that ...
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2004-05-17 22:41 UTC by Jesse Glick
Modified: 2008-12-22 19:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack traces (20.17 KB, text/plain)
2004-05-17 22:42 UTC, Jesse Glick
Details
ZIP of my Windows2Local dir (44.75 KB, application/octet-stream)
2004-05-17 22:43 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-05-17 22:41:08 UTC
I had three files selected (in the Projects tab),
and I right-clicked and selected CVS -> Add from
the context menu. I was prompted with the Advanced
dialog (note - just asked about the first file,
probably a VCS bug), clicked OK. All were added,
but then I got this assertion error. Continued to
get it every time I tried to click on any window.
Had to shut down to stop it.

VCS output window was not open at the time I ran
the command, nor was it opened afterwards. I think
it had been opened at some point in this IDE
session - not sure.
Comment 1 Jesse Glick 2004-05-17 22:42:06 UTC
Created attachment 14921 [details]
Stack traces
Comment 2 Jesse Glick 2004-05-17 22:43:19 UTC
Created attachment 14922 [details]
ZIP of my Windows2Local dir
Comment 3 Jesse Glick 2004-05-17 22:43:46 UTC
JDK 1.5.0b51, Linux, GTK.
Comment 4 Milos Kleint 2004-07-14 11:22:19 UTC
reassigning
Comment 5 Milos Kleint 2004-07-21 14:17:53 UTC
it seems that sometimes 2 different TC share the unique id:
the affected code is TopComponentSubModel.addOpenedTopComponent()
where the openedTopComponents are stored as instances but the selected
Tc is stored as id. - later when it's retrieved from the model, a
wrong TC is returned as selected.
I've added some asserts that should track the problem better given my
theory is correct.
issue #39914 seems to suffer from the similar problem.

The vcs code does some tricks to have only a singleton of the TC but I
didn't find any problem there.
The attached winsys user file also didn't reveal much.
Comment 6 Milos Kleint 2004-08-10 09:48:03 UTC
I've given it another try today, but with no success. I guess this one
is a waiver candidate.
Comment 7 Jesse Glick 2004-08-10 17:33:47 UTC
Have not seen this since then, I think.

Since I don't know how to reproduce, I would not necessarily expect a
fix. However I made this P2 because once the error does happen, the
recovery is poor: you have to shut down quickly since you get swamped
in error dialogs. Would be better for the window system to react more
robustly to whatever condition this is, and try to clean things up.
Comment 8 Milos Kleint 2004-09-02 09:22:35 UTC
waiver request
Comment 9 Milos Kleint 2004-09-06 09:34:19 UTC
waiver approved
Comment 10 Milos Kleint 2004-09-27 08:17:51 UTC
Lately I've fixed a problem with reentrant calls to the window system.
The problem was that some latr snapshot of the winsys state could be
processed before the earlier one and update the data structures for
the old one. Not really sure but it could be the cause of this bug as
well.
Comment 11 Milos Kleint 2004-12-15 09:34:20 UTC
this hasn't been reported ever since the September fix, so I assume it
really did help. Closing as fixed in the 4.1 timeframe. 
Comment 12 Zdenek Konecny 2005-07-08 13:47:19 UTC
I've marked it closed because it's too old. In current version (4.2 Build
200507061800) doesn't exist any CVS item in context menu which is invoked by
right click on some file in Projects tab. 
Comment 13 Zdenek Konecny 2005-07-14 14:41:27 UTC
Sorry, it's nonsence what I've written above but this issue is still too old and
it looks, it is working OK. I leave it marked as Closed.