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 161902 - NullPointerException at org.netbeans.modules.editor.NbEditorDocument.createEditor
Summary: NullPointerException at org.netbeans.modules.editor.NbEditorDocument.createEd...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: mslama
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-03 15:28 UTC by stefanv
Modified: 2009-07-23 07:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 148850


Attachments
stacktrace (1.32 KB, text/plain)
2009-04-03 15:28 UTC, stefanv
Details
stacktrace (1.32 KB, text/plain)
2009-04-03 18:02 UTC, twolf2919
Details
stacktrace (1.32 KB, text/plain)
2009-04-09 17:22 UTC, Jiri Rechtacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefanv 2009-04-03 15:28:35 UTC
Build: NetBeans IDE Dev (Build 200904030200)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Linux, 2.6.28-11-generic, i386

User Comments:
theknack: After "Close All" files in the editor pane.

theanuradha: when I switch project groups

GUEST: I close all open file tabs

stefanv: Closed all open documents

theknack: Right click on tabs in Editor Pane and select "close others" (also fails with "close all"). After closing documents, this error appears

menic: after closing all windows in editor

bokc: Change project group



Stacktrace: 
java.lang.IllegalStateException: Unexpected UI class:javax.swing.plaf.synth.SynthEditorPaneUI
        at org.openide.text.CloneableEditor$DoInitialize.initCustomEditor(CloneableEditor.java:412)
        at org.openide.text.CloneableEditor$DoInitialize.initVisual(CloneableEditor.java:528)
        at org.openide.text.CloneableEditor$DoInitialize.run(CloneableEditor.java:273)
        at org.netbeans.core.windows.WindowManagerImpl$Exclusive.run(WindowManagerImpl.java:1355)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
Comment 1 stefanv 2009-04-03 15:28:44 UTC
Created attachment 79400 [details]
stacktrace
Comment 2 twolf2919 2009-04-03 18:02:49 UTC
Build: NetBeans IDE Dev (Build 200903311400)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Linux, 2.6.27-12-generic, i386

User Comments: 
I was closing a project (the last one) when this exception appeared.

Stacktrace: 
java.lang.IllegalStateException: Unexpected UI class:javax.swing.plaf.synth.SynthEditorPaneUI
        at org.openide.text.CloneableEditor$DoInitialize.initCustomEditor(CloneableEditor.java:406)
        at org.openide.text.CloneableEditor$DoInitialize.initVisual(CloneableEditor.java:516)
        at org.openide.text.CloneableEditor$DoInitialize.run(CloneableEditor.java:273)
        at org.netbeans.core.windows.WindowManagerImpl$Exclusive.run(WindowManagerImpl.java:1355)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
Comment 3 twolf2919 2009-04-03 18:02:59 UTC
Created attachment 79414 [details]
stacktrace
Comment 4 mslama 2009-04-07 13:24:58 UTC
core-main #638d41e718d7
Additional log to investigate issue. Kit is null in this case. I added log to support to find out if document is not
closed ie. kit is set to null.
Comment 5 Quality Engineering 2009-04-08 07:47:28 UTC
Integrated into 'main-golden', will be available in build *200904080201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/638d41e718d7
User: Marek Slama <mslama@netbeans.org>
Log: #161902: Additional log to investigate issue.
Comment 6 Quality Engineering 2009-04-08 19:59:39 UTC
Integrated into 'main-golden', will be available in build *200904081400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/638d41e718d7
User: Marek Slama <mslama@netbeans.org>
Log: #161902: Additional log to investigate issue.
Comment 7 Jiri Rechtacek 2009-04-09 17:22:31 UTC
Build: NetBeans IDE Dev (Build 090409)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: Linux, 2.6.24-23-generic, i386

User Comments: 
While closing a project which had several classes open in editor.

Stacktrace: 
java.lang.IllegalStateException: Unexpected UI class:javax.swing.plaf.synth.SynthEditorPaneUI
        at org.openide.text.CloneableEditor$DoInitialize.initCustomEditor(CloneableEditor.java:414)
        at org.openide.text.CloneableEditor$DoInitialize.initVisual(CloneableEditor.java:533)
        at org.openide.text.CloneableEditor$DoInitialize.run(CloneableEditor.java:273)
        at org.netbeans.core.windows.WindowManagerImpl$Exclusive.run(WindowManagerImpl.java:1355)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
Comment 8 Jiri Rechtacek 2009-04-09 17:22:41 UTC
Created attachment 79835 [details]
stacktrace
Comment 9 mslama 2009-04-20 13:19:04 UTC
core-main #48637df6f189

Reason for this is that if someone calls CloneableTopComponent.canClose() it invokes closeLast and it calls
CES.doCloseDocument() which messes with CloneableEditor initialization. Fix adds test for document and editor kit value
in support and skips initVisual when document or editor kit are null.

Actually current synchronization is wrong in this case as it allows call of canClose and closing document during or
before initNonVisual.
Comment 10 Quality Engineering 2009-04-21 08:14:39 UTC
Integrated into 'main-golden', will be available in build *200904210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/48637df6f189
User: Marek Slama <mslama@netbeans.org>
Log: #138686, #161902, #149771: Cancel initialization when document was closed in the meantime
Comment 11 Quality Engineering 2009-07-23 07:49:59 UTC
Integrated into 'main-golden', will be available in build *200907230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/458fb6978cd2
User: Marek Slama <mslama@netbeans.org>
Log: #168959: Remove debug logging used to investigate #138686, #161902, #149771