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 160727

Summary: [67cat] Total editor lockup (incl. GUI) when editing
Product: groovy Reporter: goeh <goeh>
Component: EditorAssignee: Petr Hejl <phejl>
Status: RESOLVED FIXED    
Severity: blocker CC: nleck, pjiricka, vstejskal
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 161114    
Bug Blocks:    
Attachments: Thread dumps from jvisualvm when NB hangs
More thread dumps. Problem still exists and is a productivity killer for me. I will send source with private email
thread dump of locked up IDE

Description goeh 2009-03-20 12:27:59 UTC
When editing Grails code the editor totally locks for 40-60 seconds to often. Sometimes I can only work 30 seconds
before it happens again. The happens especially after deleting code.
In 6.5 there was a lockup of 5-6 seconds but now it's much worse.
Everything is locked, even the GUI/repaint is hanging.
Several thread dumps from jvisualvm attached.
Comment 1 goeh 2009-03-20 12:29:38 UTC
Created attachment 78511 [details]
Thread dumps from jvisualvm when NB hangs
Comment 2 goeh 2009-03-20 12:34:32 UTC
Netbeans build in use at the time of report was 200903181604
Comment 3 Petr Hejl 2009-03-20 15:45:44 UTC
Hi Goran,
thanks for the report. However I'm not able to reproduce this so far :( Do you think you could try the latest build
(http://bertram.netbeans.org/hudson/job/web-main/ - the last successful)? Alternatively can you provide a scenario when
it is usually reproducible?

Thanks,
P.
Comment 4 goeh 2009-03-20 23:36:55 UTC
I tested web-main-142-on-090320 but this build is even more crazy. Constant 50-60% CPU utilization and NB GUI freeze 3
seconds then ok for 5 seconds, over and over again. I can't use this build.
Here are my project statistics:
       +----------------------+-------+-------+
       | Name                 | Files |  LOC  |
       +----------------------+-------+-------+
       | Controllers          |    30 |  4618 |
       | Domain Classes       |    49 |  1158 |
       | Services             |     4 |   326 |
       | Tag Libraries        |     1 |   276 |
       | Groovy Helpers       |    10 |   488 |
       | Java Helpers         |     1 |    99 |
       | Unit Tests           |    23 |   463 |
       | Integration Tests    |    11 |   142 |
       +----------------------+-------+-------+
       | Totals               |   129 |  7570 |
       +----------------------+-------+-------+
Hardware: Dual core 2.13GHz 3GB RAM.

It's hard to tell specific use cases, all editing are slow. But large files > 500 lines are worst.
NB 6.5 was also slow when deleting code in large Grails controllers, but not as bad as current builds.
Please advice, what can I do next? (I don't think I'm allowed to send the whole project)
Comment 5 goeh 2009-03-21 08:32:32 UTC
Update: I removed the .netbeans/dev directory and let NetBeans index/scan projects... over night.
Next morning CPU load is down to acceptable levels (5%) and GUI feels faster.
I'll update the issue with more information later this weekend.
Comment 6 Petr Hejl 2009-03-21 10:00:55 UTC
> I don't think I'm allowed to send the whole project
I'm not sure whether you mean this with respect to your company. If you are asking us for permission - than go ahead (or
send it to me with private mail).

There was Parsing API changes (whole new infrastructure) merged to 6.7 so there can be various issues. Perhaps it can't
handle old data stored in userdir... Vita what do you think?

Goran, thanks for all your help.
P.
Comment 7 goeh 2009-03-23 00:36:22 UTC
Created attachment 78607 [details]
More thread dumps. Problem still exists and is a productivity killer for me. I will send source with private email
Comment 8 Petr Hejl 2009-03-25 12:51:25 UTC
Temporary workaround applied - web-main e51d7661f9b1.
Comment 9 Quality Engineering 2009-03-26 14:23:58 UTC
Integrated into 'main-golden', will be available in build *200903260733* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e51d7661f9b1
User: phejl@netbeans.org
Log: #160727 [67cat] Total editor lockup (incl. GUI) when editing (temp workaround)
Comment 10 goeh 2009-03-31 21:44:42 UTC
I tested the "temporary workaround" using web-187 for 1 hour, working with a small service class.
Then I spent only ~10 minutes in the long grails controller.
But even with that short time I could see and feel the difference.
No GUI lockups, just some pauses for 3-4 seconds now and then.
Very positive. I'm productive again!
Unfortunately I have been in meeting mode since then. I will hopefully have time to work on the project again tomorrow.
I will give more feedback then.
Comment 11 Petr Hejl 2009-04-06 12:01:48 UTC
I suppose this issue do not have P2 severity now.
Comment 12 Petr Hejl 2009-04-06 12:27:36 UTC
Reported a slowdown after hours of work. Perhaps not G&G specific - similar to general editor slowdown discussed on
netcat. We'll investigate further.
Comment 13 nleck 2009-05-01 04:17:58 UTC
Created attachment 81367 [details]
thread dump of locked up IDE
Comment 14 nleck 2009-05-01 04:19:14 UTC
I got a lock up when closing documents, thread dump attached. 
Comment 15 Petr Hejl 2009-05-15 13:24:15 UTC
Hi Goran,
there were many fixes (both editor itself & groovy) since the last threaddumps you provided? Any update on this? Any
fresh threaddumps?

Thanks a lot.
P.
Comment 16 Vitezslav Stejskal 2009-05-18 09:57:05 UTC
nleck, your threaddump looks like a dealock in org.openide.text.CloneableEditorSupport and is unrelated to this issue.
Could you please file a separate issue for platform/text component? Thanks
Comment 17 goeh 2009-05-18 10:09:42 UTC
Peter, maybe we should set this issue to FIXED.
I don't have the severe problems I describe in the first description anymore.
I do have lockups once in while, but not so often and severe as before.
Maybe 2-3 times per day, and only 5-10 seconds.
I will try to get a thread dump when it happens, but usually I'm to slow.
For me it's ok to close this issue, and I will open another if I get a thread dump of the minor lockups.
Comment 18 Petr Hejl 2009-05-19 15:08:06 UTC
Ok, let's close this.

Thanks you very much Goran.