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 250478 - Netbeans freezes after using javascript code templates
Summary: Netbeans freezes after using javascript code templates
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 21:40 UTC by Christian Lenz
Modified: 2015-09-10 01:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snapshot (139.50 KB, application/octet-stream)
2015-02-17 21:40 UTC, Christian Lenz
Details
ui gestures (24.81 KB, application/octet-stream)
2015-02-17 21:41 UTC, Christian Lenz
Details
messages log (65.23 KB, application/octet-stream)
2015-02-17 21:42 UTC, Christian Lenz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lenz 2015-02-17 21:40:58 UTC
Created attachment 152044 [details]
snapshot

I have a php project based on wordpress, so a lot of files. I have a javascript file with some validation and some functions. When I use the code templates for javascript like for "if" or "cl" (console.log) and hit tab, sometimes works, sometimes or often the IDE freezes after hitting tab.

I tried to reproduce it with hitting ctrl + space, I got the "please wait..." hint and than I typed if -> tab and the whole ide freezes. I could created a snapshop for console.log. It tooked seconds, and than it worked again. And often, for example when I try it with "if" I have to kill the netbeans process.

See my attachments for more information. Hope that helps.


Cheers

Chris
Comment 1 Christian Lenz 2015-02-17 21:41:36 UTC
Created attachment 152045 [details]
ui gestures
Comment 2 Christian Lenz 2015-02-17 21:42:22 UTC
Created attachment 152046 [details]
messages log
Comment 3 Ondrej Vrabec 2015-02-18 09:05:27 UTC
waiting for lock in
org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.runWhenScanFinished()
org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask() ?
Comment 4 Tomas Zezula 2015-02-27 09:08:41 UTC
Javascript vs Javascript:

Javascipt + CSL calls PM.parseWhenScanFinished() in EDT which does parsing and needs to acquire parser lock, which is held by javascript code completion for 14sec (Innactive RequestProcessor Thread: Was Folder Recognizer...).

The parsing operation should not be called in EDT.
Comment 5 Petr Pisl 2015-03-24 15:43:36 UTC
Probably duplicate of issue #248260. Need more investigation to confirm this.
Comment 6 Petr Pisl 2015-07-16 11:49:52 UTC
The PM.parseWhenScanFinished() is called from GsfCodeTemplateProcessor when a template is inserted to the source. 

The code completion can be computed for longer time when is looking fro all symbols from the project (Double click CTRL+SPACE) and the project is big. 

So there are two problems. The CSL should not call PM.parseWhenScanFinished() in EDT and should be fixed in CSL.

The second problem is that the CSL code completion is not cancelable. We need to change the CSL CodeCompletionHandler to be able cancel the computation. Probably we can reuse the CancelSupport from parsing api. 

I'm reassigning this issue to CSL to solve the problem with calling PM.parseWhenScanFinished() in EDT and the second problem we will solve separately.
Comment 7 Milutin Kristofic 2015-09-09 12:14:07 UTC
CSL is not calling pm.parseWhenScanFinished in edt
http://hg.netbeans.org/jet-main/rev/f535bace66d1
Comment 8 Quality Engineering 2015-09-10 01:27:47 UTC
Integrated into 'main-silver', will be available in build *201509100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f535bace66d1
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #250478 - Netbeans freezes after using javascript code templates