[ https://issues.apache.org/jira/browse/NETBEANS-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545539#comment-16545539 ]
Austin Stephens edited comment on NETBEANS-1042 at 7/16/18 5:57 PM: -------------------------------------------------------------------- Here is your stack trace: {noformat} LineRootElement.getElement:64 NbDocument$DocumentRenderer.run:898 BaseDocument.render:1402 NbDocument$DocumentRenderer.renderToInt:873 NbDocument.findLineOffset:176 DocumentLine$Set.offset:1054 DocumentLine$Set.access$400:921 DocumentLine$Set$OffsetLineCreator.createLine:1095 LineVector.findOrCreateLine:142 Line$Set.findOrCreateLine:533 DocumentLine$Set.access$301:921 DocumentLine$Set$1DocumentRenderer.run:1077 BaseDocument.render:1402 DocumentLine$Set.safelyFindOrCreateLine:1083 DocumentLine$Set.getCurrent:1049 BreakpointAnnotationProvider.addAnnotationTo:416 BreakpointAnnotationProvider.access$600:67 BreakpointAnnotationProvider$2.run:360 RequestProcessor$Task.run:1418 GlobalLookup.execute:45 Lookups.executeWith:278 RequestProcessor$Processor.run:2033 {noformat} The exception thrown is "Invalid line index=-2 < 0" Edit: A -1 comes from an array produced by BreakpointAnnotationProvider.getAnnotationLines on line 126. It (the array of \{-1}) is then passed to addAnnotationTo where the -1 is pulled from the array, 1 is subtracted from it, and then is used as an index into LineCookie.getLineSet().getCurrent(int) on line 416. was (Author: sir intellegence): Here is your stack trace: {noformat} LineRootElement.getElement:64 NbDocument$DocumentRenderer.run:898 BaseDocument.render:1402 NbDocument$DocumentRenderer.renderToInt:873 NbDocument.findLineOffset:176 DocumentLine$Set.offset:1054 DocumentLine$Set.access$400:921 DocumentLine$Set$OffsetLineCreator.createLine:1095 LineVector.findOrCreateLine:142 Line$Set.findOrCreateLine:533 DocumentLine$Set.access$301:921 DocumentLine$Set$1DocumentRenderer.run:1077 BaseDocument.render:1402 DocumentLine$Set.safelyFindOrCreateLine:1083 DocumentLine$Set.getCurrent:1049 BreakpointAnnotationProvider.addAnnotationTo:416 BreakpointAnnotationProvider.access$600:67 BreakpointAnnotationProvider$2.run:360 RequestProcessor$Task.run:1418 GlobalLookup.execute:45 Lookups.executeWith:278 RequestProcessor$Processor.run:2033 {noformat} The exception thrown is "Invalid line index=-2 < 0" > IndexOutOfBoundsException in BreakpointAnnotationProvider can be avoided > ------------------------------------------------------------------------ > > Key: NETBEANS-1042 > URL: https://issues.apache.org/jira/browse/NETBEANS-1042 > Project: NetBeans > Issue Type: Bug > Components: debugger - Java > Reporter: Austin Stephens > Assignee: Austin Stephens > Priority: Trivial > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > It is rather annoying to have exceptions like that thrown when you have > breakpoints on them to help you find bugs, so I fixed it. This bug report is > mostly to get a branch name that won't cause issues... -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists