View Issue Details

IDProjectCategoryView StatusLast Update
0001106XdebugUsage problems (Wrong Results)public2016-05-11 02:24
ReporterDev101Assigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSCentOSOS Version6.5
Product Version2.2.7 
Target VersionFixed in Version2.4.1 
Summary0001106: A thrown Exception after a class with __debugInfo gives 2 Errors
DescriptionIf you make an instance of an class that has __debugInfo() implemented and you are throwing an Exception after that you get the following errors:

Warning: Uncaught exception 'Exception' with message 'neee' in test.php:10

and

Fatal error: __debuginfo() must return an array in test.php on line 10



With disabled xDebug all is fine with the script below.
Steps To Reproduce<?php

class A
{
    public function __debugInfo() { return array();}
}

$c = new A();
try{
    throw new \Exception("neee");
}
catch (\Exception $e) {
    die("all fine");
}
TagsNo tags attached.
Operating System
PHP Version5.6.5-5.6.9

Activities

derick

2015-02-28 17:13

administrator   ~0003018

Your script just outputs "all fine" - like I expect it to do. Are you sure the script that you provided actually gives the output you said it would?

Dev101

2015-03-01 00:19

reporter  

phpinfo.html (105,463 bytes)

Dev101

2015-03-01 00:22

reporter   ~0003019

yeah i'm sure about this.
i also tried it on a different system (Windows 10 with xampp 5.6.3VC11 and xdebug 2.3.1 VC11)

i tried a bit with some setting, it seems to depend on xdebug.show_local_vars
if its set to 1 the error occurs
if its set to 0 all works fine.

i attached a phpinfo with the configuration where i get the errors.

ypnos

2015-09-28 13:41

reporter   ~0003178

I can reproduce this bug here. It appears when Xdebug is connected to a client (here: PHPStorm).

php 5.6.13
xdebug 2.3.2

Operating System is Arch Linux.

marc-x

2015-10-02 07:19

reporter  

config.txt (1,643 bytes)
# XDEBUG BEGIN
php_value xdebug.default_enable 1
php_value xdebug.max_nesting_level 100
php_value xdebug.scream 0
php_value xdebug.overload_var_dump 1
php_value xdebug.var_display_max_children 256
php_value xdebug.var_display_max_depth 16
php_value xdebug.var_display_max_data 1024
php_value xdebug.collect_includes 1
php_value xdebug.collect_params 0
php_value xdebug.collect_vars 0
php_value xdebug.collect_assignments 0
php_value xdebug.collect_return 0
php_value xdebug.dump.REQUEST *
php_value xdebug.dump.SERVER REMOTE_ADDR,REQUEST_METHOD
php_value xdebug.dump_globals 1
php_value xdebug.dump_once 1
php_value xdebug.dump_undefined 0
php_value xdebug.show_exception_trace 0
php_value xdebug.show_local_vars 0
php_value xdebug.show_mem_delta 0
php_value xdebug.auto_trace 1
php_value xdebug.trace_format 0
php_value xdebug.trace_options 0
php_value xdebug.extended_info 1
php_value xdebug.idekey PHPSTORM
php_value xdebug.remote_autostart 0
php_value xdebug.remote_enable 1
php_value xdebug.remote_handler dbgp
php_value xdebug.remote_host 192.168.1.3
php_value xdebug.remote_connect_back 0
php_value xdebug.remote_mode req
php_value xdebug.remote_port 9003
php_value xdebug.profiler_append 1
php_value xdebug.profiler_enable 1
php_value xdebug.profiler_enable_trigger 1
# PATHS
php_value xdebug.trace_output_dir /var/www/xxx/files/xdebug/trace
php_value xdebug.remote_log /var/www/xxx/files/xdebug/access.log
php_value xdebug.profiler_output_dir /var/www/xxx/files/xdebug/profiler
php_value xdebug.profiler_output_name %u.%p.cachegrind
php_value xdebug.trace_output_name %u.%p.trace
# XDEBUG END
config.txt (1,643 bytes)

marc-x

2015-10-02 07:22

reporter   ~0003179

There is a problem under such conditions:

Server:
  Linux 3.2.0-4-amd64 Debian 3.2.68-1+deb7u3 x86_64
  PHP 5.6.13-1~dotdeb+7.1
  Xdebug 2.3.3 + config in attached files

Client:
  PhpStorm 9.0.2
  Windows 7 Home

edamov

2016-02-11 13:32

reporter   ~0003479

I have the same issue:

Xdebug v2.4.0beta1
PHP 7.0.2-4+deb.sury.org~trusty+1

Lewolf

2016-03-19 13:11

reporter   ~0003572

I confirm the issue is still there (Xdebug 2.4.0)

on Laravel Homestead 0.4.2 vagrant box (See https://laravel.com/docs/master/homestead)

Environment is as follows:

Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-25-generic x86_64)
PHP 7.0.2-4+deb.sury.org~trusty+1
Xdebug 2.4.0 (I have updated it against initial vagrant box which comes with 2.4.0RC3 by default)

PHP script that produces the error is copied exactly as is from initial issue.

Screenshot of Xdebug output: http://c2n.me/3vMuQql.png

derick

2016-05-11 02:24

administrator   ~0003599

Fixed on GitHub for 2.4.1.

Issue History

Date Modified Username Field Change
2015-02-16 13:40 Dev101 New Issue
2015-02-28 17:13 derick Note Added: 0003018
2015-02-28 17:13 derick Assigned To => derick
2015-02-28 17:13 derick Status new => feedback
2015-03-01 00:19 Dev101 File Added: phpinfo.html
2015-03-01 00:22 Dev101 Note Added: 0003019
2015-03-01 00:22 Dev101 Status feedback => assigned
2015-09-28 13:41 ypnos Note Added: 0003178
2015-10-02 07:19 marc-x File Added: config.txt
2015-10-02 07:22 marc-x Note Added: 0003179
2016-02-11 13:32 edamov Note Added: 0003479
2016-03-19 13:11 Lewolf Note Added: 0003572
2016-05-11 02:24 derick Note Added: 0003599
2016-05-11 02:24 derick Status assigned => closed
2016-05-11 02:24 derick Resolution open => fixed
2016-05-11 02:24 derick Fixed in Version => 2.4.1
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)