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 238374 - Source editor does not work due to NPE
Summary: Source editor does not work due to NPE
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 7.4
Hardware: PC All
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2013-11-14 14:49 UTC by Alexander Pepin
Modified: 2013-11-15 12:54 UTC (History)
2 users (show)

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 Alexander Pepin 2013-11-14 14:49:03 UTC
This is a serious regression introduced in the latest build 20131114.
Editor does not work for C/C++/Fortran files due to NPE
java.lang.NullPointerException
	at org.netbeans.api.lexer.TokenSequence.isEmpty(TokenSequence.java:696)
	at org.netbeans.modules.cnd.modelimpl.platform.FileBufferDoc.checkTokensEvent(FileBufferDoc.java:170)
	at org.netbeans.modules.cnd.modelimpl.platform.FileBufferDoc.access$600(FileBufferDoc.java:74)
	at org.netbeans.modules.cnd.modelimpl.platform.FileBufferDoc$2.tokenHierarchyChanged(FileBufferDoc.java:146)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.fireTokenHierarchyChanged(TokenHierarchyOperation.java:574)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.rebuild(TokenHierarchyOperation.java:556)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.recreateAfterError(TokenHierarchyOperation.java:387)
	at org.netbeans.lib.lexer.inc.DocumentInput.textModified(DocumentInput.java:157)
	at org.netbeans.lib.lexer.inc.DocumentInput.removeUpdate(DocumentInput.java:147)
	at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:116)
	at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:260)
	at org.netbeans.editor.BaseDocument.fireRemoveUpdate(BaseDocument.java:1627)
	at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:288)
	at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:72)
	at org.netbeans.modules.editor.lib2.document.StableCompoundEdit.undo(StableCompoundEdit.java:93)
	at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2196)
	at org.netbeans.editor.BaseDocument.undoAtomicEdits(BaseDocument.java:2114)
	at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1800)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:357)
	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:1664)
	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:6282)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
	at java.awt.Component.dispatchEventImpl(Component.java:4731)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:702)
	at java.awt.EventQueue$4.run(EventQueue.java:700)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Comment 1 Alexander Pepin 2013-11-14 14:51:04 UTC
Of course it's a showstopper.
Makefile and script editors work fine.
Comment 2 Alexander Simon 2013-11-14 15:05:32 UTC
reassign to evaluation
Comment 3 Alexander Simon 2013-11-14 15:44:59 UTC
By the way I cannot reproduce bug in the IDE built from sources (releases, branch release74).
Probably broken build?
Comment 4 soldatov 2013-11-14 16:19:21 UTC
(In reply to Alexander Pepin from comment #1)
> Of course it's a showstopper.
> Makefile and script editors work fine.
I can edit *.java files too.
Comment 5 soldatov 2013-11-15 08:01:00 UTC
(In reply to Alexander Simon from comment #3)
> By the way I cannot reproduce bug in the IDE built from sources (releases,
> branch release74).
> Probably broken build?
I agree. I downloaded NetBeans IDE 7.4 (Build 201311142201) and I can't reproduce exception.
Comment 6 Miloslav Metelka 2013-11-15 09:40:05 UTC
Was it built from release74 branch yesterday?
After looking at cnd code it looks like you've possibly picked the sources in the middle of the two changesets integration of issue 230125:


Issue 230125 in release74:
8822288ae30c transplanted as 4a364bff396c
75bae758be34 transplanted as fab748867dc9

Both changesets should be present in release74. If the problem would persist please reopen this issue.
Comment 7 Alexander Pepin 2013-11-15 12:54:14 UTC
It's not reproducible any more in the fresh build 201311142201.