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 271676 - StackOverflowError at java.lang.Math.min
Summary: StackOverflowError at java.lang.Math.min
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2017-10-20 08:06 UTC by _ tboudreau
Modified: 2017-11-27 17:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 230643

stacktrace (94.83 KB, text/plain)
2017-10-20 08:06 UTC, _ tboudreau
Patch to avoid recursively trying to resolve the same element (1.30 KB, patch)
2017-11-27 17:26 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2017-10-20 08:06:15 UTC
Build: NetBeans IDE Dev (Build 20171012-8fbff2d899d9)
VM: OpenJDK 64-Bit Server VM, 9+181, OpenJDK Runtime Environment, 9+181
OS: Linux

User Comments:
tboudreau: Editing a js source

   at java.lang.Math.min(
   at java.util.Arrays.copyOf(
   at java.util.Arrays.copyOf(
   at java.util.ArrayList.toArray(
   at java.util.ArrayList.addAll(
   at org.netbeans.modules.javascript2.model.JsObjectImpl.getAssignments(
Comment 1 _ tboudreau 2017-10-20 08:06:18 UTC
Created attachment 165327 [details]
Comment 2 _ tboudreau 2017-10-23 17:07:46 UTC
Okay, something is haywire in Bugzilla's spam filter and it's not letting me post the clone message.

I have a github project in which simply opening one file reproduces this bug 100% of the time.  Link is here:
Comment 3 _ tboudreau 2017-11-27 17:24:35 UTC
100% reproducible if you clone and open cfig.js

I will attach a simple patch that fixes the problem.
Comment 4 _ tboudreau 2017-11-27 17:26:06 UTC
Created attachment 165500 [details]
Patch to avoid recursively trying to resolve the same element

Simply tests to see if the method is going to call itself with the same arguments as it is currently called with.