MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001335XdebugRemote Debuggingpublic2016-08-04 09:262017-06-23 09:30
Reporterzuluzzz 
Assigned Toderick 
PriorityhighSeverityminorReproducibilityalways
StatusfeedbackResolutionunable to reproduce 
Platformwindows 7OSOS Version
Product Version2.4.1 
Target VersionFixed in Version 
Summary0001335: When debug gives "can not get property"
DescriptionProblem 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"
TagsNo tags attached.
Operating System
PHP Version7.0.15-7.0.19
Attached Filesjpg file icon php7-xdebug.2.4.1.jpg [^] (248,179 bytes) 2016-08-04 09:26


jpg file icon php5.6-xdebug2.4.0.jpg [^] (260,906 bytes) 2016-08-04 09:27


jpg file icon xdebuglog-php7-xdebug.2.4.1.jpg [^] (1,039,384 bytes) 2016-08-04 09:27
png file icon xdebug php 7.0.9 xdebug 2.4.0.png [^] (63,219 bytes) 2016-08-12 16:53


? file icon test.php [^] (928 bytes) 2017-04-12 20:32
png file icon xdebug_can_not_get_property.png [^] (5,058 bytes) 2017-04-12 20:39


png file icon 1335.png [^] (35,444 bytes) 2017-04-16 09:27


log file icon xdebug.log [^] (14,266 bytes) 2017-04-18 11:26
log file icon xdebug-ibotpeaches.log [^] (19,070 bytes) 2017-04-18 17:27
png file icon 26dev.png [^] (38,956 bytes) 2017-04-21 13:00

- Relationships

-  Notes
(0003666)
derick (administrator)
2016-08-04 10:17

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.
(0003667)
zuluzzz (reporter)
2016-08-04 12:06

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:
http://stackoverflow.com/questions/23251283/phpstorm-xdebug-cant-show-show-child-arrays-of-objects [^]

Can you please take a look, maybe it is a same problem
(0003668)
zuluzzz (reporter)
2016-08-04 12:11

Also tested:

$object1 = new stdClass();
        $object1->someProperty = "o1";

        $object2 = new stdClass();
        $object2->someProperty = "o2";

        $storage = new SplObjectStorage();
        $storage->attach($object1);
        $storage->attach($object2);

And it falls with Xdebug ...
(0003670)
zuluzzz (reporter)
2016-08-09 10:33

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.
(0003671)
derick (administrator)
2016-08-09 23:01

Sorry, I still need a small reproducible script.
(0003675)
acuthbert (reporter)
2016-08-12 16:51

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!)

Andrew
(0003755)
derick (administrator)
2016-11-16 21:23

acuthbert - can you at least provide a self contained re-reproducible case though? (And preferably, with Xdebug 2.5.0RC1).
(0004012)
derick (administrator)
2016-12-11 23:47

Can't reproduce, and the requested feedback was not provided.
(0004242)
rulatir (reporter)
2017-03-26 21:06

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.
(0004254)
rulatir (reporter)
2017-04-12 14:30

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.
(0004256)
radiat-r (reporter)
2017-04-12 20:38

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.

Xdebug v2.5.1
PHP 5.6.30
Linux 2.6.32 x86_64
(0004257)
acuthbert (reporter)
2017-04-12 21:16
edited on: 2017-04-12 21:17

Radiat-r, you're a genius.

I've confirmed this does reproduce the error on:

Xdebug v2.4.0
PHP 7.0.15

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; :(

(0004258)
acuthbert (reporter)
2017-04-12 21:18

derick can we get this issue reopened now there's a reproducible test case?
(0004266)
derick (administrator)
2017-04-16 09:27

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.
(0004277)
radiat-r (reporter)
2017-04-18 11:26

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.
(0004278)
derick (administrator)
2017-04-18 12:03

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.
(0004280)
radiat-r (reporter)
2017-04-18 13:33

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.
(0004284)
iBotPeaches (reporter)
2017-04-18 17:27

Adding my xdebug.log as well, remote log w/ no redaction.

PhpStorm 2017.1.2
PHP 7.0.16
Xdebug 2.5.1

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.
(0004285)
derick (administrator)
2017-04-18 17:30

I have a hunch about what is causing this. I'll have an in depth look later.
(0004286)
derick (administrator)
2017-04-18 17:50

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.
(0004289)
derick (administrator)
2017-04-19 15:12

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
="3"></property>

The important bit being "$outer->middle->*middle\abstrct\abstractmiddle*inner" (which gets XML-decoded
 to:

$outer->middle->*middle\abstrct\abstractmiddle*inner

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 correctly adds the slashes here, 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)
or
Xdebug 2.6dev with PhpStorm 2017(.1.3).
(0004290)
acuthbert (reporter)
2017-04-19 15:16

Thanks derick - I'll give 2.6dev a go and let you know what I get.
(0004307)
derick (administrator)
2017-04-20 23:52

acuthbert, any luck?
(0004311)
acuthbert (reporter)
2017-04-21 11:57

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?
(0004312)
derick (administrator)
2017-04-21 12:21

It's the master branch on GitHub, and yes, you compile it from source.
(0004313)
acuthbert (reporter)
2017-04-21 12:24

Oh course, no problem.
(0004314)
acuthbert (reporter)
2017-04-21 12:59

Sorry, derick, same problem for me on storm 2017.1.3 and 2.6dev (see attached screenshot)
(0004315)
acuthbert (reporter)
2017-04-21 13:08

derick, confusingly the test.php script does work correcly! But as the previous shot shows there issue can still be reproduced.
(0004316)
derick (administrator)
2017-04-21 13:16

I'm going to need a way to reproduce that locally again then.
(0004359)
Till (reporter)
2017-06-23 09:30

Hi Guys,

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

- Issue History
Date Modified Username Field Change
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


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker