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 109675 - exception window on file open, no popup menu, javac StackOverflowError in the log
Summary: exception window on file open, no popup menu, javac StackOverflowError in the...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-07-13 18:28 UTC by Viktor Lapitski
Modified: 2008-12-22 13:35 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
source (133.26 KB, text/plain)
2007-07-13 18:30 UTC, Viktor Lapitski
Details
first dump file (195.08 KB, application/octet-stream)
2007-07-13 18:31 UTC, Viktor Lapitski
Details
one more dump file (134.40 KB, text/plain)
2007-07-13 18:32 UTC, Viktor Lapitski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Viktor Lapitski 2007-07-13 18:28:51 UTC
Current NB60 trunk build. 
There is an exception window (with text like one below) shown during 
opening of the attached file. A StackOverflowError from the javac can 
be found in the attached .dump.
Attempt to open popup menu each time results in the exception like one below. 
 
==== exception window text =====
Annotation: An error occurred during parsing of 'C:\tmp\wrk\wss\NetBeansProjects\UMLProject11Sources\src\SQLLexer.java'.
Please report a bug against java/source and attach dump file 'C:\tmp\wrk\uss\uk60_6_jdk28\var\log\SQLLexer_19.dump'.
Annotation: An error occurred during parsing of 'C:\tmp\wrk\wss\NetBeansProjects\UMLProject11Sources\src\SQLLexer.java'.
Please report a bug against java/source and attach dump file 'C:\tmp\wrk\uss\uk60_6_jdk28\var\log\SQLLexer_19.dump'.
An error occurred during parsing of 'C:\tmp\wrk\wss\NetBeansProjects\UMLProject11Sources\src\SQLLexer.java'. Please
report a bug against java/source and attach dump file 'C:\tmp\wrk\uss\uk60_6_jdk28\var\log\SQLLexer_19.dump'.
An error occurred during parsing of 'C:\tmp\wrk\wss\NetBeansProjects\UMLProject11Sources\src\SQLLexer.java'. Please
report a bug against java/source and attach dump file 'C:\tmp\wrk\uss\uk60_6_jdk28\var\log\SQLLexer_19.dump'.
Caused: java.lang.AssertionError
	at com.sun.tools.javac.api.JavacTaskImpl.parse(JavacTaskImpl.java:231)
	at org.netbeans.api.java.source.JavaSource.moveToPhase(JavaSource.java:1119)
	at org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:82)
	at org.netbeans.modules.j2ee.ejbcore._RetoucheUtil$2.run(_RetoucheUtil.java:115)
	at org.netbeans.modules.j2ee.ejbcore._RetoucheUtil$2.run(_RetoucheUtil.java:114)
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:563)
	at org.netbeans.modules.j2ee.ejbcore._RetoucheUtil.getJavaClassFromNode(_RetoucheUtil.java:113)
	at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.EJBActionGroup.enable(EJBActionGroup.java:106)
	at org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:589)
	at org.openide.util.actions.NodeAction$DelegateAction.<init>(NodeAction.java:534)
	at org.openide.util.actions.NodeAction.createContextAwareInstance(NodeAction.java:329)
	at
org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.EJBActionGroup.createContextAwareInstance(EJBActionGroup.java:143)
	at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.translateContextLookupAction(NbEditorKit.java:327)
	at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.addAction(NbEditorKit.java:372)
	at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.buildPopupMenu(NbEditorKit.java:302)
	at org.netbeans.editor.ext.ExtKit$BuildPopupMenuAction.actionPerformed(ExtKit.java:237)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:266)
	at org.netbeans.editor.ext.ExtEditorUI.showPopupMenu(ExtEditorUI.java:145)
	at org.netbeans.editor.ext.ExtCaret.showPopup(ExtCaret.java:361)
	at org.netbeans.editor.ext.ExtCaret.mouseReleased(ExtCaret.java:368)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.Component.processMouseEvent(Component.java:6038)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
	at java.awt.Component.processEvent(Component.java:5803)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Viktor Lapitski 2007-07-13 18:30:41 UTC
Created attachment 45084 [details]
source
Comment 2 Viktor Lapitski 2007-07-13 18:31:48 UTC
Created attachment 45085 [details]
first dump file
Comment 3 Viktor Lapitski 2007-07-13 18:32:29 UTC
Created attachment 45086 [details]
one more dump file
Comment 4 Jan Lahoda 2007-07-13 20:44:55 UTC
Reproducible with given file, but I cannot reproduce with other files. Sorry, but I do not think that this qualifies as
P1. Thanks for the report.
Comment 5 Viktor Lapitski 2007-07-13 21:32:31 UTC
according to the current criterias the NB60 is allowed to go out with P3s. 
I'm suprised that you're honestly thinking that release can be done 
without doing absolutely nothing about :

- inability to work in Java Editor - NB60 _main_ feature - with a wide 
class of java source files (if you took a look into the exception trace, 
you know that it isn't just "given" file, it is a class of files)

- doing java source parsing 
in the context of org.netbeans.editor.ext.ExtCaret.showPopup(ExtCaret.java:361)
Comment 6 Jan Lahoda 2007-07-15 11:31:52 UTC
The problem is that the AST is too high, so the visitors simply run out of the stack (because of the initializer of the
yy_packed0 field, which is in form literal+literal+literal+..., the expression has ~1800 elements). The only solutions
that came to my mind so far:
-set -Xss to a higher level (javac uses -Xss4m). Not sure if this would have any negative impact. Petr, Radim?
-enable coalescing of string literal expressions (as javac does by default). Would break reformatting, and would not
help in case of variable+variable+variable+... . So I do not like this variant.

Re: doing java source parsing in the context of org.netbeans.editor.ext.ExtCaret.showPopup(ExtCaret.java:361): please
report this to the caller of JavaSource.runUserActionTask, ie. org.netbeans.modules.j2ee.ejbcore._RetoucheUtil (please
note that the Java infrastructure complains loudly about being called from the AWT).
Comment 7 Jan Lahoda 2007-09-12 18:07:02 UTC
I am afraid I do not see a better solution than making the stack size bigger (which should not be so big problem, if I
understood pnejedly correctly). IIRC, we fit into the 1MB stack size with the attached file, but 2MB (at least) would
give us more safety.
Comment 8 Petr Nejedly 2007-09-21 10:31:15 UTC
Increased the default stack size to 2MB in the netbeans.conf. Please verify it helps.
ide/launcher/netbeans.conf,v1.26
Comment 9 Petr Nejedly 2007-09-21 13:13:27 UTC
Well, actually fixed in:
ide/launcher/netbeans.conf,v1.27
The first attempt was wrong.