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 244220 - background scanner locks up (100% CPU) on Symfony 2 Projects that have TWIG files (*.twig)
Summary: background scanner locks up (100% CPU) on Symfony 2 Projects that have TWIG f...
Status: RESOLVED DUPLICATE of bug 244197
Alias: None
Product: php
Classification: Unclassified
Component: Twig (show other bugs)
Version: 8.0
Hardware: PC Linux
: P1 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-30 23:04 UTC by pjacferreira
Modified: 2014-05-01 15:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pjacferreira 2014-04-30 23:04:27 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Linux version 3.13.0-24-generic running on amd64
Java; VM; Vendor = 1.7.0_55
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.55-b03
UBUNTU 14.04 - New Install (less than 24 hours)

On a new installation of IDE 8.0 I was opening my old projects (coming from NetBeans 7.4) when I noticied that the background scanner would lock up (i.e. one CPU would go to 100% and the progress bar would stop increasing). I actually left the house for at least an hour, and the progress bar did not move forward (not even 1%).

What did I do to come to my conclusion that the problem was with the TWIG module:
1. Since this was new installation I, deleted .netbeans directory and restarted netbeans (as soon as I opened the symfony project the CPU with to 100%. Please note that I opened other projects, not symfony based, and had no problems).
2. I deleted and re-created the project i.e. I Created a new PHP project with Existing Sources, again, when I hit finish on the New Project Wizard - CPU went to 100%.

So, I looked on Google and saw some bug reports (old) on symlinks causing recursion in the background scanner, so I had the idea of:

1. Moving most of the projects sub-directory, to a temporary folder, outside of the netbeans project folder, and restarted netbeans. 
-> The 1st time I did this, everything went okay, background scanner finished no problems.

2. I added the web sub-directory, that symfony had created (some php, css, etc. files) the scanner ran (system monitor show peak on atleast one cpu core)
-> everything went okay.

3. I tried to add the app directory (WHILE NETBEANS WAS OPEN) and as soon as I did that 
-> the CPU WENT TO 100%
-> I had to close netbeans and kill the offending java process

4. I removed the app directory, and re-started NETBEANS.

5. I then proceeded to add the app's sub-directories, ONE BY ONE.
-> When I added the app/Resources directory, the CPU went to 100%. 
-> The app/Resources directory has only a single file: app/Resources/views/base.html.twig (created by symfony, not by me, as part of the symfony app creation process).

5. I removed the base.html.twig file, leaving app/Resources/views EMPTY,
-> When I restarted Netbeans there was no problem.

I think the problem can be replicated using any TWIG file, since every time I added a directory with a TWIG file (modified by me, or official files included as part of symfony-2.0.13, the CPU went to 100%).

I tried to disable the twig module, by modyfing org-netbeans-modules-php-twig.xml (in the ~/.netbeans/8.0/config/Modules), but that didn't work, as every time I restarted netbeans, my changes would be overwritten and the the module would be activated.

I'm no longer able to open this project in Netbeans 8.0 and have to use another editor/IDE for just this project.
Comment 1 Ondrej Brejla 2014-05-01 15:27:28 UTC

*** This bug has been marked as a duplicate of bug 244197 ***