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 239339

Summary: NB is jerky and unresponsive
Product: javascript Reporter: Petah
Component: EditorAssignee: Petr Pisl <ppisl>
Status: STARTED ---    
Severity: normal Keywords: PERFORMANCE
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 8 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample
Thread dumps
More thread dumps
messages.log
Screen Shot

Description Petah 2013-12-10 23:08:36 UTC
Created attachment 143036 [details]
Sample

NB is jerky and unresponsive, happens all the time and is super annoying.
Comment 1 Petah 2013-12-10 23:42:58 UTC
Created attachment 143038 [details]
Thread dumps
Comment 2 Petah 2013-12-10 23:43:23 UTC
Add some thread dumps.
Comment 3 Petr Cyhelsky 2013-12-11 14:41:30 UTC
reassigning to javascript
Comment 4 everflux 2014-01-03 11:39:36 UTC
I guess this is a duplicate of https://netbeans.org/bugzilla/show_bug.cgi?id=239185
Comment 5 Petah 2014-01-05 22:47:06 UTC
Any update on this?

Literally can't edit any file with JS in it. NB can't even scroll the file smoothly.
Comment 6 Petah 2014-01-05 22:50:38 UTC
Also just got a Out of memory error.

(Can't upload the file, I have tried before. I'm pretty sure its too big as I have 3GB ram assigned to NB.)
Comment 7 Petah 2014-01-05 22:56:44 UTC
Also it would be nice if I could just totally disable JavaScript support in NB, so I can at least continue to use NB when there is an issue.
Comment 8 Petr Pisl 2014-01-10 08:54:38 UTC
Which build do you use? Could you try the latest dev build. I have made some changes that should improve the situation a lot. Thanks
Comment 9 Petah 2014-01-12 22:38:36 UTC
Tried dev build 201401090002.

Just opening a JS file causes NB to become totally unresponsive. Then its memory blew up (increase by about 1GB within a few seconds). And finally crashes with OOM error.

Attached some thread dumps, with the OOM at the end.
Comment 10 Petah 2014-01-12 22:39:29 UTC
Created attachment 143877 [details]
More thread dumps
Comment 11 Petr Pisl 2014-01-13 09:35:54 UTC
@Petah: Could you please attach the js file? Also could you please try to switch off the navigator window? Thanks.
Comment 12 Petah 2014-01-13 20:06:06 UTC
I can't attach that particular file I used in the last case. There are many similar files here:

https://github.com/PANmedia/raptor-editor/tree/master/src

Tried it with some of those and same thing happened (I opened a few files including src/components/layout/hover-panel.js). 

Im kinda thinking it might be struggling with my prototypes (but don't quote me on that). 

By turn of the navigator window do you mean close it? I closed it and then opened src/components/layout/hover-panel.js but same effect. NB still crashed with OOM.
Comment 13 Petr Pisl 2014-01-14 14:24:33 UTC
I have cloned the repository, created new Html5 Application project with existing sources, where the src folder was chosen as the root folder. I have played with it for a while, open every file, but didn't run in any problem. It would be great, if we can find steps how to reproduce. 

My questions?
- Has the background scanning finished?
- How many files do you have opened?
- Could you run the ide with the options:  -J-Dorg.netbeans.modules.javascript2.editor.parser.JsParser.level=FINE -J-Dorg.netbeans.modules.javascript2.editor.level=FINE and attache the var/messages.log file, when the problems happened.

Thanks.
Comment 14 Petah 2014-01-23 20:18:56 UTC
Yes background scanning is finished, I opened NB, and didn't touch it until it was not showing in the running tasks at the bottom of NB.

It happened even with 1 file open.

Started NB with these options:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m  -J-Xmx3200m -J-XX:+UseConcMarkSweepGC  -J-XX:PermSize=32m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes -J-Dorg.netbeans.modules.javascript2.editor.parser.JsParser.level=FINE -J-Dorg.netbeans.modules.javascript2.editor.level=FINE"

I have attached the message.log and a screenshot.
Comment 15 Petah 2014-01-23 20:19:38 UTC
Created attachment 144320 [details]
messages.log
Comment 16 Petah 2014-01-23 20:20:25 UTC
Created attachment 144321 [details]
Screen Shot
Comment 17 Petah 2014-01-23 20:24:36 UTC
Also note that, in the screenshot, you can see where I open the JS file the memory ramped up from about 1.3GB to 3.2GB in a matter of seconds.
Comment 18 Petah 2014-01-30 19:10:01 UTC
Any updates on this?
Comment 19 Petr Pisl 2014-02-03 12:34:36 UTC
In the message log file there are many exceptions, that some files are locked during scanning. Were some files open in another tool / editor?

Could you please upload zipped heap dump
(C:\Users\David\AppData\Roaming\NetBeans\dev\var\log\heapdump.hprof.old)
here:
<http://deadlock.netbeans.org/job/upload/build>. Thanks.
Comment 20 Petah 2014-02-03 18:56:16 UTC
I can try again to upload a heap dump (will have to be next week), but I have tried before and it fails. Even the zipped heap dump is like 700MB, which would take like 9 hours on my connection to upload. 

It is possible that some files/directories could be locked. Windows Explorer and the Console does acquire locks, and would have been open.