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 41383 - exception thrown when opening a java file in the editor
Summary: exception thrown when opening a java file in the editor
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Martin Roskanin
URL:
Keywords:
: 41684 41936 43858 44308 45359 47016 49422 51028 51485 52131 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-25 23:18 UTC by wgreene
Modified: 2007-11-05 13:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diffed fix against release36 branch (2.00 KB, text/plain)
2004-04-05 17:06 UTC, Martin Roskanin
Details
binary patch of the fix. (10.47 KB, application/octet-stream)
2004-04-05 17:08 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wgreene 2004-03-25 23:18:34 UTC
java.lang.ArrayIndexOutOfBoundsException: -1
	at 
org.netbeans.lib.editor.view.GapObjectArray.getIte
m(GapObjectArray.java:78)
	at 
org.netbeans.lib.editor.view.GapBoxViewChildren.ge
tChild(GapBoxViewChildren.java:189)
	at 
org.netbeans.lib.editor.view.GapBoxView.getChild
(GapBoxView.java:1574)
	at 
org.netbeans.lib.editor.view.GapBoxView.getView
(GapBoxView.java:458)
	at 
org.netbeans.editor.CodeFoldingSideBar.collectPain
tInfos(CodeFoldingSideBar.java:335)
	at 
org.netbeans.editor.CodeFoldingSideBar.getPaintInf
o(CodeFoldingSideBar.java:380)
	at 
org.netbeans.editor.CodeFoldingSideBar.paintCompon
ent(CodeFoldingSideBar.java:450)
	at javax.swing.JComponent.paint
(JComponent.java:808)
	at javax.swing.JComponent.paintChildren
(JComponent.java:647)
	at javax.swing.JComponent.paint
(JComponent.java:817)
	at javax.swing.JComponent.paintChildren
(JComponent.java:647)
	at javax.swing.JComponent.paint
(JComponent.java:817)
	at javax.swing.JViewport.paint
(JViewport.java:722)
	at javax.swing.JComponent.paintChildren
(JComponent.java:647)
	at javax.swing.JComponent.paint
(JComponent.java:817)
	at javax.swing.JComponent.paintChildren
(JComponent.java:647)
	at javax.swing.JComponent.paint
(JComponent.java:817)
	at 
javax.swing.JComponent.paintWithOffscreenBuffer
(JComponent.java:4787)
	at 
javax.swing.JComponent.paintDoubleBuffered
(JComponent.java:4740)
	at 
javax.swing.JComponent._paintImmediately
(JComponent.java:4685)
	at javax.swing.JComponent.paintImmediately
(JComponent.java:4488)
	at 
javax.swing.RepaintManager.paintDirtyRegions
(RepaintManager.java:410)
[catch] at 
javax.swing.SystemEventQueueUtilities$ComponentWor
kRequest.run(SystemEventQueueUtilities.java:117)
	at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:454)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierar
chy(EventDispatchThread.java:201)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarch
y(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)
	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)
Comment 1 Martin Roskanin 2004-03-26 09:04:25 UTC
we will fix it to promo D
Comment 2 Miloslav Metelka 2004-04-05 13:41:13 UTC
*** Issue 41684 has been marked as a duplicate of this issue. ***
Comment 3 Miloslav Metelka 2004-04-05 13:43:26 UTC
Increasing priority to P2 as the problem seems to occur frequently.

The workaround should be to close the actual editor file where the
problem occurred and reopen it again.
Comment 4 Martin Roskanin 2004-04-05 17:06:16 UTC
Created attachment 14284 [details]
diffed fix against release36 branch
Comment 5 Martin Roskanin 2004-04-05 17:08:42 UTC
Created attachment 14285 [details]
binary patch of the fix.
Comment 6 Martin Roskanin 2004-04-05 17:13:01 UTC
Mila, as you can reproduce the problem... Could you please check the
attached fix? Thanks.
The attached zip contains the classes that should replace the
particular ones in
modules/ext/nb-editor.jar/org/netbeans/editor/CodeFoldingSideBar*.class
Comment 7 Martin Roskanin 2004-04-14 08:54:41 UTC
*** Issue 41936 has been marked as a duplicate of this issue. ***
Comment 8 Miloslav Metelka 2004-04-14 15:43:42 UTC
After applying the binary patch I can no longer reproduce the problem.
The patch seems to be OK and it does not seem to bring any
regressions. We can fix it at least in trunk for now and apply it to
nb36 fixes later as well.
Comment 9 Martin Roskanin 2004-04-27 12:24:55 UTC
fixed in [maintrunk]

/cvs/editor/libsrc/org/netbeans/editor/CodeFoldingSideBar.java,v  <--
 CodeFoldingSideBar.java
new revision: 1.13; previous revision: 1.12
done
Comment 10 Martin Roskanin 2004-06-08 08:31:42 UTC
*** Issue 44308 has been marked as a duplicate of this issue. ***
Comment 11 Miloslav Metelka 2004-06-30 10:13:08 UTC
*** Issue 43858 has been marked as a duplicate of this issue. ***
Comment 12 Miloslav Metelka 2004-06-30 10:15:41 UTC
*** Issue 45359 has been marked as a duplicate of this issue. ***
Comment 13 Martin Roskanin 2004-08-09 13:54:22 UTC
*** Issue 47016 has been marked as a duplicate of this issue. ***
Comment 14 Martin Roskanin 2004-10-04 10:00:41 UTC
*** Issue 49422 has been marked as a duplicate of this issue. ***
Comment 15 Martin Roskanin 2004-11-01 16:42:38 UTC
*** Issue 51027 has been marked as a duplicate of this issue. ***
Comment 16 Martin Roskanin 2004-11-01 16:44:34 UTC
*** Issue 51028 has been marked as a duplicate of this issue. ***
Comment 17 Miloslav Metelka 2004-11-24 16:54:26 UTC
*** Issue 51485 has been marked as a duplicate of this issue. ***
Comment 18 Jan Chalupa 2004-12-06 22:28:21 UTC
*** Issue 52131 has been marked as a duplicate of this issue. ***
Comment 19 Roman Strobl 2005-07-14 16:42:01 UTC
Verified in 200507131800.