|Anonymous | Login | Signup for a new account||2018-06-22 04:28 BST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001335||Xdebug||Remote Debugging||public||2016-08-04 09:26||2018-01-22 18:21|
|Status||closed||Resolution||unable to reproduce|
|Platform||windows 7||OS||OS Version|
|Target Version||2.6.0||Fixed in Version||2.6.0rc1|
|Summary||0001335: When debug gives "can not get property"|
|Description||Problem starts from 2.4.0 for php7.|
You can see all on screenshots.
On php 5.6 Xdebug 2.4.0 works fine. But php7 Xdebug 2.4.0 or 2.4.1 gives "can not get property"
|Tags||No tags attached.|
|Attached Files|| php7-xdebug.2.4.1.jpg [^] (248,179 bytes) 2016-08-04 09:26
php5.6-xdebug2.4.0.jpg [^] (260,906 bytes) 2016-08-04 09:27
xdebuglog-php7-xdebug.2.4.1.jpg [^] (1,039,384 bytes) 2016-08-04 09:27
xdebug php 7.0.9 xdebug 2.4.0.png [^] (63,219 bytes) 2016-08-12 16:53
test.php [^] (928 bytes) 2017-04-12 20:32
xdebug_can_not_get_property.png [^] (5,058 bytes) 2017-04-12 20:39
1335.png [^] (35,444 bytes) 2017-04-16 09:27
xdebug.log [^] (14,266 bytes) 2017-04-18 11:26
xdebug-ibotpeaches.log [^] (19,070 bytes) 2017-04-18 17:27
26dev.png [^] (38,956 bytes) 2017-04-21 13:00
xdebug.tar [^] (16,896 bytes) 2017-12-21 02:51
|Please follow the instructions at https://xdebug.org/support.php#remote [^] to submit a good debugger issue. I will need that before I can investigate and fix this.|
Its hard to make you a small script, because its all in core of yii and yii2 framework (also using DB).
I found that this BUG already was in earlier version of Xdebug:
check this out:
Can you please take a look, maybe it is a same problem
$object1 = new stdClass();
$object1->someProperty = "o1";
$object2 = new stdClass();
$object2->someProperty = "o2";
$storage = new SplObjectStorage();
And it falls with Xdebug ...
SplObjectStorage bug fixed in later version of PHP (7.0.6). Tried with 7.0.8 (working).
But still problem with "can not get property" (phpstorm 2016.2 + yii (or yii2)).
Please do not close issue, maybe someone can help.
|Sorry, I still need a small reproducible script.|
Hi I'm also having this problem and have tried 2.4.0, 2.4.1 and 2.4.2.
Unfortunately I've tried and failed to make a small reproducible script. The issue seems to arise when in the middle of production code involving a larger memory footprint, or more complex objects and array hierarchies. Many people on our team have the issue and it is really really frustrating - if you can give me some pointers in debugging xdebug on linux I'd be happy to try and debug for you (never debugged c code before!)
|acuthbert - can you at least provide a self contained re-reproducible case though? (And preferably, with Xdebug 2.5.0RC1).|
|Can't reproduce, and the requested feedback was not provided.|
While I still don't have a minimal case, I managed to find a correlation between this bug's symptom in a production case and a _similar_ symptom in a minimal case.
In the production case I am trying to expand a private property of a base class of $this, and I get the "can not get property" symptom. I can make the symptom go away by changing the property to protected or public.
In the minimal case I am working on, I get an "undefined property" notice when I try to expand a private property of a base class of $this. The notice _also_ goes away when I change the property in the base class to protected or public.
This bug is ABSOLUTELY CRIPPLING. I am running into it ALL THE TIME but ONLY EVER when debugging large codebases.
There will be no SMALL reproducing script EVER.
You should probably downgrade your expecation of "short and self-contained" to just "self-contained", as in a vagrant box with a full Laravel project in it.
I have attached a minimal testfile, with which i am able to reproduce the problem.
Just set a breakpoint on the "exit;" and try to view the content of the inner class.
Linux 2.6.32 x86_64
edited on: 2017-04-12 21:17
Radiat-r, you're a genius.
I've confirmed this does reproduce the error on:
If this gets fixed it'll really help me. I can't understand why it's not a more commonly reported issue. That said we did interview a senior developer yesterday whose debug method was still print and exit; :(
|derick can we get this issue reopened now there's a reproducible test case?|
I still can't reproduce this with the attached test case. I've tried:
PHP 5.6.30, in ZTS and non-ZTS mode, with Xdebug 2.5.1 and 2.5.2-dev
PHP 7.0.15, in non-ZTS mode, with Xdebug 2.5.1
PHP 7.1.4-dev, in non-ZTS mode, with Xdebug 2.5.2-dev
also I had valgrind loaded to see memory/corruption issues.
In each case, I get the right answer, as is shown in the 1335.png attachment.
radiat-r, can you produce an Xdebug remote log with your debugging session?
Instructions are at https://xdebug.org/support.php#remote [^]
And everybody, please make sure you're using at least Xdebug 2.5.1.
I have uploaded the requested logfile.
For privacy reasons, sensitive information has been removed and replaced with XXXXXXX.
This log has been taken from a different machine with PHP 7.1.3 and Xdebug v2.5.1 installed. The error shows up here as well.
|Radiat-r - the simplified case you showed here has no privacy sensitive code, so if you say you can reproduce it with that, I would need a remote log to go with *that* specific script. And line numbers etc need to match exactly too.|
The log was produced with that specific, unmodified script.
The sensitive parts were removed from the logfile, e.g. Cookie-Values, Hostname and Path-Information, which should be irrelevant to the case.
Adding my xdebug.log as well, remote log w/ no redaction.
Breakpoint on "exit" line, same error. This started lately with PHPStorm 2017 update, I may be chasing the wrong problem. I might downgrade and try again.
|I have a hunch about what is causing this. I'll have an in depth look later.|
|I can reproduce this with PhpStorm 2017.1.3, but not with 2016.3.2. I need to check whether PhpStorm does it right, or Xdebug does it right.|
edited on: 2018-01-14 13:33
I think I would say this is an unfortunate side effect of fixing a bug.
Xdebug sends the following packet containing:
<property name="*middle\abstrct\abstractmiddle*inner" fullname="$outer->middle->*middle\abstrct
\abstractmiddle*inner" facet="private" type="object" classname="inner\inner" children="1" numchildren
The important bit being "$outer->middle->*middle\abstrct\abstractmiddle*inner" (which gets XML-decoded
It then constructs (in 2007.1.3) the following followup:
property_get -i 35 -n $outer->middle->*middle\\abstrct\\abstractmiddle*inner -d 0 -c 0 -p 0
It incorrectly adds the slashes here, as it does not use double quotes, which is needed if you add slashes. I think this was in order to be able to deal with things like bug https://youtrack [^]
.jetbrains.com/issue/WI-34998 and https://bugs.xdebug.org/view.php?id=1305 [^]
It doesn't do that in 2016.3.2, where the command it constructs is:
<- property_get -i 35 -n $outer->middle->*middle\abstrct\abstractmiddle*inner -d 0 -c 0 -p 0
The adding of slashes was added due to https://youtrack.jetbrains.com/issue/WI-34998 [^] and https://bugs [^]
.xdebug.org/view.php?id=1305, which is only fixed in Xdebug 2.6dev.
So right now, the following combinations work:
Xdebug 2.5.x with PhpStorm 2016(.3.2)
Xdebug 2.6dev with PhpStorm 2017(.1.3).
|Thanks derick - I'll give 2.6dev a go and let you know what I get.|
|acuthbert, any luck?|
|Sorry derick - it's probably obvious, but I can't see how to get 2.6dev - do I compile from source? But I can't see a 2.6 branch?|
|It's the master branch on GitHub, and yes, you compile it from source.|
|Oh course, no problem.|
|Sorry, derick, same problem for me on storm 2017.1.3 and 2.6dev (see attached screenshot)|
|derick, confusingly the test.php script does work correcly! But as the previous shot shows there issue can still be reproduced.|
|I'm going to need a way to reproduce that locally again then.|
edited on: 2017-06-26 09:02
i just came across this issue. funny thing it runs on my notebook but not on my workstation.
i did some tests with different php versions and xdebug versions but with the same php code and same versions of php and xdebug i get "can not get property"
i checked all the xdebug config values on both systems
i stripped the code down to a minimun and can invite you to the repository
update: i just switched from phpstorm 2017 to the 2016 versions and somehow this works?! strange behaivor because on my notebook 2017 runs.
edited on: 2017-12-21 04:50
I've been able to reproduce this in a simple script, which i've attached to this ticket (xdebug.tar). It was a bit tricky (and took me all afternoon) due to requiring the use of namespaces before it manifests.
What seems to be happening is, as described, PhpStorm 2017.1.3 when talking to xdebug 2.6 is adding extra slashes to escape the name pathing bugs.
But it also looks like the deeper the properties you explore, the more "layers" of escaping are applied, and xdebug/phpstorm are in disagreement about how that's supposed to work.
This is seen in the xdebug logs:
<- property_get -i 17 -n $b->*TestA\\TestB\\TestC\\A*data1 -d 0 -c 0 -p 0
-> [... OK ...]
<- property_get -i 18 -n $b->*TestA\\\\TestB\\\\TestC\\\\A*data1->items -d 0 -c 0 -p 0
-> [... can not get property ...]
Investigating deeper it looks like the failure is on PHP Storm's side, and relates to the xdebug 2.6-dev specific changes made here:
To that end I'll lodge a separate report with JetBrains and update this comment with a link back to that.
My local setup (same as 0001503):
Xdebug Version: 2.6(dev) 912eaeb8338d2945b6a424a1962e18fab854105b
PHP 7.2.0 (cli) (built: Nov 28 2017 20:38:49) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.0, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0dev, Copyright (c) 2002-2017, by Derick Rethans
Note it says "v2.6.0dev" only because I customised the version string to ensure it was actually using the compiled version, rather than the most recent "v.2.6.0alpha1" pre-compiled module, which also exhibits this bug.
Build #PS-173.3942.32, built on December 13, 2017
Subscription is active until April 18, 2018
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
|Escaping issue reported to JetBrains: https://youtrack.jetbrains.com/issue/WI-39317 [^]|
|This is very much related to 0001514 and 0001515. I also believe PhpStorm does do it wrong currently.|
|I'm closing this, as on the Xdebug side everything now works. The test case log at https://github.com/xdebug/xdebug/blob/master/tests/bug01335.phpt#L25-L62 [^] shows the right interaction. If PhpStorm does it differently (which, apparently, it does), it is a bug in PhpStorm. From what I gather, they're actively working on fixing this too.|
|2016-08-04 09:26||zuluzzz||New Issue|
|2016-08-04 09:26||zuluzzz||File Added: php7-xdebug.2.4.1.jpg|
|2016-08-04 09:27||zuluzzz||File Added: php5.6-xdebug2.4.0.jpg|
|2016-08-04 09:27||zuluzzz||File Added: xdebuglog-php7-xdebug.2.4.1.jpg|
|2016-08-04 10:17||derick||Note Added: 0003666|
|2016-08-04 10:17||derick||Assigned To||=> derick|
|2016-08-04 10:17||derick||Status||new => feedback|
|2016-08-04 10:17||derick||Category||Usage problems (Wrong Results) => Remote Debugging|
|2016-08-04 12:06||zuluzzz||Note Added: 0003667|
|2016-08-04 12:06||zuluzzz||Status||feedback => assigned|
|2016-08-04 12:11||zuluzzz||Note Added: 0003668|
|2016-08-09 10:33||zuluzzz||Note Added: 0003670|
|2016-08-09 23:01||derick||Note Added: 0003671|
|2016-08-12 16:51||acuthbert||Note Added: 0003675|
|2016-08-12 16:53||acuthbert||File Added: xdebug php 7.0.9 xdebug 2.4.0.png|
|2016-11-16 21:23||derick||Note Added: 0003755|
|2016-11-16 21:25||derick||Status||assigned => feedback|
|2016-12-11 23:47||derick||Note Added: 0004012|
|2016-12-11 23:47||derick||Status||feedback => resolved|
|2016-12-11 23:47||derick||Resolution||open => unable to reproduce|
|2017-03-26 19:16||rulatir||Note Added: 0004241|
|2017-03-26 21:06||rulatir||Note Added: 0004242|
|2017-03-27 02:51||rulatir||Note Deleted: 0004241|
|2017-04-12 14:30||rulatir||Note Added: 0004254|
|2017-04-12 14:42||rulatir||Note Added: 0004255|
|2017-04-12 14:44||rulatir||Note Deleted: 0004255|
|2017-04-12 20:32||radiat-r||File Added: test.php|
|2017-04-12 20:38||radiat-r||Note Added: 0004256|
|2017-04-12 20:39||radiat-r||File Added: xdebug_can_not_get_property.png|
|2017-04-12 21:16||acuthbert||Note Added: 0004257|
|2017-04-12 21:17||acuthbert||Note Edited: 0004257||View Revisions|
|2017-04-12 21:17||acuthbert||Note Edited: 0004257||View Revisions|
|2017-04-12 21:18||acuthbert||Note Added: 0004258|
|2017-04-16 00:29||derick||Status||resolved => acknowledged|
|2017-04-16 09:27||derick||PHP Version||7.0.0-7.0.4 => 7.0.15-7.0.19|
|2017-04-16 09:27||derick||Note Added: 0004266|
|2017-04-16 09:27||derick||Status||acknowledged => feedback|
|2017-04-16 09:27||derick||File Added: 1335.png|
|2017-04-18 11:26||radiat-r||File Added: xdebug.log|
|2017-04-18 11:26||radiat-r||Note Added: 0004277|
|2017-04-18 12:03||derick||Note Added: 0004278|
|2017-04-18 13:33||radiat-r||Note Added: 0004280|
|2017-04-18 17:27||iBotPeaches||Note Added: 0004284|
|2017-04-18 17:27||iBotPeaches||File Added: xdebug-ibotpeaches.log|
|2017-04-18 17:30||derick||Note Added: 0004285|
|2017-04-18 17:50||derick||Note Added: 0004286|
|2017-04-19 15:12||derick||Note Added: 0004289|
|2017-04-19 15:16||acuthbert||Note Added: 0004290|
|2017-04-20 23:52||derick||Note Added: 0004307|
|2017-04-21 11:57||acuthbert||Note Added: 0004311|
|2017-04-21 12:21||derick||Note Added: 0004312|
|2017-04-21 12:24||acuthbert||Note Added: 0004313|
|2017-04-21 12:59||acuthbert||Note Added: 0004314|
|2017-04-21 13:00||acuthbert||File Added: 26dev.png|
|2017-04-21 13:08||acuthbert||Note Added: 0004315|
|2017-04-21 13:16||derick||Note Added: 0004316|
|2017-06-23 09:30||Till||Note Added: 0004359|
|2017-06-26 09:02||Till||Note Edited: 0004359||View Revisions|
|2017-12-21 02:51||v1nce||File Added: xdebug.tar|
|2017-12-21 03:03||v1nce||Note Added: 0004525|
|2017-12-21 03:06||v1nce||Note Edited: 0004525||View Revisions|
|2017-12-21 04:50||v1nce||Note Edited: 0004525||View Revisions|
|2017-12-21 05:14||v1nce||Note Added: 0004526|
|2018-01-04 16:50||derick||Status||feedback => acknowledged|
|2018-01-04 16:50||derick||Target Version||=> 2.6.0|
|2018-01-14 00:38||derick||Note Added: 0004559|
|2018-01-14 13:33||derick||Note Edited: 0004289||View Revisions|
|2018-01-14 14:44||derick||Note Added: 0004560|
|2018-01-14 14:44||derick||Status||acknowledged => closed|
|2018-01-14 14:44||derick||Fixed in Version||=> 2.6.0|
|2018-01-22 18:21||derick||Fixed in Version||2.6.0 => 2.6.0rc1|
|Copyright © 2000 - 2018 MantisBT Team|