View Issue Details

IDProjectCategoryView StatusLast Update
0000797XdebugUncategorizedpublic2012-05-01 16:26
Reporterryanp Assigned 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
Description

I 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 Reproduce

Set 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.
Attached Files
test.php (153 bytes)
test2.php (124 bytes)
xdebug.log (11,969 bytes)   
Log opened at 2012-03-19 14:45:48
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/ryan/git/treat/htdocs/test.php" language="PHP" protocol_version="1.0" appid="3563" idekey="ECLIPSE_DBGP"><engine version="2.2.0rc1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>

<- feature_set -i 212 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="212" feature="show_hidden" success="1"></response>

<- feature_set -i 213 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="213" feature="max_depth" success="1"></response>

<- feature_set -i 214 -n max_children -v 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="214" feature="max_children" success="1"></response>

<- feature_get -i 215 -n encoding
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="215" feature_name="encoding" supported="1"><![CDATA[iso-8859-1]]></response>

<- feature_get -i 216 -n supports_async
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="216" feature_name="supports_async" supported="1"><![CDATA[0]]></response>

<- stdout -i 217 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="217" success="1"></response>

<- stderr -i 218 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stderr" transaction_id="218" success="0"></response>

<- breakpoint_set -i 219 -t line -f file:///home/ryan/git/treat/lib/Treat/Controller/Abstract.php -n 260
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="219" id="35630001"></response>

<- breakpoint_set -i 220 -t line -f file:///home/ryan/git/treat/htdocs/test2.php -n 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="220" id="35630002"></response>

<- run -i 221
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="221" status="break" reason="ok"><xdebug:message filename="file:///home/ryan/git/treat/htdocs/test2.php" lineno="7"></xdebug:message></response>

<- stack_get -i 222
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="222"><stack where="Base::basetest" level="0" type="file" filename="file:///home/ryan/git/treat/htdocs/test2.php" lineno="7"></stack><stack where="Test-&gt;test" level="1" type="file" filename="file:///home/ryan/git/treat/htdocs/test.php" lineno="7"></stack><stack where="{main}" level="2" type="file" filename="file:///home/ryan/git/treat/htdocs/test.php" lineno="11"></stack></response>

<- stack_get -i 223
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="223"><stack where="Base::basetest" level="0" type="file" filename="file:///home/ryan/git/treat/htdocs/test2.php" lineno="7"></stack><stack where="Test-&gt;test" level="1" type="file" filename="file:///home/ryan/git/treat/htdocs/test.php" lineno="7"></stack><stack where="{main}" level="2" type="file" filename="file:///home/ryan/git/treat/htdocs/test.php" lineno="11"></stack></response>

<- context_get -i 224 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="224" context="1"><property name="$_COOKIE" fullname="$_COOKIE" address="140081368467208" type="array" children="1" numchildren="5" page="0" pagesize="31"><property name="__utma" fullname="$_COOKIE[&#39;__utma&#39;]" address="140081368468192" type="string" size="56" encoding="base64"><![CDATA[MTE0MjA3ODUuMTczNjI0NjY3OS4xMzAxNjAzMjEwLjEzMzE5MzQ3NTguMTMzMjE2NzUyNi40NDg=]]></property><property name="__utmz" fullname="$_COOKIE[&#39;__utmz&#39;]" address="140081368468824" type="string" size="69" encoding="base64"><![CDATA[MTE0MjA3ODUuMTMwMTYwMzIxMC4xLjEudXRtY3NyPShkaXJlY3QpfHV0bWNjbj0oZGlyZWN0KXx1dG1jbWQ9KG5vbmUp]]></property><property name="PHPSESSID" fullname="$_COOKIE[&#39;PHPSESSID&#39;]" address="140081368469264" type="string" size="26" encoding="base64"><![CDATA[ZTQxcnZsMmI0bGJmZ25kZmUxMThvMXA4bzQ=]]></property><property name="__utmb" fullname="$_COOKIE[&#39;__utmb&#39;]" address="140081368469656" type="string" size="24" encoding="base64"><![CDATA[MTE0MjA3ODUuNC4xMC4xMzMyMTY3NTI2]]></property><property name="__utmc" fullname="$_COOKIE[&#39;__utmc&#39;]" address="140081368469992" type="string" size="8" encoding="base64"><![CDATA[MTE0MjA3ODU=]]></property></property><property name="$_ENV" fullname="$_ENV" address="140081368470360" type="array" children="0" numchildren="0" page="0" pagesize="31"></property><property name="$_FILES" fullname="$_FILES" address="140081368470136" type="array" children="0" numchildren="0" page="0" pagesize="31"></property><property name="$_GET" fullname="$_GET" address="140081368466232" type="array" children="0" numchildren="0" page="0" pagesize="31"></property><property name="$_POST" fullname="$_POST" address="140081368466984" type="array" children="0" numchildren="0" page="0" pagesize="31"></property><property name="$_REQUEST" fullname="$_REQUEST" address="140081368470584" type="array" children="0" numchildren="0" page="0" pagesize="31"></property><property name="$_SERVER" fullname="$_SERVER" address="140081368470808" type="array" children="1" numchildren="29" page="0" pagesize="31"><property name="HTTP_HOST" fullname="$_SERVER[&#39;HTTP_HOST&#39;]" address="140081368471296" type="string" size="5" encoding="base64"><![CDATA[dHJlYXQ=]]></property><property name="HTTP_USER_AGENT" fullname="$_SERVER[&#39;HTTP_USER_AGENT&#39;]" address="140081368471872" type="string" size="76" encoding="base64"><![CDATA[TW96aWxsYS81LjAgKFgxMTsgVWJ1bnR1OyBMaW51eCB4ODZfNjQ7IHJ2OjExLjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTEuMA==]]></property><property name="HTTP_ACCEPT" fullname="$_SERVER[&#39;HTTP_ACCEPT&#39;]" address="140081368472336" type="string" size="63" encoding="base64"><![CDATA[dGV4dC9odG1sLGFwcGxpY2F0aW9uL3hodG1sK3htbCxhcHBsaWNhdGlvbi94bWw7cT0wLjksKi8qO3E9MC44]]></property><property name="HTTP_ACCEPT_LANGUAGE" fullname="$_SERVER[&#39;HTTP_ACCEPT_LANGUAGE&#39;]" address="140081368472712" type="string" size="14" encoding="base64"><![CDATA[ZW4tdXMsZW47cT0wLjU=]]></property><property name="HTTP_ACCEPT_ENCODING" fullname="$_SERVER[&#39;HTTP_ACCEPT_ENCODING&#39;]" address="140081368473096" type="string" size="13" encoding="base64"><![CDATA[Z3ppcCwgZGVmbGF0ZQ==]]></property><property name="HTTP_DNT" fullname="$_SERVER[&#39;HTTP_DNT&#39;]" address="140081368473472" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="HTTP_CONNECTION" fullname="$_SERVER[&#39;HTTP_CONNECTION&#39;]" address="140081368473840" type="string" size="10" encoding="base64"><![CDATA[a2VlcC1hbGl2ZQ==]]></property><property name="HTTP_COOKIE" fullname="$_SERVER[&#39;HTTP_COOKIE&#39;]" address="140081368474392" type="string" size="229" encoding="base64"><![CDATA[X191dG1hPTExNDIwNzg1LjE3MzYyNDY2NzkuMTMwMTYwMzIxMC4xMzMxOTM0NzU4LjEzMzIxNjc1MjYuNDQ4OyBfX3V0bXo9MTE0MjA3ODUuMTMwMTYwMzIxMC4xLjEudXRtY3NyPShkaXJlY3QpfHV0bWNjbj0oZGlyZWN0KXx1dG1jbWQ9KG5vbmUpOyBQSFBTRVNTSUQ9ZTQxcnZsMmI0bGJmZ25kZmUxMThvMXA4bzQ7IF9fdXRtYj0xMTQyMDc4NS40LjEwLjEzMzIxNjc1MjY7IF9fdXRtYz0xMTQyMDc4NQ==]]></property><property name="HTTP_CACHE_CONTROL" fullname="$_SERVER[&#39;HTTP_CACHE_CONTROL&#39;]" address="140081368474912" type="string" size="9" encoding="base64"><![CDATA[bWF4LWFnZT0w]]></property><property name="PATH" fullname="$_SERVER[&#39;PATH&#39;]" address="140081368475456" type="string" size="28" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9iaW46L3Vzci9iaW46L2Jpbg==]]></property><property name="SERVER_SIGNATURE" fullname="$_SERVER[&#39;SERVER_SIGNATURE&#39;]" address="140081368475936" type="string" size="66" encoding="base64"><![CDATA[PGFkZHJlc3M+QXBhY2hlLzIuMi4yMCAoVWJ1bnR1KSBTZXJ2ZXIgYXQgdHJlYXQgUG9ydCA4MDwvYWRkcmVzcz4K]]></property><property name="SERVER_SOFTWARE" fullname="$_SERVER[&#39;SERVER_SOFTWARE&#39;]" address="140081368476328" type="string" size="22" encoding="base64"><![CDATA[QXBhY2hlLzIuMi4yMCAoVWJ1bnR1KQ==]]></property><property name="SERVER_NAME" fullname="$_SERVER[&#39;SERVER_NAME&#39;]" address="140081368476696" type="string" size="5" encoding="base64"><![CDATA[dHJlYXQ=]]></property><property name="SERVER_ADDR" fullname="$_SERVER[&#39;SERVER_ADDR&#39;]" address="140081368477064" type="string" size="9" encoding="base64"><![CDATA[MTI3LjAuMC4x]]></property><property name="SERVER_PORT" fullname="$_SERVER[&#39;SERVER_PORT&#39;]" address="140081368477432" type="string" size="2" encoding="base64"><![CDATA[ODA=]]></property><property name="REMOTE_ADDR" fullname="$_SERVER[&#39;REMOTE_ADDR&#39;]" address="140081368477800" type="string" size="9" encoding="base64"><![CDATA[MTI3LjAuMC4x]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER[&#39;DOCUMENT_ROOT&#39;]" address="140081368478504" type="string" size="40" encoding="base64"><![CDATA[L3Zhci93d3ctcHJvamVjdHMvV29ya3NwYWNlL3RyZWF0L2h0ZG9jcw==]]></property><property name="SERVER_ADMIN" fullname="$_SERVER[&#39;SERVER_ADMIN&#39;]" address="140081368479160" type="string" size="19" encoding="base64"><![CDATA[d2VibWFzdGVyQGxvY2FsaG9zdA==]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&#39;SCRIPT_FILENAME&#39;]" address="140081368479608" type="string" size="49" encoding="base64"><![CDATA[L3Zhci93d3ctcHJvamVjdHMvV29ya3NwYWNlL3RyZWF0L2h0ZG9jcy90ZXN0LnBocA==]]></property><property name="REMOTE_PORT" fullname="$_SERVER[&#39;REMOTE_PORT&#39;]" address="140081368479976" type="string" size="5" encoding="base64"><![CDATA[NTk2OTI=]]></property><property name="GATEWAY_INTERFACE" fullname="$_SERVER[&#39;GATEWAY_INTERFACE&#39;]" address="140081368480352" type="string" size="7" encoding="base64"><![CDATA[Q0dJLzEuMQ==]]></property><property name="SERVER_PROTOCOL" fullname="$_SERVER[&#39;SERVER_PROTOCOL&#39;]" address="140081368480728" type="string" size="8" encoding="base64"><![CDATA[SFRUUC8xLjE=]]></property><property name="REQUEST_METHOD" fullname="$_SERVER[&#39;REQUEST_METHOD&#39;]" address="140081368481096" type="string" size="3" encoding="base64"><![CDATA[R0VU]]></property><property name="QUERY_STRING" fullname="$_SERVER[&#39;QUERY_STRING&#39;]" address="140081368481464" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="REQUEST_URI" fullname="$_SERVER[&#39;REQUEST_URI&#39;]" address="140081368481832" type="string" size="9" encoding="base64"><![CDATA[L3Rlc3QucGhw]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&#39;SCRIPT_NAME&#39;]" address="140081368482200" type="string" size="9" encoding="base64"><![CDATA[L3Rlc3QucGhw]]></property><property name="PHP_SELF" fullname="$_SERVER[&#39;PHP_SELF&#39;]" address="140081368482568" type="string" size="9" encoding="base64"><![CDATA[L3Rlc3QucGhw]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&#39;REQUEST_TIME_FLOAT&#39;]" address="140081368482720" type="float"><![CDATA[1332168348.182]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&#39;REQUEST_TIME&#39;]" address="140081368482880" type="int"><![CDATA[1332168348]]></property></property></response>

<- context_get -i 225 -d 0
xdebug.log (11,969 bytes)   
rix.xdebug.log (44,562 bytes)
rix2.xdebug.log (29,529 bytes)
rix2.test.php (236 bytes)
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: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: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.

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)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized