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 206981 - "New PHP file" CRASHES NetBeans 7.1
Summary: "New PHP file" CRASHES NetBeans 7.1
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0.1
Hardware: All All
: P2 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-01-06 10:40 UTC by monk.e.boy
Modified: 2012-02-13 12:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (30.49 KB, text/plain)
2012-01-06 10:54 UTC, monk.e.boy
Details
profile of the IDE (55.39 KB, application/octet-stream)
2012-01-06 11:13 UTC, monk.e.boy
Details
PHP File for performance test (936.88 KB, application/x-php)
2012-01-09 15:34 UTC, Ondrej Brejla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description monk.e.boy 2012-01-06 10:40:07 UTC
From the Project tabs, right click on a folder and 'add new file' (a PHP file)

Enter the file name in the dialog. Click 'Finish', then nothing happens. The Finish button stays pushed in and the app crashes.

The CPU is at 100% 'handles' is going up and down at about 40 a second.

There is NMIndexStoreSvr.exe is also at 100% CPU
Comment 1 Tomas Mysik 2012-01-06 10:46:19 UTC
Please, provide your:
- IDE version (Help > About)
- IDE logs (in <nb-userdir [1]>/var/log/messages) - attach, do not copy & paste

Just reopen this issue.

Thanks.
[1] can be found in Help > About dialog
Comment 2 Tomas Mysik 2012-01-06 10:48:48 UTC
(In reply to comment #1)
> - IDE version (Help > About)

I meant "IDE and Java version" (both can be found in Help > About dialog).
Comment 3 monk.e.boy 2012-01-06 10:54:29 UTC
Created attachment 114683 [details]
messages.log

Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_29; Java HotSpot(TM) Client VM 20.4-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
User directory: C:\Documents and Settings\David Folan\.netbeans\7.1
Cache directory: C:\Documents and Settings\David Folan\.netbeans\7.1\var\cache


Scanning projects is always stuck at 80% and uses 100% CPU
Comment 4 monk.e.boy 2012-01-06 10:56:41 UTC
opening bug
Comment 5 monk.e.boy 2012-01-06 11:13:04 UTC
Created attachment 114684 [details]
profile of the IDE

I read the FAQ and did a profile dump like it asks for
Comment 6 monk.e.boy 2012-01-06 11:16:27 UTC
I removed the cornishfoodmarket project from the Projects tab and the 'scanning' now completes
Comment 7 Tomas Mysik 2012-01-06 12:13:18 UTC
Thanks for the profiler snapshot, looking at it...
Comment 8 Tomas Mysik 2012-01-06 12:18:32 UTC
Seems to be a problem in PHP editor - please evaluate, thanks.

org.netbeans.modules.php.editor.model.impl.ScopeImpl.filter() 65 invocations 6602 ms
java.util.ArrayList.size() 3774 ms 185 invocations

@reporter: Could you, please, provide more information about your "cornishfoodmarket" project? How big is it?

Thanks.
Comment 9 Ondrej Brejla 2012-01-06 12:32:10 UTC
Can you extract that parts, which doesn't cause that problem and leave there just the smallest one which cases that problem and can you provide that "smaller" project to us? Thanks.
Comment 10 Ondrej Brejla 2012-01-06 12:42:21 UTC
And please, can you make a bigger snapshot? This is quite small...
Comment 11 Ondrej Brejla 2012-01-06 13:48:35 UTC
Maybe you have in a project some really really big file with just one or two (three? ;) big blocks and with a bunch of assignments in there? Please, try to figure out what exactly causes that problem. Thanks!
Comment 12 monk.e.boy 2012-01-06 16:35:04 UTC
I have recreated the project and added it to my 'projects' and now NetBeans is stuck on 71% (cornishfoodmarket) so I will attempt to figure out where the error is on Monday 6th Jan, 2012

The project is a small Zend Framework + Propel, I have a lot of other bigger projects with ZF but this is the only one using Propel.
Comment 13 monk.e.boy 2012-01-09 09:36:34 UTC
how do you force 'scanning projects...' to start? Adding and removing files from a project doesn't seem to do it.

Just before the 'scanning projects...' stops working it says something like 'initializing HTML parser' (this only flashed up for a second)
Comment 14 monk.e.boy 2012-01-09 09:38:57 UTC
Sorry, I have that wrong, it says 'initializing HTML validator'
Comment 15 Tomas Mysik 2012-01-09 10:05:47 UTC
(In reply to comment #13)
> how do you force 'scanning projects...' to start?

Source > Scan for External Changes will do that.
Comment 16 monk.e.boy 2012-01-09 14:59:27 UTC
For anyone who is following this, I emailed part of a project that was the cause of this error to obrejla@netbeans.org. It turns out that Expression Engine (a PHP CMS we use) has a 1meg PHP file (iptonation.php) which causes NetBeans to choke.
Comment 17 Ondrej Brejla 2012-01-09 15:34:43 UTC
Created attachment 114735 [details]
PHP File for performance test

Use this file for test of the scanning performance (normally it takes about 25 minutes...after fix it should take about 2.5secs).
Comment 18 Ondrej Brejla 2012-01-09 15:36:23 UTC
Fixed in web main: http://hg.netbeans.org/web-main/rev/3f8f870815a3

7.1 patch 1 candidate.

Vlado, please, can you verify that? Thanks.
Comment 19 Vladimir Riha 2012-01-10 07:34:58 UTC
Seems fine, Scanning finishes very quickly and IDE is responsive as it should be.


Product Version: NetBeans IDE Dev (Build web-main-6680-on-20120109)
Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17
System: Linux version 2.6.38-13-generic running on amd64; UTF-8; en_US (nb)
Comment 20 Quality Engineering 2012-01-10 17:03:15 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/3f8f870815a3
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #206981 - "New PHP file" CRASHES NetBeans 7.1
Comment 21 Vladimir Riha 2012-02-13 12:29:39 UTC
verified 7.1.1

Product Version: NetBeans IDE 7.1.1 (Build 201202122200)