View Issue Details

IDProjectCategoryView StatusLast Update
0000352XdebugUncategorizedpublic2009-12-29 12:13
Reportertimmeh Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Summary0000352: exception trace uses wrong exception
Description

if an exception happens in a destructor called during cleanup from another exception, it is used for an xdebug stack trace even if it is caught and ignored. the correct exception is used if xdebug is not installed or if the exception is caught at a higher level.

Additional Information

<?php

// if an exception happens in a destructor called during cleanup from another
// exception, it is used for an xdebug stack trace even if it should be
// ignored. the correct exception is used if xdebug is not installed or if
// the exception is caught at a higher level.

class c {
function __destruct() {
try {
throw new Exception('ignored exception') ;
} catch(Exception $e) {
echo "ignoring the exception--- " ;
}
}
}

function f() {
$c = new c ;
throw new Exception('desired exception') ;
}

// the non-xdebug PHP stack trace uses the desired exception,
// with xdebug activated the supposedly ignored exception is used.
f() ;

// using PHP to catch the exception always gets the right one
try {
f() ;
} catch (Exception $e) {
echo $e->getMessage(), "\n" ;
}

phpinfo() ;

// PHP 5.2.5
// System: Windows NT 5.1 build 2600
// Build Date: Nov 8 2007 23:18:08
// Configure: cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
// API: CGI/FastCGI
// with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans

/**

Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.idekey phpdebug phpdebug
xdebug.manual_url http://www.php.net http://www.php.net
xdebug.max_nesting_level 100 100
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir no value no value
xdebug.profiler_output_name no value no value
xdebug.remote_autostart Off Off
xdebug.remote_enable On On
xdebug.remote_handler dbgp dbgp
xdebug.remote_host 127.0.0.1 127.0.0.1
xdebug.remote_log no value no value
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /tmp /tmp
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3 3

**/

?>

TagsNo tags attached.
Operating SystemWindows XP
PHP Version5.2.5

Activities

derick

2009-11-22 19:53

administrator   ~0001165

Both with ant without Xdebug loaded, I am getting:

ignoring the exception--- ignoring the exception---

derick@kossu:/home/httpd/html/test/xdebug$ php bug352.php
ignoring the exception--- ignoring the exception---

derick@kossu:/home/httpd/html/test/xdebug$ php -n bug352.php
ignoring the exception--- ignoring the exception---
derick@kossu:/home/httpd/html/test/xdebug$

What's the problem?

derick

2009-12-29 12:13

administrator   ~0001220

No feedback provided.

Issue History

Date Modified Username Field Change
2008-02-08 22:04 timmeh New Issue
2009-11-22 19:53 derick Note Added: 0001165
2009-11-22 19:53 derick Status new => feedback
2009-12-29 12:13 derick Note Added: 0001220
2009-12-29 12:13 derick Status feedback => resolved
2009-12-29 12:13 derick Resolution open => unable to reproduce
2009-12-29 12:13 derick Assigned To => derick
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)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized