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 53308 - Add Column frezes IDE
Summary: Add Column frezes IDE
Status: CLOSED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
: 41529 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-12 16:48 UTC by Martin Schovanek
Modified: 2006-03-24 13:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (13.68 KB, text/plain)
2005-01-12 16:51 UTC, Martin Schovanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2005-01-12 16:48:12 UTC
[#2005011200, jdk1.4.2,
jdbc:oracle:thin:@qa-sol8-s3:1521:test1,
scott, tiger, classes12-92.zip]

to reproduce:
-------------
1) expand AAA table
2) right click the AAA node and chose Add Column
3) fill Add Column dialog:
Name: AA
Type: DECIMAL
Index: AAA_idx
4) click OK
NOTE: AA node appears in the column tree
5) click the AA column node
ERROR: IDE freezes in end-less loop, CPU usage is 100%

See attached thread dump.
Comment 1 Martin Schovanek 2005-01-12 16:51:02 UTC
Created attachment 19649 [details]
Thread dump
Comment 2 Martin Schovanek 2005-01-12 16:56:23 UTC
Reproducible on Linux platform too.

Deleting of the AA column node has the same effect.
Comment 3 Jiri Skrivanek 2005-01-13 08:03:19 UTC
Possibly it is connected to indexes and it is a duplicate of issue 41529.
Comment 4 Radko Najman 2005-02-18 11:41:56 UTC
*** Issue 41529 has been marked as a duplicate of this issue. ***
Comment 5 Radko Najman 2005-02-18 11:43:05 UTC
Jirka is probably right, it is connected to indexes.
Comment 6 Pavel Flaska 2005-03-01 15:44:13 UTC
There is a problem when computing hashCode value. All *NodeInfo
classes extend Hashtable and it again contains Vector. Computation of
hashCode comes in some cases to infinite loop. (Hashtable contains
machanism to prevent this problem, but Vector does not.) It is
relatively difficult to find the whole loop.

It is not newly introduced bug, the same problem is reproducible in
3.6 and 4.0 also. I will try to override hashCode() in ColumnNodeInfo,
where computation starts. (It will override also hashCode computation
for PrimaryColumnNodeInfo and IndexColumnNodeInfo.) As a side effect,
it should also help to improve performance. Will use column name
hashCode in *ColumnNodeInfo computation.
Comment 7 Pavel Flaska 2005-03-01 16:55:26 UTC
Fixed. Please try to verify. Thanks.

Checking in
src/org/netbeans/modules/db/explorer/infos/ColumnNodeInfo.java;
/cvs/db/src/org/netbeans/modules/db/explorer/infos/ColumnNodeInfo.java,v
 <--  ColumnNodeInfo.java
new revision: 1.32; previous revision: 1.31
done
Comment 8 Martin Schovanek 2005-03-10 18:07:08 UTC
v