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.
Build: NetBeans IDE Dev (Build 20140821-edc32f0027c2) VM: Java HotSpot(TM) 64-Bit Server VM, 24.65-b04, Java(TM) SE Runtime Environment, 1.7.0_67-b01 OS: Linux User Comments: tmysik: creating html5 from existing sources -> scanning... Stacktrace: java.lang.StackOverflowError at org.netbeans.modules.javascript2.editor.model.impl.JsObjectReference.resolveTypes(JsObjectReference.java:135) at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:495) at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:504) at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:504) at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:504) at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:504)
Created attachment 148806 [details] stacktrace
Exact steps: - download ZIP of this project [1] - create a new HTML5 project for it (set SiteRoot for Project Directory!) - invoke NPM Install (can end with errors) - invoke Bower install -> exception occurs during scanning Thanks. [1] https://github.com/JakubMrozek/Zdrojak Product Version: NetBeans IDE Dev (Build 20140821-edc32f0027c2) Java: 1.7.0_67; Java HotSpot(TM) 64-Bit Server VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01 System: Linux version 3.13.0-34-generic running on amd64; UTF-8; cs_CZ (nb)
*** Bug 246704 has been marked as a duplicate of this bug. ***
Fixed in web-main. Changeset: d2cad080cf2c The fix is not fully correct. The problem is cased basically with this construction: prom.method = function prom(){ }; When the model is created from AST, then the function prom is created as the first one like normally in runtime. But then when is evaluated prom.method access node, then the method property is added to the function prom. As the last step due to the assignment is the method property a function reference to the prom function object. And this introduces cycle reference. Normally in the runtime is the function prom replaced with the anonym function and basically its name is ignored. Unfortunately we are not able now recognized this "pattern" until we resolved the assignment. The fix basically just add the property method as normal property, not reference to the prom function. But it's basically wrong. The right solution would be change the prom function to the anonymous function, create new prom object in the model and add the method property as reference to the anonymous function. But there is one more problem, that the prom function has already property / methods that was used before. And because we are not able to recognized this at the beginning the right solution would probably require go to the through AST two times. I'm not sure, whether it worth for it.
Petře, haven't you forgot to push the change? Thanks.
You are right:). Now it's in the web-main.
Verified, thanks. Product Version: NetBeans IDE Dev (Build 20140828-13009c9548ec) Java: 1.7.0_67; Java HotSpot(TM) 64-Bit Server VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01 System: Linux version 3.13.0-34-generic running on amd64; UTF-8; cs_CZ (nb)
Integrated into 'main-silver', will be available in build *201408290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d2cad080cf2c User: Petr Pisl <ppisl@netbeans.org> Log: #246598 - StackOverflowError at org.netbeans.modules.javascript2.editor.model.impl.JsObjectReference.resolveTypes
*** Bug 246728 has been marked as a duplicate of this bug. ***
*** Bug 246884 has been marked as a duplicate of this bug. ***
Transplanted to releases/release801 branch.
This issue is no longer reproducible, so marking as verified in patch. But issue 247274 happens when one is following steps from comment #2. Product Version: NetBeans IDE 8.0.1 (Build 201409180010) Java: 1.7.0_67; Java HotSpot(TM) Client VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)