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.
Build: NetBeans IDE Dev (Build 201101100000) VM: Java HotSpot(TM) Client VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04 OS: Windows XP User Comments: javydreamercsw: Formating a huge file 4000+ lines of code Stacktrace: java.lang.ArrayIndexOutOfBoundsException: 6032 at org.netbeans.lib.editor.util.GapList.get(GapList.java:462) at org.netbeans.modules.editor.lib2.view.EditorBoxView.getView(EditorBoxView.java:203) at org.netbeans.modules.diff.builtin.visualizer.editable.DiffViewManager$2.run(DiffViewManager.java:576) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1419) at org.netbeans.modules.diff.builtin.visualizer.editable.DiffViewManager.getHeight(DiffViewManager.java:569) at org.netbeans.modules.diff.builtin.visualizer.editable.DiffViewManager.updateDifferences(DiffViewManager.java:174)
Created attachment 104935 [details] stacktrace
Diff module should not operate directly with views since the view hierarchy lock is not acquired in this way: editorPane.getDocument().render(new Runnable () { @Override public void run() { try { View rootView = Utilities.getDocumentView(editorPane); int lineNumber = Utilities.getLineOffset((BaseDocument) editorPane.getDocument(), editorPane.getDocument().getLength()); if (lineNumber > 0) --lineNumber; View view = rootView.getView(lineNumber); Rectangle rec; if (view != null && (rec = editorPane.modelToView(view.getEndOffset() - 1)) != null) { height[0] = (int) (rec.getY() + rec.getHeight()); } } catch (BadLocationException ex) { // } } }); Instead please use editorPane.modelToView() / viewToModel() methods.
fix: #69ceb559b63a - http://hg.netbeans.org/core-main/rev/78f15a0d6684
Integrated into 'main-golden', will be available in build *201101140000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/78f15a0d6684 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: Issue #194282 - [70cat] ArrayIndexOutOfBoundsException: 6032