Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000797XdebugUsage problemspublic2012-03-16 21:472012-05-01 17:26
Reporterryanp 
Assigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
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
Attached Files? file icon test.php [^] (153 bytes) 2012-03-19 14:47
? file icon test2.php [^] (124 bytes) 2012-03-19 14:47
log file icon xdebug.log [^] (11,969 bytes) 2012-03-19 14:48
log file icon rix.xdebug.log [^] (44,562 bytes) 2012-04-16 16:12
log file icon rix2.xdebug.log [^] (29,529 bytes) 2012-04-16 17:05
? file icon rix2.test.php [^] (236 bytes) 2012-04-16 17:06

- Relationships

-  Notes
(0001986)
ryanp (reporter)
2012-03-16 21:58

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.
(0001987)
derick (administrator)
2012-03-16 22:00

Can you please provide the script and the remote debug log? The smaller and self-contained the script, the better.
(0001998)
ryanp (reporter)
2012-03-19 14:52

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.
(0002012)
derick (administrator)
2012-03-24 23:54

I can reproduce this with your scripts and remote_log.
(0002033)
derick (administrator)
2012-04-08 13:53

I can no longer reproduce this. Not sure why though, but could you try the latest version from github?
(0002038)
ryanp (reporter)
2012-04-10 16:18

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.
(0002043)
rixbeck (reporter)
2012-04-16 15:58

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.
(0002044)
derick (administrator)
2012-04-16 16:06

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!
(0002045)
rixbeck (reporter)
2012-04-16 16:13

Uploaded.
(0002046)
derick (administrator)
2012-04-16 16:29

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.
(0002047)
rixbeck (reporter)
2012-04-16 16:34

I see. Trying to compile the fresher one. Reporting back with the results. Thanks.
(0002048)
rixbeck (reporter)
2012-04-16 17:04

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.
(0002086)
derick (administrator)
2012-04-23 20:17

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 13:53 derick Note Added: 0002033
2012-04-08 13:53 derick Status assigned => feedback
2012-04-10 16:18 ryanp Note Added: 0002038
2012-04-10 16:18 ryanp Status feedback => assigned
2012-04-16 15:58 rixbeck Note Added: 0002043
2012-04-16 16:06 derick Note Added: 0002044
2012-04-16 16:12 rixbeck File Added: rix.xdebug.log
2012-04-16 16:13 rixbeck Note Added: 0002045
2012-04-16 16:29 derick Note Added: 0002046
2012-04-16 16:34 rixbeck Note Added: 0002047
2012-04-16 17:04 rixbeck Note Added: 0002048
2012-04-16 17:05 rixbeck File Added: rix2.xdebug.log
2012-04-16 17:06 rixbeck File Added: rix2.test.php
2012-04-23 20:17 derick Note Added: 0002086
2012-04-28 00:47 derick Status assigned => closed
2012-04-28 00:47 derick Resolution open => fixed
2012-04-28 00:47 derick Fixed in Version => 2.2.0


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker