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 250618 - LineBreakHook.insert throws Null Pointer
Summary: LineBreakHook.insert throws Null Pointer
Status: RESOLVED INVALID
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.2
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-23 04:52 UTC by maehem
Modified: 2015-09-07 12:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans project for replicating this bug (19.17 KB, application/zip)
2015-02-23 04:54 UTC, maehem
Details
Sample file to load into the test application (321 bytes, application/xml)
2015-02-23 04:55 UTC, maehem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maehem 2015-02-23 04:52:15 UTC
Sample Netbeans project attached.


Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Mac OS X version 10.9.5 running on x86_64
Java; VM; Vendor = 1.8.0_20
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.20-b23



INFO [org.netbeans.modules.editor.lib2.typinghooks.TypedBreakInterceptorsManager]: TypedBreakInterceptor crashed in insert(): org.netbeans.modules.xml.text.indent.LineBreakHook@61a0a20d
java.lang.NullPointerException
	at org.netbeans.modules.xml.text.indent.LineBreakHook.insert(LineBreakHook.java:173)
[catch] at org.netbeans.modules.editor.lib2.typinghooks.TypedBreakInterceptorsManager$Transaction.textTyped(TypedBreakInterceptorsManager.java:113)
	at org.netbeans.editor.BaseKit$InsertBreakAction$1.run(BaseKit.java:1341)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:356)
	at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1339)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
	at java.awt.Component.processEvent(Component.java:6302)
	at java.awt.Container.processEvent(Container.java:2234)
	at java.awt.Component.dispatchEventImpl(Component.java:4881)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4752)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Window.dispatchEventImpl(Window.java:2739)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
	at java.awt.EventQueue.access$400(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.awt.EventQueue$3.run(EventQueue.java:691)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:719)
	at java.awt.EventQueue$4.run(EventQueue.java:717)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
SEVERE [global]
java.lang.NullPointerException
	at org.netbeans.modules.xml.schema.completion.util.CompletionUtil.getDocRoot(CompletionUtil.java:808)
	at org.netbeans.modules.xml.schema.completion.util.CompletionUtil.canProvideCompletion(CompletionUtil.java:857)
	at org.netbeans.modules.xml.schema.completion.SchemaBasedCompletionProvider.getAutoQueryTypes(SchemaBasedCompletionProvider.java:80)
	at org.netbeans.modules.editor.completion.CompletionImpl.insertUpdate(CompletionImpl.java:345)
	at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:85)
	at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
	at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1624)
	at org.netbeans.editor.BaseDocument.handleInsertString(BaseDocument.java:829)
	at org.netbeans.editor.BaseDocument$FilterBypassImpl.insertString(BaseDocument.java:2497)
	at javax.swing.text.DocumentFilter.insertString(DocumentFilter.java:100)
	at org.openide.text.CloneableEditorSupport$DocFilter.insertString(CloneableEditorSupport.java:2366)
	at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:755)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.insertString(BaseKit.java:1221)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.performTextInsertion(BaseKit.java:1287)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.access$100(BaseKit.java:1052)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction$2.run(BaseKit.java:1155)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:356)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1131)
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1024)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
	at java.awt.Component.processEvent(Component.java:6302)
	at java.awt.Container.processEvent(Container.java:2234)
	at java.awt.Component.dispatchEventImpl(Component.java:4881)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4752)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Window.dispatchEventImpl(Window.java:2739)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
	at java.awt.EventQueue.access$400(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.awt.EventQueue$3.run(EventQueue.java:691)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:719)
	at java.awt.EventQueue$4.run(EventQueue.java:717)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comment 1 maehem 2015-02-23 04:54:12 UTC
Created attachment 152145 [details]
NetBeans project for replicating this bug
Comment 2 maehem 2015-02-23 04:55:14 UTC
Created attachment 152146 [details]
Sample file to load into the test application
Comment 3 maehem 2015-02-23 04:57:39 UTC
Compile and run the Netbeans project.  Load the XML document (attached to this bug report) and attempt to edit it in the editor.   Application should throw Null Pointer right away.
Comment 4 Svata Dedic 2015-09-07 12:20:16 UTC
Not a bug, though hard to find the cause: you need to include MIMELookup module and more importantly, Mime Lookup impl over system FS.

The modules assume some services provided for XML, and they are in the system - but the module, which interprets their registration is missing.