MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001104XdebugUsage problems (Wrong Results)public2015-02-10 07:512015-02-22 14:29
Reporterxardas 
Assigned Toderick 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version12.04 LTS
Product Version2.2.3 
Target VersionFixed in Version2.3.0 
Summary0001104: "Notice: Corrupt member variable name" on 1-character static property
DescriptionWhile using xdebug 2.2.3, PHP 5.4.24 and PhpStorm 8.0.2 (versions probably does not matter).
we have encountered a Notice: corrupt member variable name.

I was able to reproduce a problem.
It seems that this notice occurres in debug mode (when stepping out of a breakpoint) when in one of local variables there is an object, containing a static property with a name, consisting of one symbol.

It seems, that xdebug deletes such properties, or cannot parse them. In "Variables" window we are able to see an empty property name instead of one-symbol.
Steps To Reproduce- Create a PHP class, containing a static property, which name consists of one symbol, like this:
class DemoClass {
    public static $d = array();
}

- Make an instance of that class;
- Place a breakpoint right after object is created;
- Enable debugger listener and run application;
- After debugger stops application execution at breakpoint, take a look at "Variables" section of debugger. You will see '' = { array } [0] instead of 'd' = { array } [0]. So it seems that name of static property is empty, instead of "d".
- Run Step Over command to debugger and see the "Notice: corrupt member variable name " error occur.
Additional InformationIt seems, that there is no difference in property naming, it can be any symbol, like "s", "d", or whatever. It just required to be only one symbol.

Also it is crucial for property to be static. If property is not static, then problem won't reproduce itself.
TagsNo tags attached.
Operating SystemUbuntu
PHP Version5.4.20-5.4.24
Attached Filespng file icon Selection_038.png [^] (9,635 bytes) 2015-02-10 07:51

- Relationships

-  Notes
(0002982)
derick (administrator)
2015-02-10 09:59

I tried reproducing this, but it works just fine. Could you please try with the latest Xdebug version (2.2.7 is out!). And if that still causes problems, make a remote log file for a debugging session with that simple DemoClass from your report? You can make one by setting xdebug.remote_log=/tmp/xdebug.log - this will list all communications between IDE and Xdebug.
(0002983)
xardas (reporter)
2015-02-10 11:04

I have updated xdebug to 2.2.7, and problem still repeats itself.

I was able to find out, that static property should be with "protected" access modifier for it's name to disappear in Variables section of the debugger, and for notice to appear.
(0002984)
derick (administrator)
2015-02-10 11:11

Okay. I can reproduce this issue now.
(0002985)
derick (administrator)
2015-02-10 22:48

Fixed for 2.2.8 and 2.3dev.

- Issue History
Date Modified Username Field Change
2015-02-10 07:51 xardas New Issue
2015-02-10 07:51 xardas File Added: Selection_038.png
2015-02-10 09:59 derick Note Added: 0002982
2015-02-10 09:59 derick Assigned To => derick
2015-02-10 09:59 derick Status new => feedback
2015-02-10 11:04 xardas Note Added: 0002983
2015-02-10 11:04 xardas Status feedback => assigned
2015-02-10 11:11 derick Note Added: 0002984
2015-02-10 22:48 derick Note Added: 0002985
2015-02-10 22:48 derick Status assigned => closed
2015-02-10 22:48 derick Resolution open => fixed
2015-02-10 22:48 derick Fixed in Version => 2.2.8
2015-02-22 14:29 derick Fixed in Version 2.2.8 => 2.3.0
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker