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.
Seems that JS model may contain cycles causing the JSIndexer to enter an infinite recursion. See the attached heapdump.
The infinite recursion also occurs when you try to open the elfinder.min.js (attached) in editor (not sure if it's the same problem or separate issue).
Created attachment 136277 [details] elfinder.min.js
Heap dump is available here: <https://netbeans.org/projects/profiler/downloads/download/Heapdumps/heapdump_231782.zip>
*** Bug 231884 has been marked as a duplicate of this bug. ***
This one might be duplicate: #231782.
There are three cycles in the model. elFinder.prototype.debug.d.d references elFinder.prototype.debug.d elFinder.prototype.notify.e.e references elFinder.prototype.notify.e window.elFinder.clipboard.clipboard reference window.elFinder.clipboard
I think the cause is on line 644 of formatted js: }, debug: function(b, c) { var d = this.options.debug; In model the problem lies in ModelUtils:392 (btw it is a bit ugly to change model form type resolution imo). Looks like this.options.debug is resolved to the outer debug and thus the cycle. I would say it is wrongly resolved, but I might be wrong. The code is too complex. Safety catch would be to modify ModelUtils:391 from "if (function != null) {" to "if (function != null && function != object.getParent()) {"
Perhaps the catch should be there anyway as it is imo pointless to create such one level cycle even if it would be in the source.
There is more problems. The objects that are stored more times are: elFinder.prototype.debug.d elFinder.prototype.debug.arguments elFinder.prototype.notify.f elFinder.prototype.notify.g elFinder.prototype.notify.d elFinder.prototype.notify.e elFinder.prototype.notify.arguments elFinder.prototype.notify.c elFinder.prototype.notify.l elFinder.prototype.notify.j elFinder.prototype.notify.k elFinder.prototype.notify.h elFinder.prototype.notify.i window.elFinder.path2array window.elFinder.shortcuts window.elFinder.diff window.elFinder.hide window.elFinder.file window.elFinder.selectedFiles window.elFinder.getUI window.elFinder.option window.elFinder._commands window.elFinder.D window.elFinder.E window.elFinder.F window.elFinder.G window.elFinder.A .... Another problem is that the parameters generate the fqn as objects inside the functions, so there can be two objets with the same fqn, like if you have method : function (d) { var d = d || expression. } can lead to the inconsistency in the model.
And Petr H. is right. There was also bug in the resolveSemiTypeChain method.
Fixed in web-main: http://hg.netbeans.org/web-main/rev/dcc5fff1dbaa Thanks to Petr H. for his contribution.
Petre I think it would also useful to add a model test for this issue (model golden file).
I agree. Added : http://hg.netbeans.org/web-main/rev/f3a5f6fdb8e7
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/dcc5fff1dbaa User: Petr Pisl <ppisl@netbeans.org> Log: #231782 - Infinite recursion in JsIndexer causing OOM.
*** Bug 231363 has been marked as a duplicate of this bug. ***
*** Bug 232806 has been marked as a duplicate of this bug. ***
*** Bug 231690 has been marked as a duplicate of this bug. ***
Say my IDE is up to date and am geting this error, so, not fixed?