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.
Summary: | ArrayIndexOutOfBoundsException: node has no children | ||
---|---|---|---|
Product: | platform | Reporter: | _ gtzabari <gtzabari> |
Component: | Explorer | Assignee: | t_h <t_h> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | ivan, jgrodnik, mmirilovic, pjiricka, sustaining, unr303 |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=3174 | ||
Issue Type: | DEFECT | Exception Reporter: | 3174 |
Attachments: |
stacktrace
stacktrace stacktrace ide log ide log stack traces stacktrace stacktrace stacktrace stacktrace stacktrace path for 61_fixes corrected patch for 61_fixes |
Description
_ gtzabari
2008-02-03 03:25:42 UTC
Created attachment 55959 [details]
stacktrace
THIS ISSUE HAS ALREADY 20 DUPLICATES *** Issue 126576 has been marked as a duplicate of this issue. *** Build: NetBeans IDE Dev (Build 200711050000) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments: Created attachment 56503 [details]
stacktrace
Build: NetBeans IDE Dev (Build 080218) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: SunOS, 5.10, x86 User Comments: debugging with watch window visible, variable using tree view open and visible in watch window, ran to new code that forced close of that variable tree. Created attachment 57584 [details]
stacktrace
Considering the number of duplicates (see also http://statistics.netbeans.org/analytics/detail.do?id=9728 http://statistics.netbeans.org/analytics/detail.do?id=3174), I'd say this is really a P2. This was also brought up on the dev@ruby.netbeans.org alias. Needs to be reevaluated, e.g. I don't see any comment from the responsible engineer stating whether he is able to reproduce. I am able to reproduce. It seems it is race condition during rebuilding tree in watches. Fix: http://hg.netbeans.org/core-main/rev/f01fe7fcada4 or http://hg.netbeans.org/main/rev/f01fe7fcada4 *** Issue 85770 has been marked as a duplicate of this issue. *** clean+build project -> exception Created attachment 59951 [details]
ide log
It looks like the exception is not fixed in NB 6.1 ... It was fixed for supplied case. I cannot reproduce it anymore. If possible, please provide steps how to reproduce. Invoking code completion Created attachment 60343 [details]
ide log
unr303, does it still happen? What file you are invoking th CC in? What project? Could you attach it to this issue? Could you try to run IDE with -J-Dname.of.the.Logger.level=100 and reproduce it. Then attach the messages.log again. thank you I dont believe i have reproducible test case. There seems to be an unintended side-effect to this fix. In sunstudio, we have hierarchies of bpts. If a bpt has two or more children, sometimes when I delete them the objects all go away but the root node is still visible in the TTV. One manifestation was that I see VisualizerEvent.Removed getting created but Removed.run() not getting called in the failing cases. I traced this to VisualizerNode.QP.run() and this: // #126560 - remove subsequent element after structural change if (r instanceof PropLeafChange && en.hasMoreElements()) { r = en.nextElement(); LOG.log(Level.FINER, "Removing {0}", r); // NOI18N } It seems that this code may delete events it shouldn't. I think the scenario I'm running into is if a delete of a parent is scheduled before the delete of a child. Then the removal of the child plus the above code cancels the delete of the parent. Alternative fix to avoid reported side-effect: http://hg.netbeans.org/core-main/rev/05699bd83401 Integrated into 'main-golden', available in NB_Trunk_Production #234 build Changeset: http://hg.netbeans.org/main/rev/05699bd83401 User: Tomas Holy <t_h@netbeans.org> Log: #126560: different fix to avoid reported side effects I checked against the trunk. The new fix seems to make the symptoms of bpts not getting deleted go away. I marking as fixed again - based on ivan last comment. Verification of this fix would be highly appreciated. This issue has been nominated for NB IDE 6.1 patch2 although it hasn't been verified by QE yet. If it isn't verified by 12-Jun-08, it's nomination will be removed. As there is no possibility to verify it in SS IDE based on NB trunk build I mark this issue as verified according to Ivan's last comment. The fix has been ported into the release61_fixes branch: http://hg.netbeans.org/release61_fixes/2d096485b5bc This is still happening, reopening. I've attached two instances that occurred during a debugging session. Highly possible that this is caused by a race condition in my cirumstance, as debugger was quite active at the time (logging breakpoints active and debuggee task running.) Created attachment 63363 [details]
stack traces
This was with a 20 June 2008 build from deadlock. I have spoken with t_h and it seems that this issue is partially fixed - there are some cases where the issue probably still appears, but we don't have steps to reproduce. It looks like the fix is not risky and should stay in the patch2. Tomasi, could you please confirm this. Thanks. Yes, the fix is valid for reported reproducible case. Unfortunately, it seems there is still some issue which we were not able to reproduce so far. Build: NetBeans IDE Dev (Build 200807040101) VM: Java HotSpot(TM) Server VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06 OS: Linux, 2.6.25-gentoo-r6, i386 User Comments: Build: NetBeans IDE Dev (Build 200807101204) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b22 OS: Windows Vista, 6.0, x86 User Comments: Debugging simple JSP file. Exception happened after "step in" action. Created attachment 64542 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200807101204) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b22 OS: Windows Vista, 6.0, x86 User Comments: Debugging simple JSP file. Exception happened after "step in" action. Created attachment 64543 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200807101204) VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02 OS: Windows XP, 5.1, x86 User Comments: Stepping through Debugger Created attachment 64767 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200807170007) VM: Java HotSpot(TM) 64-Bit Server VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06 OS: Windows Vista, 6.0, amd64 User Comments: tried to select the option that allows one to customize the icons on the menu/tool bar. Created attachment 65074 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200807291401) VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_05-b13-52, Java(TM) SE Runtime Environment, 1.6.0_05-b13-120 OS: Mac OS X, 10.5.4, x86_64 User Comments: Adding reference to a schema via schema view. Exception occured expanding nodes under "By File" Stacktrace: java.lang.ArrayIndexOutOfBoundsException: 1 >= 1 at java.util.Vector.elementAt(Vector.java:427) at javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:230) at javax.swing.tree.VariableHeightLayoutCache.treeNodesRemoved(VariableHeightLayoutCache.java:543) at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesRemoved(BasicTreeUI.java:3815) at javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(DefaultTreeModel.java:530) at javax.swing.tree.DefaultTreeModel.nodesWereRemoved(DefaultTreeModel.java:310) Created attachment 65975 [details]
stacktrace
This issue has already 100 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=9728 This should be fixed by 9ab9cf9055a9. I noticed this latest fix is in the visualizer ... Has the viewmodel pkg used by debuggers migrated off of TTV to the new visualizer yet? Please note that NetBeans 6.1 Patch3 cut-off is going to happen on close of business August 5th. If you would like to have bugfix for this issue as part of NetBeans 6.1 Patch3, then this issue must have information about bugfix' trunk changeset and it's status must be "VERIFIED". ivan: I am not sure I understand what you mean by new visualizer. AFAIK debugger is still using TTV. The fix itself is in VisualizerChildren. the exception haven't appeared from the last fix. I'm marking as VERIFIED to make it available for patch. However I'd like to ask Ivan or t_h if they are satisfied with the fix. It looks like the changeset http://hg.netbeans.org/main/rev/9ab9cf9055a9 seems to be completely inapplicable against release61_fixes repository. Reasons: #1 5 out of 5 hunks FAILED to apply in VisualizerChildren.java #2 1 out of 1 hunk FAILED to apply in VisualizerNode.java #3 6 out of 6 hunks FAILED to apply in non-existing file EntrySupport.java It looks like there was significant refactoring, please advise how to fix this in release61_fixes repository. Created attachment 66591 [details]
path for 61_fixes
I think fix is OK to go to patch 6.1 The main symptom I had experienced was nodes not getting deleted. I can no longer reproduce this symptom in the trunk. I've applied the attached patch http://www.netbeans.org/nonav/issues/showattachment.cgi/66591/61_fixes_126560.diff into release61_fixes repository as http://hg.netbeans.org/release61_fixes/rev/e35108146308 Returning 61fixes-candidate keyword. Provided patch introduces compilation errors in patched file. Created attachment 66807 [details]
corrected patch for 61_fixes
I've integrated the attached patch http://www.netbeans.org/nonav/issues/showattachment.cgi/66807/61_126560.diff into release61_fixes repository as http://hg.netbeans.org/release61_fixes/rev/e506fbdbf1b5 verified in patch3 (2008-08-12_03-59-31) delivered to SS |