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 173662 - Too high endIdx at org.netbeans.spi.editor.highlighting.support.OffsetsBag.removeHighlights(OffsetsBag.java:405)
Summary: Too high endIdx at org.netbeans.spi.editor.highlighting.support.OffsetsBag.re...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-10-02 21:38 UTC by err
Modified: 2009-11-02 12:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description err 2009-10-02 21:38:30 UTC
- Do step into on a line like
    removeAspectgroupData(c, e, l.iterator().next().getAspectgrouptype());
- see that removeAspectgroupData is boxed.
- hit <RETURN>
- the box is taken away, nothing else happens

Clicking on removeAspectgroupData also does nothing.

Putting a breakpoint in removeAspectgroupData, then stepOver works.

This used to work.
Comment 1 err 2009-10-02 21:55:27 UTC
I can't reproduce this, so...
Comment 2 Martin Entlicher 2009-10-03 15:11:44 UTC
Unfortunately, neither I am able to reproduce.

I've written a sample program to mimic your situation, tried step into several times, but it always worked fine:

    private static void testStepInto() {
        char c = 'a';
        Exception e = new NullPointerException(Character.toString(c));
        class AspectGroup {
            Class getAspectgrouptype() {
                return getClass();
            }
        }
        List<AspectGroup> l = Arrays.asList(new AspectGroup[] { new AspectGroup() });
        removeAspectgroupData(c, e, l.iterator().next().getAspectgrouptype());
    }

    private static final void removeAspectgroupData(char c, Exception e,
                                                    Class type) {
        return ;
    }

Can you please look into messages.log file from the session in which you've encountered this bug (it can be
messages.log.1 or messages.log.2 if you've restarted NetBeans since then) and check whether there are some relevant
exceptions thrown or attach the whole log file here?

If there are no relevant exceptions listed in the log file, I guess we'd have to close this as works-for-me.
Comment 3 err 2009-10-03 15:43:01 UTC
Nothing looks related to me; you might find some of the debugger related messages interesting. BTW, 20090930.
(works for me too)

>Log Session: Thursday, October 1, 2009 11:28:24 AM PDT
...
	org.netbeans.api.debugger.jpda/2 [2.22 200909301401]
...
...<<<<<the following appear together>>>>>
... The WARNING is only once in the log, the source level stuff appears
... scattered throughout, not even sure its from debugger.
...
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by:
org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getCurrentElement(EditorContextImpl.java:1782)
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by:
org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getCurrentMethodDeclaration(EditorContextImpl.java:911)
Even though the source level of
C:\a\j\Java\jdk1.6.0_12\src.zip;C:\a\src\wb-dev\MetaWB\src;C:\a\src\wb-dev\Astro\src;C:\a\j\eclipselink-inuse\eclipselink-src.zip;C:\a\j\google-collect-1.0-rc2\src-1.0-rc2.zip;C:\a\src\wb-dev\AstroPersist\src;C:\a\j\NetBeans
Dev 200909301401\java3\docs\junit-4.5-src.jar;C:\a\src\wb-dev\AstroPersist\test is set to: 1.6, java.lang.AssertionError
cannot be found on the bootclasspath: 
Changing source level to 1.3Even though the source level of
C:\a\j\Java\jdk1.6.0_12\src.zip;C:\a\src\wb-dev\MetaWB\src;C:\a\src\wb-dev\Astro\src;C:\a\j\eclipselink-inuse\eclipselink-src.zip;C:\a\j\google-collect-1.0-rc2\src-1.0-rc2.zip;C:\a\src\wb-dev\AstroPersist\src;C:\a\j\NetBeans
Dev 200909301401\java3\docs\junit-4.5-src.jar;C:\a\src\wb-dev\AstroPersist\test is set to: 1.6, java.lang.AssertionError
cannot be found on the bootclasspath: 
Changing source level to 1.3Module-17dff15: kit installed: JavaKit
...
...
...
INFO [org.netbeans.spi.editor.highlighting.support.OffsetsBag]: Too high endIdx=1, marks.size()=1, startIdx=0,
startOffset=36257, endOffset=36273, changeStart=36257, document.getLength()=43950, lastMark=offset=36257,
attribs=org.netbeans.api.editor.settings.AttributesUtilities$Immutable@e8cf12
java.lang.Exception
	at org.netbeans.spi.editor.highlighting.support.OffsetsBag.removeHighlights(OffsetsBag.java:405)
	at
org.netbeans.modules.debugger.jpda.projects.DebuggerAnnotation$HighlightAnnotatable.removeAnnotation(DebuggerAnnotation.java:169)
	at org.openide.text.Annotation.detach(Annotation.java:133)
	at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.removeAnnotation(EditorContextImpl.java:349)
	at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.removeAnnotation(EditorContextImpl.java:341)
[catch] at
org.netbeans.modules.debugger.jpda.ui.CurrentThreadAnnotationListener$RemoveAnnotationsTask.run(CurrentThreadAnnotationListener.java:359)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 4 Martin Entlicher 2009-10-03 15:59:34 UTC
The last exception is responsible for the behavior you describe. Thanks for that.
The exception breaks the removal of the green line annotation.
I'll check if this is a bug in editor or debugger...
Comment 5 Martin Entlicher 2009-10-03 16:16:52 UTC
Moving to editor for evaluation. Please let us know if we provided bad arguments to removeHighlights().

INFO [org.netbeans.spi.editor.highlighting.support.OffsetsBag]: Too high endIdx=1, marks.size()=1, startIdx=0,
startOffset=36257, endOffset=36273, changeStart=36257, document.getLength()=43950, lastMark=offset=36257,
attribs=org.netbeans.api.editor.settings.AttributesUtilities$Immutable@e8cf12
java.lang.Exception
	at org.netbeans.spi.editor.highlighting.support.OffsetsBag.removeHighlights(OffsetsBag.java:405)
	at
org.netbeans.modules.debugger.jpda.projects.DebuggerAnnotation$HighlightAnnotatable.removeAnnotation(DebuggerAnnotation.java:169)
	at org.openide.text.Annotation.detach(Annotation.java:133)
	at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.removeAnnotation(EditorContextImpl.java:349)
	at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.removeAnnotation(EditorContextImpl.java:341)
[catch] at
org.netbeans.modules.debugger.jpda.ui.CurrentThreadAnnotationListener$RemoveAnnotationsTask.run(CurrentThreadAnnotationListener.java:359)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 6 Vitezslav Stejskal 2009-10-05 09:34:42 UTC
I'll have a look in the code, but without steps to reproduce I might not be able to do much.
Comment 7 Vitezslav Stejskal 2009-11-02 12:58:04 UTC
I hope this one was fixed together with my other fixes in OB.removeHighlights. If not please reopen.