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: | [70cat] ArrayIndexOutOfBoundsException: 6032 | ||
---|---|---|---|
Product: | utilities | Reporter: | javydreamercsw <javydreamercsw> |
Component: | Diff | Assignee: | Ondrej Vrabec <ovrabec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gtg |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 175705 |
Attachments: | stacktrace |
Description
javydreamercsw
2011-01-12 19:22:43 UTC
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 |