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 248505

Summary: NullPointerException at org.netbeans.lib.editor.util.swing.DocumentUtilities.getMimeType
Product: third-party Reporter: ebakke
Component: -- Other --Assignee: 280Z28
Status: NEW ---    
Severity: normal CC: ebakke, sdedic
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 213276
Attachments: stacktrace
stacktrace

Description ebakke 2014-11-07 23:24:55 UTC
Build: NetBeans IDE 8.0.1 (Build 201408251540)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17
OS: Mac OS X

User Comments:
ebakke: Editing a Java class while doing a build.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.editor.util.swing.DocumentUtilities.getMimeType(DocumentUtilities.java:851)
   at org.netbeans.modules.editor.NbEditorUtilities.getMimeType(NbEditorUtilities.java:284)
   at org.antlr.netbeans.parsing.spi.impl.CursorSensitiveParserTaskScheduler$CaretListenerImpl.caretUpdate(CursorSensitiveParserTaskScheduler.java:61)
   at javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:397)
   at javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:4394)
   at javax.swing.text.JTextComponent$MutableCaretEvent.mouseReleased(JTextComponent.java:4450)
Comment 1 ebakke 2014-11-07 23:24:57 UTC
Created attachment 150365 [details]
stacktrace
Comment 2 Milutin Kristofic 2015-02-04 11:06:08 UTC
*** Bug 249902 has been marked as a duplicate of this bug. ***
Comment 3 Exceptions Reporter 2015-02-06 04:06:21 UTC
Created attachment 151848 [details]
stacktrace

Added jUnit test and it said test root folder doesn't exist.
Comment 4 Svata Dedic 2015-03-06 14:11:41 UTC
I suspect that the error is caused by antlrworks2 module (http://plugins.netbeans.org/plugin/53652/antlrworks-2), which seems to send null document to NB APIs.

Reassinging to the module owner.