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 244246 - Patch 1 of NetBeans 8 Breaks PHP Projects
Summary: Patch 1 of NetBeans 8 Breaks PHP Projects
Status: RESOLVED DUPLICATE of bug 244197
Alias: None
Product: php
Classification: Unclassified
Component: Twig (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
: 244310 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-02 09:26 UTC by Geertjan Wielenga
Modified: 2015-03-09 09:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
User directory of Torsten Schmitz ts@cossnet.de (83.84 KB, application/zip)
2014-05-02 09:26 UTC, Geertjan Wielenga
Details
npss file (880.81 KB, application/octet-stream)
2014-05-02 10:16 UTC, fabd
Details
thread dumps (13.21 KB, application/zip)
2014-05-02 10:42 UTC, Vladimir Riha
Details
npss snapshot with the last dev verion (622.36 KB, application/octet-stream)
2014-05-03 09:38 UTC, fabd
Details
Thread dump (18.95 KB, application/octet-stream)
2014-05-03 13:40 UTC, Ondrej Brejla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2014-05-02 09:26:53 UTC
Created attachment 147064 [details]
User directory of Torsten Schmitz ts@cossnet.de

Several users have described Patch 1 of NetBeans 8 breaking their existing installations -- background scanning goes on forever after installing the patch.

This is an umbrella issue for this problem.

Scenario 1: Torsten Schmitz ts@cossnet.de

i'm running this version of java: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
javac 1.7.0_51

the following steps I had to do to reproduce the problem, 3 projects were opened at that time:

1) install the 17 updates suggested by netbeans
2) restarted netbeans during update process
3) updated netbeans started normally
4) closed all the projects
5) reopened 1 of them (file > open project)
6) netbeans started "background scanning of projects", and bam, this process runs in a loop.
7) killed 1 java process and tried again: same issue

Scenario 2: Fabien fabien@myprod.net

I'm a Netbeans (PHP version) user since few years, but since yesterday, my editor is unusable. I've re-install Java, re-install Netbeans (8, 8RC1, nightly build) but I've always the same issue when working on my project. The scanning project task stuck at 100%, CPU usage is up to 100%. I'm on Mac OS X 10.9.2. 

With a fresh Netbeans install, the last stable release, after removing user and cache directories, the issue is always present. When I create a new empty PHP project, I don't have this issue. With existing PHP projects (Symfony2 and Silex projects), I've the issue.

Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1
Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Mac OS X version 10.9.2 running on x86_64; UTF-8; fr_FR (nb)
User directory: /Users/neo/Library/Application Support/NetBeans/8.0
Cache directory: /Users/neo/Library/Caches/NetBeans/8.0

Scenario 3: D.A. Ramirez Soto

https://twitter.com/DaRamirezSoto/status/462148331024953344
Comment 1 Tomas Zezula 2014-05-02 09:35:48 UTC
Vlado, please can you try to reproduce it?
Comment 2 fabd 2014-05-02 10:16:49 UTC
Created attachment 147065 [details]
npss file

Here's the npss file.
Comment 3 Tomas Hurka 2014-05-02 10:26:24 UTC
Based on npss file, it looks like it can be caused by this fix: http://hg.netbeans.org/releases/rev/01887f03d448
Comment 4 Ondrej Brejla 2014-05-02 10:27:56 UTC
Could it be related to issue #244197? Can you try the latest PHP dev build [1]? Thanks.

[1] http://deadlock.netbeans.org/job/PHP-build/
Comment 5 Ondrej Brejla 2014-05-02 10:31:45 UTC
It's same stacktrace, so imho it will work for you.

at org.netbeans.modules.php.twig.editor.parsing.TwigParser.parse(TwigParser.java:179)
Comment 6 Vladimir Riha 2014-05-02 10:39:06 UTC
I've tried twice following:
 - install NB 8.0 (PHP distro) using JDK8u5
 - create 3 projects: Symfony2 project, sample project TodoList and project that contains (only) sources of Silex (fat)
 - close all projects
 - install updates (18)
 - reopen these 3 projects:
    - open TodoList, wait for scanning to finish
    - open Silex, wait for scanning to finish
    - open Symfony2 (new Symfony2 project, nothing special), wait for scanning to finish

No scanning loop detected, scanning finished OK in each case. At the end of 2nd attempt, I've added 4th step: open Symfony2 (say "projectX") from previous round and then "Background scanning of projects" was showing 100% for more then 3 minutes (I'll attach thread dumps) and I had to kill IDE. After IDE restart, it seemed to hang on scanning again so I closed the projectX, killed IDE and started it again without the projectX => problem was gone. 

So Symfony2 projectX caused the problem although the same project "projectX+1" in 2nd run was just fine. The only difference was in paths:

projectX: /Applications/XAMPP/xamppfiles/htdocs/pokus
projectX+1: /Users/tester/NetBeansProjects/PhpProject2


Mac OS X 10.9.2 x86_64
Java 1.8.0_05 64bit Server VM 25.5-b02
Runtime Java SE Runtime Environment 1.8.0_05-b13
Comment 7 Vladimir Riha 2014-05-02 10:42:00 UTC
Created attachment 147066 [details]
thread dumps
Comment 8 Ondrej Brejla 2014-05-02 10:46:50 UTC
Lado can you fetch, rebuild php.twig and try it again? It should work, thanks.
Comment 9 fabd 2014-05-02 11:30:06 UTC
Hi,

I've test the latest PHP dev build. I've always the issue. The terminal outputs this (extract when scanning project):

INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1721865351: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1904340817: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1376161859: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1323818727: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 612924944: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1510860471: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1022353725: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 1284444321: Gruntfile.js
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@2677515d returned null parser for Snapshot 730898398: Gruntfile.js
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms
INFO [org.netbeans.modules.git.status]: GitInterceptor.refreshTask: Scanning in progress, trying again in 10 000ms

in loop... I've to kill the IDE.
Comment 10 DoniRS 2014-05-02 11:48:12 UTC
The only way currently to keep a working NB 8.0 version is by reinstalling it and deselect updates in the installation wizard.

I'm not sure which update is causing the problem, but as for now I rather have a working version than having latest updates.
Comment 11 Ondrej Brejla 2014-05-02 12:02:48 UTC
Reporters, please look at that issue #244197 Twig scan problem is solved there and is verified by 2 users. Thanks.
Comment 12 naitsirch 2014-05-02 13:06:41 UTC
Yes, the patch in #244197 (comment 9) fixed the problem for me, too :-)
Comment 13 Vladimir Riha 2014-05-02 13:17:17 UTC
Same with me, the problematic projectX is now being scanned properly (scanning finishes) in web-main build with fix of issue 244197
Comment 14 Ondrej Brejla 2014-05-02 16:07:56 UTC
Thanks for your cooperation.

*** This bug has been marked as a duplicate of bug 244197 ***
Comment 15 fabd 2014-05-03 09:38:09 UTC
Created attachment 147084 [details]
npss snapshot with the last dev verion

Hello,

Sorry, but the issue is always present with the last nightly build version. I've re-install twice it, remove both user and cache dir, and the scanning project task stuck at 100% with my current Silex project. Please look at the npss snapshot.

Product Version: NetBeans IDE Dev (Build 201405020001)
Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Mac OS X version 10.9.2 running on x86_64; UTF-8; fr_FR (nb)
Comment 16 Geertjan Wielenga 2014-05-03 09:40:10 UTC
But you know how to fix it -- see the comments above.
Comment 17 fabd 2014-05-03 09:50:22 UTC
What can I do more ? I've read comments and tested with the last dev version including Twig plugin update (1.20)... That doesn't solve my problem, Netbeans is still unusable.
Comment 18 Geertjan Wielenga 2014-05-03 09:55:08 UTC
OK, didn't realize you had done the Twig plugin changes (you didn't say that you'd done that). Thus far, everyone in this issue and the related one has said that the patch in #244197 (comment 9) fixed the problem for them.
Comment 19 fabd 2014-05-03 10:47:51 UTC
I see, but may be I've a different issue, I don't know (please look at the last npss snapshot). The only thing I'm sure is that I can't use Netbeans.
Comment 20 Geertjan Wielenga 2014-05-03 10:49:18 UTC
You can't use NetBeans 8 after updating to Patch 1? (In which case, just don't use the patch until we've investigated your snapshot.) Or you can't use NetBeans at all ever -- if so, describe that in detail.
Comment 21 Ondrej Brejla 2014-05-03 11:12:34 UTC
Your npss seems to be done with old twig plugin, sorry. You can try to attach here a sample project which causes the problem.

*** This bug has been marked as a duplicate of bug 244197 ***
Comment 22 fabd 2014-05-03 13:22:13 UTC
I can reproduce the bug with different version of Netbeans (8.0 before and after Patch-1 and Nightly build, as I've said in my first mail), it's not the same issue that Twig issue. 

My project contains a folder of NPM modules, if I remove it, Netbeans "scanning project" tasks work fine. I don't know why this folder breaks the "scanning project" task.

You can download the sample project here : http://we.tl/IH5u617VdU

Thanks
Comment 23 Ondrej Brejla 2014-05-03 13:40:48 UTC
Created attachment 147085 [details]
Thread dump

Great! Now I can reproduce that in the dev build too, but the problem is NOT in Twig, problem is in JS indexing. So it's another issue. Please, file new bug report to JavaScript/Editor and attach there the sample project and this thread dump. Thanks.
Comment 24 fabd 2014-05-03 18:38:11 UTC
I've open a new issue (https://netbeans.org/bugzilla/show_bug.cgi?id=244264).

Thanks.
Comment 25 Ondrej Brejla 2014-05-05 07:56:58 UTC
*** Bug 244288 has been marked as a duplicate of this bug. ***
Comment 26 Tomas Zezula 2014-05-06 09:00:28 UTC
*** Bug 244310 has been marked as a duplicate of this bug. ***
Comment 27 lolka_bolka 2015-03-06 12:53:45 UTC
Hello Guys!

I have exactly the same problem as the original poster.

I've tried a ton of thing,s without success. I see, there is a fix for it, I just don't know, how can I apply it. I have no file like this, (TwigParser).

Can somebody help me with this?
Comment 28 lolka_bolka 2015-03-06 12:58:46 UTC
Ok, nevermind, what I've sad. DoniRS@netbeans.org comment helped me out. I've turned off the updates at the installation, and now my Netbeans is working, Background Scanning finished at 100%.
Comment 29 dennie 2015-03-09 09:30:16 UTC
I had this problem with NetBeans stuck at 100% in background scanning.

I'm running Windows 8, Netbeans 8.0.2 PHP and using Laravel 5.

I saw that some of the local node.js modules installed in the project, hit the Windows maxlength of 260 chars in the filepath. 

Especially Laravel Elexir Gulp module "laravel-elixir"

I reinstalled those node.js modules globally 
(npm install laravel-elixir -g)

and deleted then in the Netbeans project.

Now it works fine. With all the latest updates!

It might be that Netbeans don't manage to handle that exception 
that exist in Windows (but not in Linux and Mac)
Comment 30 Vladimir Riha 2015-03-09 09:47:06 UTC
Please do not change bug resolution. Thank you

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