Originally CR 6745708 and escalation # 1-24574501
Please evaluate and possible also fix in 6.5.
Sunstudio 12 netbeans IDE does not handle files over 1Mb like previous sunstudio releases.
When opening source files (C++) over 1Mb in sunstudio 12 netbeans IDE, you get a warning saying the file is too large to be safely open and would make the IDE unusable.
If you despite open a file around 1.7Mb, it will be displayed in the editor correctly.
Exiting the IDE without closing the file and relaunching the IDE will make the file editing window blank for that file or the IDE will hang with the following netbeans error logs :
java.lang.IllegalStateException: [Winsys] TopComponent
Size=,minimumSize=,preferredSize=] throws runtime exception from its componentActivated() method. Repair it!
[catch] at org.openide.windows.WindowManager.activateComponent(WindowManager.java:255)
(complete error stack trace in attachment)
previous releases of sunstudio do not show this limitation and/or allowed alternate editors (editors that do not map the whole file in memory but use temporary files for editing).
*** (#1 of 1): 2008-09-08 01:39:50 PDT ...
also fails with netbeans 6.5
*** (#1 of 2): 2008-09-08 01:39:50 PDT ...
This issue was also discussed at:
...There have been similar issues filed against other modules.
For instance: http://www.netbeans.org/issues/show_bug.cgi?id=133746
has been filed against the xml module. The bug entry also has the link
to the fix that was made in xml module, which might prove a handy
reference if and when the fix is made in the cnd module....
*** (#2 of 2): 2008-09-08 10:12:38 PDT ...
There is a variation on the problem where once the huge file is accepted,
the IDE exited, then upon subsequent automatic re-opening of the file during IDE
startup, the editor view is empty and there is an NPE when some warning is
printed into the editor status area. THE NPE happens because the Document
assigned to the editor is null.
That is not a P2 for 6.5 release. in other words we can release still having this issue. At the same time we will have a
look and try to help.
Not reproducible in NB 6.5. Likely to be fixed in http://hg.netbeans.org/main/rev/5ab5287545fa.
Created attachment 69631 [details]
Test case (3 files from Linux kernel concatenated)
The referred patch http://hg.netbeans.org/main/rev/5ab5287545fa was part of NetBeans 6.1 FCS release. It's unlikely this
changeset fixed this issue, if the issue was (AFAIK) found/reproduced in NB 6.1.
Issue is reproducible in NB 6.1, IDE hangs after restart with a big file opened in the editor.
java stack trace is attached.
Created attachment 70325 [details]
java stack trace
Updated version and priority to match context of the issue
In the attached stack dump I can see that "Refresh Editor Context" thread is blocked by "AWT-EventQueue-1". Lock is held
by org.netbeans.modules.debugger.jpda.projects.EditorContextImpl. Looks like this hang has nothing to do with CND.
"Refresh Editor Context" daemon prio=3 tid=0x08f1f400 nid=0x24 waiting for monitor entry [0xf77ff000..0xf77ffbf0]
java.lang.Thread.State: BLOCKED (on object monitor)
- waiting to lock <0xb0194b40> (a java.lang.Object)
"AWT-EventQueue-1" prio=3 tid=0x08e74800 nid=0x21 in Object.wait() [0xf8ffe000..0xf8fff970]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb0e751b0> (a org.openide.text.CloneableEditor$DoInitialize)
- locked <0xb0194b40> (a java.lang.Object)
The issue is not reproducible in NB6.5 so we need to find a changeset fixing this issue.
To be honest I attach java stacktrace for SunStuduio IDE based on NB6.1patch3.
Created attachment 70333 [details]
SSIDE java stacktrace
Downgraded as not a bug for NB6.5
The candidate changeset to fix the hang is http://hg.netbeans.org/main/rev/fe15228c9896 (see IZ 136601).
This is *Sun Services* driven issue for NB 5.5.1, 6.0.1 and 6.1. Back to P2 priority, because this issue *must* be P1 or
P2, if it has to go to NB Patch of any releases from NB 5.5.1 to 6.1 including.
I do admit, this issue is not P2 for 6.5, however that's why version field says "6.1".
Do not touch the priority unless pre-approved by NetBeans Sustaining team. Thank you for understanding.
thank you for providing the changeset. I'll check the changeset with Marek Slama first, because it failed apply to
release61_fixes when I tried to transplant it.
I've committed the change into release551_fixes branch in CVS repository cvs.netbeans.org:/cvs
Checking in manifest.mf;
/shared/data/ccvs/repository/openide/text/Attic/manifest.mf,v <-- manifest.mf
new revision: 184.108.40.206.220.127.116.11.4.1; previous revision: 18.104.22.168.22.214.171.124
Checking in src/org/openide/text/CloneableEditor.java;
/shared/data/ccvs/repository/openide/text/src/org/openide/text/Attic/CloneableEditor.java,v <-- CloneableEditor.java
new revision: 126.96.36.199.188.8.131.52; previous revision: 184.108.40.206.2.1
Checking in src/org/openide/text/CloneableEditorSupport.java;
new revision: 220.127.116.11.18.104.22.168.6.1; previous revision: 22.214.171.124.126.96.36.199
I've pushed the fix to release61_fixes repository as http://hg.netbeans.org/release61_fixes/rev/22ead8b7b9f2 .
It's a combination of changeset referred in desc18 of this issue and two changesets fixing issue 136601
http://hg.netbeans.org/main/rev/2c6d217d573a and http://hg.netbeans.org/main/rev/fe15228c9896
This issue is virtually in VERIFIED FIXED state in context of NB 6.1. I'll keep this issue opened until after this issue
would have been fixed also in release601_fixes CVS branch.
Side note: during testing of this fix there were several occurrences of java.lang.NoSuchMethodError related to newly
added method, which for some (unknown) reason does not get inherited into some modules/classes. To get this fixed in
C/C++ context, all C/C++ modules depending on CloneableEditor resp. CloneableEditorSupport classes need to be refreshed
on UC with updated dependency on fixed openide.text module. This includes four modules cnd(.core), cnd.completion,
cnd.modelutil and cnd.refactoring. This has been covered in specification version increment changeset
http://hg.netbeans.org/release61_fixes/rev/93949c273fff . Unfortunately this may, but must not introduce appearance of
java.lang.NoSuchMethodError in other areas of usage of NetBeans IDE. This needs wider functional testing. Similar issue
happened for new field added in NB 6.1 Patch2 and it is described in issue 150037. Basically it should be relatively
safe to ignore the exception. The most correct solution seems to be UC refresh of all modules directly depending on
CloneableEditor resp. CloneableEditorSupport classes, but it's more than 80 modules and the only change would be that
it's just compiled against newer openide.text without any further change. Also it's not know at this moment, which
modules are behind the java.lang.NoSuchMethodError exception, so the list of modules has been limited just to C/C++
area. In other words, this is good candidate to remove from patch, but still worth trying. Hanging IDE is more serious
issue than occasional appearance of java.lang.NoSuchMethodError, which does not seem to have an influence on IDE
verified in 5.5.1 with manually installed nbms from PromoG1Patch4
verified in 6.1patch5
It seems to be fixed and verified for all NB versions