|Anonymous | Login | Signup for a new account||2018-10-20 20:48 BST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001223||Xdebug||Usage problems (Wrong Results)||public||2015-12-05 19:37||2016-01-25 21:59|
|Platform||Windows||OS||Windows 2012||OS Version|
|Target Version||2.4.0||Fixed in Version||2.4.0rc4|
|Summary||0001223: Xdebug crashes on PHP 7 when doing a DBGp eval command|
|Description||The following comments do not apply when using PHP 5.x and the corresponding .dll. They do apply when using PHP 7.0 (php-7.0.0-nts-Win32-VC14-x86) and php_xdebug-2.4.0rc2-7.0-vc14-nts.dll|
I have followed the suggestions found in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=348658 [^] but these actions do not solve the problem.
The Eclipse and error details are:
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.php.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.php.product
Sat Dec 05 12:56:08 UTC 2015
class org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : Unexpected XML or parser failure: null
This error occurs in Eclipse because the XDebug session has terminated prematurely.
When debugging using with the Variables or Expressions view visible the XDebug session will abort in a predictable way. I am able to begin debugging and step through code even when the Expressions view is visible. However, if I step over code that sets an array within an array while the variable is being watched, XDebug will fail.
|Steps To Reproduce||Here is some sample code that causes an error.|
$a = array();
$a['x'] = 'y';
$a['y'] = array( 'a' => 'b' );
Add $a or $a['y'] as watches then step over and the XDebug session will terminate. Note that a watch on just $a['x'] will not cause a problem.
|Tags||No tags attached.|
|Attached Files|| xdebuglog.zip [^] (2,747 bytes) 2015-12-07 11:09|
xdebug-log.zip [^] (6,294 bytes) 2015-12-12 22:35
xdebug-log-2015-12-13.zip [^] (6,756 bytes) 2015-12-13 22:40
Could you please upgrade to Xdebug 2.4.0RC2? I've fixed various things in there. If you can still reproduce it there, could you create a remote debugging log with that very simple script that you showed? You can make one by setting xdebug.remote_log=c:\temp\xdebug.org (pick a path the web server can write to please).
In the original report I noted that I am using php_xdebug-2.4.0rc2-7.0-vc14-nts.dll which appears to be the latest and greatest on the XDebug.org site. If I have not understood your request and there there is another version I should use please point me in the right direction.
Assuming the version I'm using is OK, I've attached a zip file containing two log files. One called xdebug-success.log shows stepping through the PHP code below *without* including $a as a watch. When you decode the base64 strings you will see there are watches for variables called $node, $activeDimensions and $dim (you can ignore these).
The other file, called xdebug-fail.log, show the same debugging experience but with an extra watch on the variable $a which is set in the code. This causes the XDebug session to fail and, so, not return an XML string which Eclipse reports as an error.
The version of Eclipse used is Neon (though the problem also occurs in Luna) and the version of the PHP Development Tool plugin used in Neon is 3.7 which as far as I can tell is as up-to-date as it is possible to be.
Let me know how else I can help.
ini_set( 'display_errors', true );
echo "Test for Derick";
$ver = phpversion();
$a = array();
$a['x'] = 'y';
$a['y'] = array( 'a' => 'b' );
|Sorry - had missed you used RC2 from your report. I've updated the version in the report's field too (which had beta1). This is exactly what I needed to try to reproduce and fix it. Thanks!|
|Sorry for the confusion. Thanks for taking a look. PHP 7.0 is quoted as being up to 2.5 times faster but in the case of the application I'm working on the improvement is much greater. I had hoped to use it debug mode because getting to the relevant part while debugging is equally much faster.|
I just released Xdebug 2.4.0RC3, which hopefully addresses stability issues on Windows: http://xdebug.org/#2015_12_12 [^] — Can you please try that? Make also sure you run this with PHP 7.0.0 (or later), and not a PHP 7 Release Candidate.
In case it does not solve the problem, please provide a *full* but *short* reproducible test case that I can run myself. That includes hopefully a *single* script, and an accompanying remote debugging log (which you can make by setting xdebug.remote_log=c:\windows\temp\xdebug.log in php.ini).
The latest version appears to make no difference. The attached file contains a log showing successfully stepping over the code above while *not* evaluating the expression $a. It also shows stepping over the code above while $a is an expression. In this case the debug session fails stepping over the line:
$a['x'] = 'y';
|Let me add that I've used your latest and greatest (32-bit VC14 NTS) and the corresponding version of PHP 7.0 released on Dec 3rd.|
|Can I please have the exact script(s) that you used for the two logs? I need it to match it with the line numbers in the logs?|
|I copied the lines above into a php file and used these lines to produce the most recently attached file. Are you not able to reproduce this problem? If so, it would be great to know what you are doing differently so that you do not see a problem when using vanilla Eclipse and PDT.|
|I can reproduce this now.|
|I think I have this fixed in Git. Can you try php_xdebug-master-7.0-vc14-nts.dll from the tarball at http://xdebug.org/files/xdebug-vc14-latest.tgz [^] ? This should have the fix too.|
|Yes, that's great it seems to work. I will be using over the next few days because PHP 7.0 is *so* much faster. If I find any more issues I will be sure to report them.|
|Perfect - I'll close this one. Please open a *new* issue if you find something else.|
|2015-12-05 19:37||bseddon||New Issue|
|2015-12-07 10:24||derick||Note Added: 0003292|
|2015-12-07 10:24||derick||Assigned To||=> derick|
|2015-12-07 10:24||derick||Status||new => feedback|
|2015-12-07 11:09||bseddon||File Added: xdebuglog.zip|
|2015-12-07 11:11||bseddon||Note Added: 0003294|
|2015-12-07 11:11||bseddon||Status||feedback => assigned|
|2015-12-07 11:29||derick||Product Version||2.4.0beta1 => 2.4.0rc2|
|2015-12-07 11:36||derick||Note Added: 0003295|
|2015-12-07 11:36||derick||Target Version||=> 2.4.0|
|2015-12-07 11:51||bseddon||Note Added: 0003296|
|2015-12-12 21:33||derick||Note Added: 0003330|
|2015-12-12 21:33||derick||Status||assigned => feedback|
|2015-12-12 22:35||bseddon||Note Added: 0003331|
|2015-12-12 22:35||bseddon||Status||feedback => assigned|
|2015-12-12 22:35||bseddon||File Added: xdebug-log.zip|
|2015-12-12 22:40||bseddon||Note Added: 0003332|
|2015-12-13 21:22||derick||Note Added: 0003336|
|2015-12-13 21:22||derick||Status||assigned => feedback|
|2015-12-13 22:39||bseddon||Note Added: 0003337|
|2015-12-13 22:39||bseddon||Status||feedback => assigned|
|2015-12-13 22:40||bseddon||File Added: xdebug-log-2015-12-13.zip|
|2015-12-13 23:10||derick||Note Added: 0003338|
|2015-12-14 18:38||derick||Summary||PHP 7.0 XDebug in Eclipse: Unexpected XML or parser failure: null => Xdebug crashes on PHP 7 when doing a DBGp eval command|
|2015-12-14 20:14||derick||PHP Version||7.0.0rc7 => 7.0.0-7.0.4|
|2015-12-14 20:14||derick||Note Added: 0003341|
|2015-12-14 20:14||derick||Status||assigned => feedback|
|2015-12-14 22:07||bseddon||Note Added: 0003344|
|2015-12-14 22:07||bseddon||Status||feedback => assigned|
|2015-12-14 22:08||derick||Note Added: 0003345|
|2015-12-14 22:08||derick||Status||assigned => closed|
|2015-12-14 22:08||derick||Resolution||open => fixed|
|2015-12-14 22:08||derick||Fixed in Version||=> 2.4.0|
|2016-01-25 21:59||derick||Fixed in Version||2.4.0 => 2.4.0rc4|
|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 - 2018 MantisBT Team|