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 37148 - Null Pointer -- Cannot use the IDE now. Won't run
Summary: Null Pointer -- Cannot use the IDE now. Won't run
Status: VERIFIED DUPLICATE of bug 33165
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-11 16:00 UTC by querist
Modified: 2007-11-05 13:42 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 querist 2003-11-11 16:00:26 UTC
As soon as I try to type anything in the editor I 
get a null pointer exception.

I can't do anything with the IDE now.
This, unfortunately, is a production problem as 
we use it at the office.

Thanks.

--------------------------------------------------
-----------------------------

>Log Session: Tuesday, November 11, 2003 10:48:30 
AM EST

>System Info: 

  Product Version       = NetBeans IDE 3.5.1 
(Build 200307302351)

  IDE Versioning        = IDE/1 spec=3.42.2 
impl=200307302351

  Operating System      = Windows XP version 5.1 
running on x86

  Java; VM; Vendor      = 1.4.2_01; Java HotSpot
(TM) Client VM 1.4.2_01-b06; Sun Microsystems Inc.

  Java Home             = C:\j2sdk1.4.2_01\jre

  System Locale; Encod. = en_US; Cp1252

  Home Dir; Current Dir = C:\Documents and 
Settings\n507736; C:\Program Files\NetBeans IDE 
3.5.1

  IDE Install; User Dir = C:\Program 
Files\NetBeans IDE 3.5.1; C:\Documents and 
Settings\n507736\.netbeans\3.5

  CLASSPATH             = C:\Program 
Files\NetBeans IDE 3.5.1
\lib\ext\boot.jar;C:\Program Files\NetBeans IDE 
3.5.1\lib\ext\crimson-1.1.3.jar;C:\Program 
Files\NetBeans IDE 3.5.1\lib\ext\regexp-
1.2.jar;C:\Program Files\NetBeans IDE 3.5.1
\lib\ext\xerces-2.0.2.jar;C:\Program 
Files\NetBeans IDE 3.5.1\lib\ext\xml-apis-
1.0b2.jar;C:\j2sdk1.4.2_01
\lib\dt.jar;C:\j2sdk1.4.2_01\lib\tools.jar

  Boot & ext classpath  = C:\j2sdk1.4.2_01
\jre\lib\rt.jar;C:\j2sdk1.4.2_01
\jre\lib\i18n.jar;C:\j2sdk1.4.2_01
\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_01
\jre\lib\jsse.jar;C:\j2sdk1.4.2_01
\jre\lib\jce.jar;C:\j2sdk1.4.2_01
\jre\lib\charsets.jar;C:\j2sdk1.4.2_01
\jre\classes;C:\j2sdk1.4.2_01\jre\lib\ext\cryptix-
asn1.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\cryptix32.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\javax.servlet.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\jxta.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\jxtacms.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\jxtaptls.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\jxtasecurity.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\jxtashell.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\log4j.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\minimalBC.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\org.mortbay.jetty.jar;C:\j2sdk1.4.2_0
1\jre\lib\ext\pjxta.jar;C:\j2sdk1.4.2_01
\jre\lib\ext\sunjce_provider.jar

  Dynamic classpath     = C:\Program 
Files\NetBeans IDE 3.5.1\lib\core-
windows.jar;C:\Program Files\NetBeans IDE 3.5.1
\lib\core.jar;C:\Program Files\NetBeans IDE 3.5.1
\lib\openide.jar

--------------------------------------------------
-----------------------------

[org.netbeans.core.modules #4] Warning: the 
module org.netbeans.modules.projects uses 
org.openide.deprecated which is deprecated: 
Clients of obsoleted Open APIs are encouraged to 
remove this dependency. See 
http://www.netbeans.org/download/dev/javadoc/OpenA
PIs/org/openide/doc-files/upgrade.html#3.5i-sep

Turning on modules:

	org.openide/1 [3.42.2 200307302351]
	org.openide.io [1.0.1 200307302351]
	org.openide.execution [1.0.1 200307302351]
	org.openide.compiler [1.0.1 200307302351]
	org.netbeans.core/1 [1.12.2 200307302351]
	org.netbeans.lib.terminalemulator [1.0.2 
200307302351]
	org.netbeans.core.output/1 [1.0.2 
200307302351]
	org.netbeans.core.compiler/1 [1.3.1 
200307302351]
	org.openide.src [1.0.1 200307302351]
	org.netbeans.modules.servletapi/1 [1.2.1 
200307302351]
	org.netbeans.libs.xalan/1 [1.1.1 2.3.1]
	org.netbeans.libs.jaxp/1 [1.1.1 1.1.2]
	org.netbeans.api.xml/1 [1.1.1 
200307302351]
	org.netbeans.modules.xml.core/2 [0.8.1 
XMLr35]
	org.netbeans.core.execution/1 [1.2.2 
200307302351]
	org.netbeans.modules.jarpackager/2 
[1.13.2 200307302351]
	org.openidex.util/2 [2.6.1 200307302351]
	org.openide.debugger [1.0.1 200307302351]
	org.openide.deprecated [1.2.1 
200307302351]
	org.netbeans.core.deprecated [1.2.1 
200307302351]
	org.netbeans.modules.projects/1 [1.12.3 
200307302351]
	org.netbeans.modules.debugger.core/3 
[2.8.1 200307302351]
	org.netbeans.modules.debugger.jpda/1 
[1.14.1 200307302351]
	org.netbeans.modules.javahelp/1 [1.2.1 
200307302351]
	org.netbeans.modules.j2eeserver/2 [1.7.1 
200307302351]
	org.netbeans.modules.schema2beans/1 
[1.4.1 200307302351]
	org.netbeans.modules.classfile/1 [1.7.1 
200307302351]
	org.netbeans.api.java/1 [1.2.1 
200307302351]
	org.netbeans.modules.java/1 [1.15.2 
200307302351]
	org.netbeans.modules.html/1 [1.11.1 
200307302351]
	org.netbeans.modules.web.core/1 [1.16.2 
200307302351]
	org.netbeans.modules.web.taglibed/1 
[1.11.2 200307302351]
	org.netbeans.core.windows/1 [1.1.1 
200307302351]
	org.netbeans.core.ui/1 [1.1.1 
200307302351]
	org.netbeans.modules.xml.schema/1 [0.8.1 
200307302351]
	org.netbeans.modules.editor/1 [1.13.2 
200307302351]
	org.netbeans.modules.properties/1 [1.10.2 
200307302351]
	org.netbeans.modules.httpserver/1 [1.12.1 
200307302351]
	org.netbeans.modules.javadoc/1 [1.10.2 
200307302351]
	org.netbeans.modules.settings/1 [1.3.1]
	org.netbeans.modules.utilities/1 [1.13.1 
200307302351]
	org.netbeans.modules.autoupdate/1 [2.7.2 
200307302351]
	org.netbeans.modules.welcome/1 [1.4.2 
200307302351]
	org.netbeans.modules.diff/1 [1.6.1 
200307302351]
	org.netbeans.modules.vcscore/1 [1.8.1 
200307302351]
	org.netbeans.modules.vcs.advanced/1 
[1.8.1 200307302351]
	org.netbeans.modules.vcs.profiles.pvcs/1 
[1.2.1 200307302351]
	org.netbeans.modules.i18n/1 [1.12.1 
200307302351]
	org.netbeans.modules.xml.tax/2 [0.8.1 
XMLr35]
	org.netbeans.modules.xml.tools/2 [0.8.2 
200307302351]
	org.netbeans.modules.css/2 [0.8.1 
200307302351]
	org.netbeans.modules.form/2 [1.12.2 
200307302351]
	org.netbeans.modules.servletapi23/1 
[1.3.1 200307302351]
	org.netbeans.modules.web.jspparser/1 
[1.5.1 200307302351]
	org.netbeans.modules.web.tomcat.tomcat40/1
 [1.8.2 200307302351]
	org.netbeans.modules.web.tomcat.tomcat40.a
utocompile/1 [1.5.1 200307302351]
	org.netbeans.modules.xml.catalog/2 [0.9.2 
XMLr35]
	org.netbeans.modules.web.ie/1 [1.15.2 
200307302351]
	org.netbeans.modules.beans/1 [1.10.1 
200307302351]
	org.netbeans.modules.web.monitor/1 [1.8.2 
200307302351]
	org.netbeans.modules.usersguide/1 [1.12.1 
200307302351]
	org.netbeans.modules.text/1 [1.11.1 
200307302351]
	org.netbeans.modules.extbrowser/1 [0.7.1 
200307302351]
	org.netbeans.modules.xml.text/2 [0.8.1 
XMLr35]
	org.netbeans.modules.web.core.syntax/1 
[1.12.1 200307302351]
	org.netbeans.modules.vcs.profiles.vss/1 
[1.2.1 200307302351]
	org.netbeans.modules.xsl/1 [0.8.2 XMLr35]
	org.netbeans.modules.db/1 [1.7.1 
200307302351]
	org.apache.tools.ant.module/2 [2.16.1 
200307302351]
	org.apache.tools.ant.module.docs [2.12 
${buildnumber}]
	org.netbeans.modules.group/1 [0.1.1 
200307302351]
	org.netbeans.modules.properties.syntax/1 
[1.10.1 200307302351]
	org.netbeans.modules.applet/1 [1.12.1 
200307302351]
	org.netbeans.modules.web.tomcat.bundled/1 
[1.3.1 200307302351]
	org.netbeans.modules.clazz/1 [1.12.1 
200307302351]
	org.netbeans.modules.vcs.profiles.cvsprofi
les/1 [1.2.1 200307302351]
	org.netbeans.core.ide/1 [1.2.2 
200307302351]
	org.netbeans.modules.cvsclient/1 [1.7.2 
200307302351]
	org.netbeans.modules.vcs.cmdline.compat/1 
[1.2.1 200307302351]
	org.netbeans.modules.image/1 [1.10.1 
200307302351]
	org.netbeans.modules.i18n.form/2 [1.11.1 
200307302351]
	org.netbeans.modules.web.debug/1 [1.8.1 
200307302351]
Starting system in multiple views (SDI) UI mode.

!!!!!!!!!!!!!!!!!!!!!!!!class 
org.netbeans.modules.editor.options.PropertiesMIME
Processor type file haven't been found in 
folder:org.openide.loaders.DataFolder@1f784d7
[Editors/text/x-java]

*********** Exception occurred ************ at 
Tue Nov 11 10:49:00 EST 2003

java.lang.NullPointerException

	at 
org.netbeans.editor.Annotations.getActiveAnnotatio
n(Annotations.java:265)

	at 
org.netbeans.editor.DrawLayerFactory$AnnotationLay
er.isActive(DrawLayerFactory.java:582)

	at 
org.netbeans.editor.DrawEngine.updateOffsetReached
(DrawEngine.java:347)

	at 
org.netbeans.editor.DrawEngine.drawCurrentTokenFra
gment(DrawEngine.java:753)

	at 
org.netbeans.editor.DrawEngine.drawCurrentToken
(DrawEngine.java:857)

	at org.netbeans.editor.DrawEngine.draw
(DrawEngine.java:1058)

	at org.netbeans.editor.LeafView.paintAreas
(LeafView.java:154)

	at org.netbeans.editor.BaseView.paint
(BaseView.java:129)

	at 
org.netbeans.editor.BaseTextUI$RootView.paint
(BaseTextUI.java:602)

	at 
org.netbeans.editor.BaseTextUI.paintRegion
(BaseTextUI.java:244)

	at org.netbeans.editor.EditorUI.paint
(EditorUI.java:1499)

	at org.netbeans.editor.BaseTextUI.paint
(BaseTextUI.java:222)

	at javax.swing.plaf.ComponentUI.update
(ComponentUI.java:142)

	at javax.swing.JComponent.paintComponent
(JComponent.java:541)

	at javax.swing.JComponent.paint
(JComponent.java:808)

	at 
javax.swing.JComponent.paintWithOffscreenBuffer
(JComponent.java:4795)

	at 
javax.swing.JComponent.paintDoubleBuffered
(JComponent.java:4748)

	at 
javax.swing.JComponent._paintImmediately
(JComponent.java:4692)

	at javax.swing.JComponent.paintImmediately
(JComponent.java:4495)

	at 
javax.swing.RepaintManager.paintDirtyRegions
(RepaintManager.java:410)

	at 
javax.swing.SystemEventQueueUtilities$ComponentWor
kRequest.run(SystemEventQueueUtilities.java:117)

	at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)

	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:454)

[catch] at 
java.awt.EventDispatchThread.pumpOneEventForHierar
chy(EventDispatchThread.java:201)

	at 
java.awt.EventDispatchThread.pumpEventsForHierarch
y(EventDispatchThread.java:151)

	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)

	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)

	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)

*********** Exception occurred ************ at 
Tue Nov 11 10:49:00 EST 2003

java.lang.NullPointerException

	at 
org.netbeans.editor.Annotations.getActiveAnnotatio
n(Annotations.java:265)

	at 
org.netbeans.editor.DrawLayerFactory$AnnotationLay
er.isActive(DrawLayerFactory.java:582)

	at 
org.netbeans.editor.DrawEngine.updateOffsetReached
(DrawEngine.java:347)

	at 
org.netbeans.editor.DrawEngine.drawCurrentTokenFra
gment(DrawEngine.java:753)

	at 
org.netbeans.editor.DrawEngine.drawCurrentToken
(DrawEngine.java:857)

	at org.netbeans.editor.DrawEngine.draw
(DrawEngine.java:1058)

	at org.netbeans.editor.LeafView.paintAreas
(LeafView.java:154)

	at org.netbeans.editor.BaseView.paint
(BaseView.java:129)

	at 
org.netbeans.editor.BaseTextUI$RootView.paint
(BaseTextUI.java:602)

	at 
org.netbeans.editor.BaseTextUI.paintRegion
(BaseTextUI.java:244)

	at org.netbeans.editor.EditorUI.paint
(EditorUI.java:1499)

	at org.netbeans.editor.BaseTextUI.paint
(BaseTextUI.java:222)

	at javax.swing.plaf.ComponentUI.update
(ComponentUI.java:142)

	at javax.swing.JComponent.paintComponent
(JComponent.java:541)

	at javax.swing.JComponent.paint
(JComponent.java:808)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JViewport.paint
(JViewport.java:722)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at 
org.netbeans.core.windows.frames.CloseButtonTabbed
Pane.paint(CloseButtonTabbedPane.java:209)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at 
org.netbeans.core.windows.frames.PerimeterPane.pai
nt(PerimeterPane.java:103)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at 
javax.swing.JComponent.paintWithOffscreenBuffer
(JComponent.java:4795)

	at 
javax.swing.JComponent.paintDoubleBuffered
(JComponent.java:4748)

	at 
javax.swing.JComponent._paintImmediately
(JComponent.java:4692)

	at javax.swing.JComponent.paintImmediately
(JComponent.java:4495)

	at 
javax.swing.RepaintManager.paintDirtyRegions
(RepaintManager.java:410)

	at 
javax.swing.SystemEventQueueUtilities$ComponentWor
kRequest.run(SystemEventQueueUtilities.java:117)

	at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)

	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:454)

[catch] at 
java.awt.EventDispatchThread.pumpOneEventForHierar
chy(EventDispatchThread.java:201)

	at 
java.awt.EventDispatchThread.pumpEventsForHierarch
y(EventDispatchThread.java:151)

	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)

	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)

	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)

*********** Exception occurred ************ at 
Tue Nov 11 10:49:02 EST 2003

java.lang.NullPointerException

	at 
org.netbeans.editor.Annotations.getActiveAnnotatio
n(Annotations.java:265)

	at 
org.netbeans.editor.DrawLayerFactory$AnnotationLay
er.isActive(DrawLayerFactory.java:582)

	at 
org.netbeans.editor.DrawEngine.updateOffsetReached
(DrawEngine.java:347)

	at 
org.netbeans.editor.DrawEngine.drawCurrentTokenFra
gment(DrawEngine.java:753)

	at 
org.netbeans.editor.DrawEngine.drawCurrentToken
(DrawEngine.java:857)

	at org.netbeans.editor.DrawEngine.draw
(DrawEngine.java:1058)

	at org.netbeans.editor.LeafView.paintAreas
(LeafView.java:154)

	at org.netbeans.editor.BaseView.paint
(BaseView.java:129)

	at 
org.netbeans.editor.BaseTextUI$RootView.paint
(BaseTextUI.java:602)

	at 
org.netbeans.editor.BaseTextUI.paintRegion
(BaseTextUI.java:244)

	at org.netbeans.editor.EditorUI.paint
(EditorUI.java:1499)

	at org.netbeans.editor.BaseTextUI.paint
(BaseTextUI.java:222)

	at javax.swing.plaf.ComponentUI.update
(ComponentUI.java:142)

	at javax.swing.JComponent.paintComponent
(JComponent.java:541)

	at javax.swing.JComponent.paint
(JComponent.java:808)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JViewport.paint
(JViewport.java:722)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at 
org.netbeans.core.windows.frames.CloseButtonTabbed
Pane.paint(CloseButtonTabbedPane.java:209)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at 
org.netbeans.core.windows.frames.PerimeterPane.pai
nt(PerimeterPane.java:103)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at javax.swing.JComponent.paint
(JComponent.java:817)

	at javax.swing.JLayeredPane.paint
(JLayeredPane.java:557)

	at javax.swing.JComponent.paintChildren
(JComponent.java:647)

	at 
javax.swing.JComponent.paintWithOffscreenBuffer
(JComponent.java:4802)

	at 
javax.swing.JComponent.paintDoubleBuffered
(JComponent.java:4748)

	at javax.swing.JComponent.paint
(JComponent.java:798)

	at 
java.awt.GraphicsCallback$PaintCallback.run
(GraphicsCallback.java:21)

	at 
sun.awt.SunGraphicsCallback.runOneComponent
(SunGraphicsCallback.java:60)

	at 
sun.awt.SunGraphicsCallback.runComponents
(SunGraphicsCallback.java:97)

	at java.awt.Container.paint
(Container.java:1312)

	at sun.awt.RepaintArea.paint
(RepaintArea.java:177)

	at 
sun.awt.windows.WComponentPeer.handleEvent
(WComponentPeer.java:260)

	at java.awt.Component.dispatchEventImpl
(Component.java:3678)

	at java.awt.Container.dispatchEventImpl
(Container.java:1627)

	at java.awt.Window.dispatchEventImpl
(Window.java:1606)

	at java.awt.Component.dispatchEvent
(Component.java:3477)

	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:456)

[catch] at 
java.awt.EventDispatchThread.pumpOneEventForHierar
chy(EventDispatchThread.java:201)

	at 
java.awt.EventDispatchThread.pumpEventsForHierarch
y(EventDispatchThread.java:151)

	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)

	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)

	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)
Comment 1 Miloslav Metelka 2003-11-14 13:46:17 UTC
I've checked out the original 1.12 version of Annotations.java and the
line causing the problem is

    if (anno.getMark() != mark) {

so the "anno" must be null for the NPE to be thrown. This means that
the LineAnnotations structure is empty but there is still a mark
assigned to it in the lineAnnotationsByMark map. As there were
problems with having the lineAnnotationsArray sorted and updated
properly during document modifications the particular LineAnnotations
could become empty resulting in the NPE.

 So yes it should very likely be a part of the problems addressed by
the patch for issue 33165. Closing as dup.


*** This issue has been marked as a duplicate of 33165 ***
Comment 2 edmaher 2004-02-18 08:04:55 UTC
Is this fixed or available as a patch for version 3.5.1
Issue 33165 ( the duplicate ) is reported as being in 3.6

Comment 3 Miloslav Metelka 2004-02-18 09:00:21 UTC
Unfortunately we cannot backport the issue 33165 into 3.5.1. As the
fix insisted on proper document locking there were several other
issues (mainly deadlocks) revealed and fixed after integration of
33165 and in fact the process still continues (e.g. issue 40026 was
integrated recently). I think that we would not be able to collect all
the additional necessary fixes and extract them cleanly out from the
openide and editor module classes without colliding with the new
features added to the modules.
 As a possible hack you could try to take openide.jar and
nb-editor.jar and editor.jar from current dev builds and run 3.5.1 on
it but no warranty that this solution would work.
Comment 4 pfelenda 2004-02-18 23:12:35 UTC
Verified it is duplicate of issue 33165.