Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 146557 - Sunstudio 12 netbeans IDE unable to handle files over 1Mb
Sunstudio 12 netbeans IDE unable to handle files over 1Mb
Product: cnd
Classification: Unclassified
Component: Editor
All All
: P2 (vote)
: 6.x
Assigned To: sustaining
61fixes5-verified, release601_fixes_c...
Depends on:
  Show dependency treegraph
Reported: 2008-09-08 19:18 UTC by Thomas Preisler
Modified: 2009-02-10 15:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

Test case (3 files from Linux kernel concatenated) (376.37 KB, application/x-gzip)
2008-09-11 10:55 UTC, Alexey Vladykin
java stack trace (16.27 KB, text/plain)
2008-09-23 15:21 UTC, Alexander Pepin
SSIDE java stacktrace (13.77 KB, text/plain)
2008-09-23 15:55 UTC, Alexander Pepin

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2008-09-08 19:18:28 UTC
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

(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:
   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 ...
Comment 1 ivan 2008-09-08 21:51:25 UTC
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.

        at org.netbeans.editor.StatusBar.settingsChange(
        at org.netbeans.editor.StatusBar.propertyChange(
        at org.netbeans.editor.StatusBar.<init>(
        at org.netbeans.editor.EditorUI.getStatusBar(
        at org.netbeans.editor.Utilities.setStatusText(
        at org.netbeans.editor.Utilities.clearStatusText(
Comment 2 Leonid Lenyashin 2008-09-09 10:49:27 UTC
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.
Comment 3 Alexey Vladykin 2008-09-10 10:16:17 UTC
Not reproducible in NB 6.5. Likely to be fixed in
Comment 4 Alexey Vladykin 2008-09-11 10:55:06 UTC
Created attachment 69631 [details]
Test case (3 files from Linux kernel concatenated)
Comment 5 rbalada 2008-09-16 12:48:12 UTC
The referred patch 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.
Comment 6 Alexander Pepin 2008-09-23 15:20:12 UTC
Issue is reproducible in NB 6.1, IDE hangs after restart with a big file opened in the editor. 
java stack trace is attached.
Comment 7 Alexander Pepin 2008-09-23 15:21:17 UTC
Created attachment 70325 [details]
java stack trace
Comment 8 rbalada 2008-09-23 15:29:35 UTC
Updated version and priority to match context of the issue
Comment 9 Alexey Vladykin 2008-09-23 15:39:02 UTC
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)
	at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getCurrentURL(
	- 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)
	at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getCurrentEditorCookie(
	- locked <0xb0194b40> (a java.lang.Object)
Comment 10 Alexander Pepin 2008-09-23 15:45:14 UTC
The issue is not reproducible in NB6.5 so we need to find a changeset fixing this issue.
Comment 11 Alexander Pepin 2008-09-23 15:51:13 UTC
To be honest I attach java stacktrace for SunStuduio IDE based on NB6.1patch3.
Comment 12 Alexander Pepin 2008-09-23 15:55:11 UTC
Created attachment 70333 [details]
SSIDE java stacktrace
Comment 13 Alexander Pepin 2008-09-23 16:13:16 UTC
Downgraded as not a bug for NB6.5
Comment 14 Alexey Vladykin 2008-09-23 16:45:10 UTC
The candidate changeset to fix the hang is (see IZ 136601).
Comment 15 rbalada 2008-09-24 10:37:48 UTC
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.

Comment 16 rbalada 2008-09-24 11:56:25 UTC

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.

Comment 17 rbalada 2008-10-16 13:37:00 UTC
I've committed the change into release551_fixes branch in CVS repository

Checking in;
/shared/data/ccvs/repository/openide/text/Attic/,v  <--
new revision:; previous revision:
Checking in src/org/openide/text/;
/shared/data/ccvs/repository/openide/text/src/org/openide/text/Attic/,v  <--
new revision:; previous revision:
Checking in src/org/openide/text/;
/shared/data/ccvs/repository/openide/text/src/org/openide/text/Attic/,v  <--
new revision:; previous revision:
Comment 18 rbalada 2008-11-11 09:17:41 UTC
I've pushed the fix to release61_fixes repository as .

It's a combination of changeset referred in desc18 of this issue and two changesets fixing issue 136601 and

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 . 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

Comment 19 Alexander Pepin 2008-11-11 15:06:43 UTC
verified in 5.5.1 with manually installed nbms from PromoG1Patch4
Comment 20 Alexander Pepin 2009-01-23 13:16:33 UTC
verified in 6.1patch5
Comment 21 Alexander Pepin 2009-01-23 13:18:29 UTC
It seems to be fixed and verified for all NB versions

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo