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 179533 - Infinite loop in php debugger
Summary: Infinite loop in php debugger
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: rmatous
URL:
Keywords:
: 180998 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-15 03:50 UTC by wedgedkc
Modified: 2010-02-22 11:06 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
testcase (2.74 KB, application/zip)
2010-01-15 03:50 UTC, wedgedkc
Details
remote_log from xdebug (215.91 KB, application/zip)
2010-01-15 03:50 UTC, wedgedkc
Details
messages log (62.00 KB, text/x-log)
2010-01-26 06:14 UTC, Filip Zamboj
Details
xdebug.log (3.54 MB, text/x-log)
2010-02-19 04:00 UTC, Filip Zamboj
Details
messages.log generated at the same session as previous xdebug log (3.90 MB, text/x-log)
2010-02-19 04:03 UTC, Filip Zamboj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wedgedkc 2010-01-15 03:50:16 UTC
Created attachment 93309 [details]
testcase

Hello,

in my testcase (attached) I put a breakpoint on line 6. When I hit it and then expand the $form variable, either one of two things happen:

1. netbeans starts using all cpu and seems to go into an infinite loop. If I have the xdebugger remote_log enabled it causes an evergrowing logfile.

2. netbeans starts spewing out socket exception dialogs and I have to force quit netbeans.

I'm running the current svn version of netbeans (r3212). If I use an older release (from mid october) this doesn't happen. I've reported the issue[1] with xdebug but they think it's a netbeans issue.

Do you have any idea what could be causing this?

best regards,
Otto

[1] http://bugs.xdebug.org/view.php?id=520
Comment 1 wedgedkc 2010-01-15 03:50:58 UTC
Created attachment 93310 [details]
remote_log from xdebug
Comment 2 Filip Zamboj 2010-01-25 09:22:15 UTC
I can't reproduce any infinite loop here. but maybe I'm missing something. Otto, check my steps, please. 

0. I set xdebug.remote_debugging = on 
1. I downloaded your test case 
2. I added breakpoint on line 6 $form['Company1 information']['profile_country']['#weight'] = -5;
3. IDE hit breakpoint 
4. I expanded $form in Variables view 

My IDE didn't get frozen and the biggest log file I got was 164K. Is there something else I'm missing? 

Thanks a lot!
Comment 3 Filip Zamboj 2010-01-25 09:23:11 UTC
sorry, for the step 0., it was xdebug.remote_log=<path to log file> not xdebug.remote_debugging
Comment 4 wedgedkc 2010-01-25 12:23:54 UTC
Hi Filip,

I noticed now that I wrote "netbeans (r3212)". What I meant was r3212 of xdebug. Which xdebug version are you running?
Comment 5 Filip Zamboj 2010-01-25 14:56:07 UTC
Hi, 

Xdebug: 
Version 2.0.4

Supported protocols
DBGp - Common DeBuGger Protocol $Revision: 1.125.2.6 $
GDB - GNU Debugger protocol 	$Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol 	$Revision: 1.22 $ 

PHP Version 5.2.10-2ubuntu6.4
Linux2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 

I'm about to try out on MAC but I don't have any available at the moment. Hopefully I'll get to one this week.
Comment 6 wedgedkc 2010-01-25 15:33:57 UTC
Can you try with a newer version of xdebug? There is a beta out at http://pecl.php.net/package/Xdebug I think you should see the same issue with that version.
Comment 7 Filip Zamboj 2010-01-26 05:06:34 UTC
OK, I'll try. Let's figure out if it's our or xdebug bug :).
Comment 8 Filip Zamboj 2010-01-26 06:12:18 UTC
Hi, 

i can confirm this bug happens with new beta xdebug (2.1.0beta1). My log has something about 12M and IDE is responding very slowly. In the end, I got what you see in messages.log. 

Radek, can you confirm it's xdebug bug? Thanks.
Comment 9 Filip Zamboj 2010-01-26 06:14:02 UTC
Created attachment 93558 [details]
messages log
Comment 10 wedgedkc 2010-01-30 04:01:43 UTC
derick from xdebug wrote this in the issue on their side. not sure if it's of any help:

"From the logs it looks like netbeans runs "property_get" after the script has ended... don't know why, but that is what happens."
Comment 11 wedgedkc 2010-02-04 01:48:27 UTC
There is now a beta2 version out of xdebug[1]. I get the same issues with this version.

And a new comment from derick: "(I can see this clearly as a netbeans issues btw)"

[1] http://pecl.php.net/package/Xdebug
Comment 12 wedgedkc 2010-02-19 03:21:45 UTC
More information that might be helpful:
Revision 3174 of xdebug was the one that broke things. Revision 3173 works fine for me.
Comment 14 Filip Zamboj 2010-02-19 03:41:59 UTC
(In reply to comment #13)
> references:
> http://svn.xdebug.org/cgi-bin/viewvc.cgi?view=rev&root=xdebug&revision=3174
> http://bugs.xdebug.org/view.php?id=417

all right, thanks. we will have a look.
Comment 15 Filip Zamboj 2010-02-19 04:00:59 UTC
Created attachment 94323 [details]
xdebug.log
Comment 16 Filip Zamboj 2010-02-19 04:03:18 UTC
Created attachment 94324 [details]
messages.log generated at the same session as previous xdebug log

btw, exception was thrown after I stopped debugging session
Comment 17 rmatous 2010-02-19 12:10:16 UTC
Fixed:
http://hg.netbeans.org/web-main/rev/07806b14db9f
Comment 18 wedgedkc 2010-02-21 08:10:39 UTC
Great. Will the fix be available in the next nightlies? http://bits.netbeans.org/dev/nightly/latest/
Comment 19 Quality Engineering 2010-02-21 22:29:58 UTC
Integrated into 'main-golden', will be available in build *201002220200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/07806b14db9f
User: Radek Matous <rmatous@netbeans.org>
Log: #179533 - Infinite loop in php debugger
Comment 20 wedgedkc 2010-02-22 01:00:47 UTC
Great job! Everything seems ok with the latest xdebug rev (3222).
Comment 21 rmatous 2010-02-22 02:03:06 UTC
*** Bug 180999 has been marked as a duplicate of this bug. ***
Comment 22 rmatous 2010-02-22 06:55:56 UTC
*** Bug 180998 has been marked as a duplicate of this bug. ***
Comment 23 Filip Zamboj 2010-02-22 07:49:02 UTC
verified
Product Version: NetBeans IDE Dev (Build 2010-02-22_15-04-22 )
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
Comment 24 Filip Zamboj 2010-02-22 07:49:11 UTC
Product Version: NetBeans IDE Dev (Build 2010-02-22_15-04-22 )
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01