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 187747 - CleneableEditor is not initialized
Summary: CleneableEditor is not initialized
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: David Strupl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-17 19:10 UTC by janario
Modified: 2010-08-20 12:03 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jstack dump (15.03 KB, text/plain)
2010-06-17 19:13 UTC, janario
Details
messages.log for deadlock (103.73 KB, application/octet-stream)
2010-06-17 19:13 UTC, janario
Details

Note You need to log in before you can comment on or make changes to this bug.
Description janario 2010-06-17 19:10:18 UTC
Just had renamed a class while a CVS update was running. Then the IDE window turned grey.

Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Linux version 2.6.31-22-generic running on i386
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01
Comment 1 janario 2010-06-17 19:13:20 UTC
Created attachment 100180 [details]
jstack dump
Comment 2 janario 2010-06-17 19:13:40 UTC
Created attachment 100181 [details]
messages.log for deadlock
Comment 3 Jan Lahoda 2010-06-30 11:44:17 UTC
The main issue here is (IMO) that a component opening is blocked, because an exception is thrown in the background opening thread (see the messages.log). I have modified the GoToTypeAction to use NbDocument.findRecentEditorPane, but that does not fix the actual problem:
http://hg.netbeans.org/jet-main/rev/ccbabb58e60d

Also, I think that EditorCookie.getOpenedPanes should be deprecated (although there is no 100% replacement), as I do not know about any use case when the use of this method would be correct after the lazy editor opening - is there such a usecase?
Comment 4 Quality Engineering 2010-07-03 03:51:54 UTC
Integrated into 'main-golden', will be available in build *201007030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ccbabb58e60d
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #187747: (partial) do not use EditorCookie.getOpenedPanes.
Comment 5 David Strupl 2010-07-07 14:45:34 UTC
This is not a 6.9.1 blocker IMHO. Making it P2.
Comment 6 David Strupl 2010-07-27 12:31:01 UTC
I would like someone from VCS team to evaluate whether the exception from the log:

INFO [org.netbeans.modules.mercurial]: execEnv():  execEnv(): IOException
java.io.IOException: java.io.IOException: error=2, Arquivo ou diretório não encontrado
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
Caused: java.io.IOException: Cannot run program "hg": java.io.IOException: error=2, Arquivo ou diretório não encontrado
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
	at org.netbeans.modules.mercurial.util.HgCommand.exec(HgCommand.java:2887)
	at org.netbeans.modules.mercurial.util.HgCommand.execEnv(HgCommand.java:2839)
	at org.netbeans.modules.mercurial.util.HgCommand.execForVersionCheck(HgCommand.java:3105)
	at org.netbeans.modules.mercurial.util.HgCommand.getHgVersion(HgCommand.java:598)
	at org.netbeans.modules.mercurial.Mercurial.checkVersionIntern(Mercurial.java:199)
	at org.netbeans.modules.mercurial.Mercurial.access$000(Mercurial.java:81)
[catch] at org.netbeans.modules.mercurial.Mercurial$1.run(Mercurial.java:190)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)

Is benign or malign during document opening. If it is benign please assign back. If it can actually cause the file not to open please handle as VCS bug. Thanks.
Comment 7 Ondrej Vrabec 2010-07-27 13:26:45 UTC
IMO it's unrelated.
The logged exceptions warns user that he has some folders under mercurial control, however no hg executable has been found. The check for hg version should not interfere with opening a file (i can't imagine how it could), it runs in a background thread and it's only result should be disabling mercurial actions in the IDE.
Comment 8 David Strupl 2010-08-20 11:14:05 UTC
Ok, I will examine the AssertionError in 


java.lang.AssertionError
	at org.openide.text.CloneableEditor$DoInitialize.initNonVisual(CloneableEditor.java:571)
	at org.openide.text.CloneableEditor$DoInitialize.run(CloneableEditor.java:327)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1456)
	at org.openide.text.CloneableEditor$DoInitialize.<init>(CloneableEditor.java:294)
	at org.openide.text.CloneableEditor.initialize(CloneableEditor.java:229)
	at org.openide.text.CloneableEditor.componentShowing(CloneableEditor.java:205)
Comment 9 David Strupl 2010-08-20 12:03:21 UTC
I am sorry but I am marking this issue as fixed after just adding some more logging. If this happens again please turn on the logging via

-J-Dorg.openide.text.level=FINE

and attach the message log file again. Without more info we are unable to do more.

http://hg.netbeans.org/jet-main/rev/80577d258587