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 197857 - Error in RequestProcessor org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder
Summary: Error in RequestProcessor org.netbeans.modules.cnd.navigation.overrides.Annot...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.0.1
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 195930 196077 198581 198701 (view as bug list)
Depends on: 197747
Blocks:
  Show dependency tree
 
Reported: 2011-04-19 06:44 UTC by soldatov
Modified: 2011-10-12 12:35 UTC (History)
10 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (3.18 KB, text/plain)
2011-06-03 17:02 UTC, Jesse Glick
Details
stacktrace (3.83 KB, text/plain)
2011-09-07 18:25 UTC, tbrunhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2011-04-19 06:44:50 UTC
Exception in inaccuracy tests from NetBeans IDE Dev (Build cnd-main-5706-on-20110414)

SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder
java.lang.NullPointerException
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1027)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1010)
	at org.netbeans.editor.BaseTextUI.getYFromPos(BaseTextUI.java:337)
	at org.netbeans.editor.GlyphGutter.changedLine(GlyphGutter.java:615)
	at org.netbeans.editor.Annotations.fireChangedLine(Annotations.java:640)
	at org.netbeans.editor.Annotations.refreshLine(Annotations.java:560)
	at org.netbeans.editor.Annotations.addAnnotation(Annotations.java:296)
	at org.netbeans.modules.editor.NbEditorDocument.addAnnotation(NbEditorDocument.java:233)
	at org.openide.text.NbDocument.addAnnotation(NbDocument.java:504)
	at org.netbeans.modules.cnd.navigation.overrides.BaseAnnotation.attach(BaseAnnotation.java:216)
	at org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder.run(AnnotationsHolder.java:187)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1465)
	at org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder.setNewAnnotations(AnnotationsHolder.java:221)
	at org.netbeans.modules.cnd.navigation.overrides.OverrideTaskFactory$PhaseRunnerImpl.addAnnotations(OverrideTaskFactory.java:173)
	at org.netbeans.modules.cnd.navigation.overrides.OverrideTaskFactory$PhaseRunnerImpl.run(OverrideTaskFactory.java:155)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$5.run(CsmFileTaskFactory.java:474)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$CsmSafeRunnable.run(CsmFileTaskFactory.java:491)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 Alexander Simon 2011-04-19 07:31:11 UTC
Editor team, please evaluate bug. I do not see anything wrong in cnd side.
Comment 2 soldatov 2011-04-22 08:57:07 UTC
This exception now blocks Code Model tests. Important task for CND or Editor team.

org.openide.util.RequestProcessor$SlowItem: task failed due to: java.lang.NullPointerException
	at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1465)
	at org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder.setNewAnnotations(AnnotationsHolder.java:221)
	at org.netbeans.modules.cnd.navigation.overrides.OverrideTaskFactory$PhaseRunnerImpl.addAnnotations(OverrideTaskFactory.java:173)
	at org.netbeans.modules.cnd.navigation.overrides.OverrideTaskFactory$PhaseRunnerImpl.run(OverrideTaskFactory.java:155)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$5.run(CsmFileTaskFactory.java:474)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$CsmSafeRunnable.run(CsmFileTaskFactory.java:491)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Caused by: java.lang.NullPointerException
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1027)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1010)
	at org.netbeans.editor.BaseTextUI.getYFromPos(BaseTextUI.java:337)
	at org.netbeans.editor.GlyphGutter.changedLine(GlyphGutter.java:615)
	at org.netbeans.editor.Annotations.fireChangedLine(Annotations.java:640)
	at org.netbeans.editor.Annotations.refreshLine(Annotations.java:560)
	at org.netbeans.editor.Annotations.addAnnotation(Annotations.java:296)
	at org.netbeans.modules.editor.NbEditorDocument.addAnnotation(NbEditorDocument.java:233)
	at org.openide.text.NbDocument.addAnnotation(NbDocument.java:504)
	at org.netbeans.modules.cnd.navigation.overrides.BaseAnnotation.attach(BaseAnnotation.java:216)
	at org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder.run(AnnotationsHolder.java:187)
	... 2 more
Comment 3 Miloslav Metelka 2011-04-27 12:51:33 UTC
It looks like BasicTextUI.editor is null. I'll attempt to fix it.
Btw what module's tests are failing? I've tried cnd.navigation and cnd.modelimpl and they pass fine. Is it random? If so please add RANDOM keyword.
Comment 4 soldatov 2011-04-27 13:24:51 UTC
No. It is not a OpenSource tests (out of NetBeans repository). C/C++ team uses some internal tool in order to check parser accuracy.
Comment 5 Miloslav Metelka 2011-04-28 14:36:52 UTC
So please provide steps how can I reproduce the issue. Thanks.
Comment 6 soldatov 2011-05-06 07:11:17 UTC
Workaround is found. Special delay between open and close file is added.

Test scenario before fix:
for (file : AllFilesInProject) {
   openFileInEditor(file);
   isBadFile = validateFileInInternalAPI(file);
   if (isBadFile) {
       sleepInSeconds(3);
   }
   doSomeActions(file, isBadFile);
   closeFileInEditor(file);
}

Test scenario now:
for (file : AllFilesInProject) {
   openFileInEditor(file);
   isBadFile = validateFileInInternalAPI(file);
//   if (isBadFile) {
       sleepInSeconds(3);
//   }
   doSomeActions(file, isBadFile);
   closeFileInEditor(file);
}
Comment 7 David Strupl 2011-05-06 08:12:05 UTC
Hello,

is this still P1 bug for the editor team??? Thanks,

David
Comment 8 soldatov 2011-05-06 09:16:13 UTC
Summary:
In order to analyze 622 files in IDE I miss about 826 seconds. Almost all time I am waiting while file will appear or disappear in editor. Additional time penalty (50 ms per file) will make my tests stable again.
Comment 9 Miloslav Metelka 2011-05-07 08:21:01 UTC
Well, so the summary is also a complaint to shrink a per-file time or is it just a description of the current situation?
Anyway I plan to rewrite the Annotations class in post NB 7.0.1 time so I treat this as a requirement for the new class to not fail your tests.
Comment 10 Miloslav Metelka 2011-05-24 14:37:48 UTC
*** Bug 198581 has been marked as a duplicate of this bug. ***
Comment 11 Miloslav Metelka 2011-05-24 14:38:06 UTC
*** Bug 198701 has been marked as a duplicate of this bug. ***
Comment 12 Jesse Glick 2011-06-03 17:02:53 UTC
Created attachment 108711 [details]
stacktrace

Closing some editor tabs.
Comment 13 Exceptions Reporter 2011-06-03 17:03:08 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=176598
Comment 14 tbrunhoff 2011-09-07 18:25:33 UTC
Created attachment 110497 [details]
stacktrace

Switching project groups.
Comment 15 Miloslav Metelka 2011-09-20 21:07:00 UTC
http://hg.netbeans.org/jet-main/rev/e55ff6998af5

Cnd team, could you please run your tests whether it will proceed fine now? Thanks.
Comment 16 Quality Engineering 2011-09-22 14:50:21 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e55ff6998af5
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #197857 - Error in RequestProcessor org.netbeans.modules.cnd.navigation.overrides.AnnotationsHolder - NPE from GlyphGutter:654.
Comment 17 Miloslav Metelka 2011-10-12 12:15:34 UTC
*** Bug 196077 has been marked as a duplicate of this bug. ***
Comment 18 Miloslav Metelka 2011-10-12 12:35:02 UTC
*** Bug 195930 has been marked as a duplicate of this bug. ***