View Issue Details

IDProjectCategoryView StatusLast Update
0000797XdebugUsage problems (Wrong Results)public2012-05-01 16:26
ReporterryanpAssigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformPHP 5.4.0, Apache 2.2.20OSUbuntu LinuxOS Version11.10
Product Version2.2dev 
Target Version2.2.0Fixed in Version2.2.0 
Summary0000797: XDebug terminates (or Eclipse loses it?) when viewing variables
DescriptionI recently updated to PHP 5.4.0 and built XDebug from git (03940ba, 3/13). I am now unable to debug my PHP scripts... but ONLY if I have the 'Variables' tab active in Eclipse Debug. If I select a different tab ('Breakpoints', for example), I am able to debug. If 'Variables' is active when I start debugging, the debug terminates immediately after it starts. If it isn't active, then I can debug, but as soon as I select 'Variables' the debug stops.

With the remote log, I was able to determine that the problem occurs when 'context_get' is issued the second time. It is first issued as 'context_get -i 131 -c 1' -- this one works fine and seems to return all the superglobals. Then 'context_get -i 132 -d 0' is issued, but there is no data returned (presumably because XDebug has crashed/disconnected?).
Steps To ReproduceSet a breakpoint
Run script, XDebug stops at the breakpoint
Select 'Variables' tab in Eclipse (or similar in other IDEs?)
'Unexpected termination of script, debugging ended.'
TagsNo tags attached.
Operating SystemUbuntu Linux 11.10
PHP Version5.4.0

Activities

ryanp

2012-03-16 21:58

reporter   ~0001986

FYI - I can still view the value of some variables by hovering them. Looking at the log, it seems that uses 'property_get -i 205 -n $url -d 0 -p 0', which works fine.

derick

2012-03-16 22:00

administrator   ~0001987

Can you please provide the script and the remote debug log? The smaller and self-contained the script, the better.

ryanp

2012-03-19 14:47

reporter  

test.php (153 bytes)

ryanp

2012-03-19 14:47

reporter  

test2.php (124 bytes)

ryanp

2012-03-19 14:48

reporter  

xdebug.log (11,969 bytes)

ryanp

2012-03-19 14:52

reporter   ~0001998

I did some testing and made a script for you. The problem seems to present itself when a class is calling a static method from a base class in another file. In the same file, there is no problem, and if the base class method is non-static, there's no problem. Additionally, the base class must have some property - static or non-static. With no properties on the base class, again, no problem.

I placed a breakpoint in test2.php:7 (echo 'blah blah blah';) for testing.

derick

2012-03-24 23:54

administrator   ~0002012

I can reproduce this with your scripts and remote_log.

derick

2012-04-08 12:53

administrator   ~0002033

I can no longer reproduce this. Not sure why though, but could you try the latest version from github?

ryanp

2012-04-10 15:18

reporter   ~0002038

I just did a git pull (8ea0093, 4/08) and a clean make, then replaced my xdebug module... still having the same issue. Not sure if it would make a difference, but the PPA with PHP 5.4 updated about a week ago. Don't know what changed in it. I also installed APC yesterday, so I just disabled and tested again - no change.

rixbeck

2012-04-16 14:58

reporter   ~0002043

Same problem here. I'm accidentally updated my debian vbox to testing version with php 5.4 xdebug 2.2.0-rc1. @ryanp has described the problem correctly. Variables window shows a strange '::' entry too.
In log it looks like:
 <property name="::" fullname="::" type="object" classname="LightWork\MVC\Router\Dispatcher" children="0" numchildren="0"></property>

Eclipse log says:
org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : Unexpected XML or parser failure

Don't know any relation might have.

derick

2012-04-16 15:06

administrator   ~0002044

rixbeck, ryanp: This "::" is correct. It refers to the static properties of the class. Can you paste the whole response though rixbeck? As it shouldn't really add this when there are no children. You might want to bring this up with the eclipse people too though!

rixbeck

2012-04-16 15:12

reporter  

rix.xdebug.log (44,562 bytes)

rixbeck

2012-04-16 15:13

reporter   ~0002045

Uploaded.

derick

2012-04-16 15:29

administrator   ~0002046

rixbeck, you're still using RC1, I think I might have fixed it after that. In any case, the last context_get seems to segfault. So what would help me know is a backtrace or a (small) code example.

rixbeck

2012-04-16 15:34

reporter   ~0002047

I see. Trying to compile the fresher one. Reporting back with the results. Thanks.

rixbeck

2012-04-16 16:04

reporter   ~0002048

Now I have 2.2.0rc2-dev but problem still stays it seems. I'm attaching the test and log.
It is important if class B has no property, no error.

rixbeck

2012-04-16 16:05

reporter  

rix2.xdebug.log (29,529 bytes)

rixbeck

2012-04-16 16:06

reporter  

rix2.test.php (236 bytes)

derick

2012-04-23 19:17

administrator   ~0002086

I can reproduce this, now I just need to fix it :-)

Issue History

Date Modified Username Field Change
2012-03-16 21:47 ryanp New Issue
2012-03-16 21:58 ryanp Note Added: 0001986
2012-03-16 22:00 derick Note Added: 0001987
2012-03-16 22:00 derick Assigned To => derick
2012-03-16 22:00 derick Status new => feedback
2012-03-19 14:47 ryanp File Added: test.php
2012-03-19 14:47 ryanp File Added: test2.php
2012-03-19 14:48 ryanp File Added: xdebug.log
2012-03-19 14:52 ryanp Note Added: 0001998
2012-03-19 14:52 ryanp Status feedback => assigned
2012-03-21 10:23 derick Target Version => 2.2.0
2012-03-24 23:54 derick Note Added: 0002012
2012-04-08 12:53 derick Note Added: 0002033
2012-04-08 12:53 derick Status assigned => feedback
2012-04-10 15:18 ryanp Note Added: 0002038
2012-04-10 15:18 ryanp Status feedback => assigned
2012-04-16 14:58 rixbeck Note Added: 0002043
2012-04-16 15:06 derick Note Added: 0002044
2012-04-16 15:12 rixbeck File Added: rix.xdebug.log
2012-04-16 15:13 rixbeck Note Added: 0002045
2012-04-16 15:29 derick Note Added: 0002046
2012-04-16 15:34 rixbeck Note Added: 0002047
2012-04-16 16:04 rixbeck Note Added: 0002048
2012-04-16 16:05 rixbeck File Added: rix2.xdebug.log
2012-04-16 16:06 rixbeck File Added: rix2.test.php
2012-04-23 19:17 derick Note Added: 0002086
2012-04-27 23:47 derick Status assigned => closed
2012-04-27 23:47 derick Resolution open => fixed
2012-04-27 23:47 derick Fixed in Version => 2.2.0
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)