View Issue Details

IDProjectCategoryView StatusLast Update
0000976XdebugUsage problems (Wrong Results)public2013-10-14 00:43
ReporterpvasilevichAssigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version2.2.3 
Target VersionFixed in Version2.2.4 
Summary0000976: XDebug crashes if current varibles scope contains COM object
DescriptionIf you are working with COM objects, for example with Excel, XDebug crashes trying to display content of such variable in debugger
Steps To Reproduce1. create sample script:
<?php

$ex = new COM("Excel.Application", NULL, CP_UTF8);
$wb = $ex->Application->Workbooks->Add(); // <-- set breakpoint to this line in debugger.

2. launch this script under debugger
Additional InformationCrash appeared in method xdebug_var_export_xml_node() when trying to access properties of COM object:

Z_OBJDEBUG_PP(struc, is_temp); returns NULL
TagsNo tags attached.
Operating System
PHP Version5.5-dev

Relationships

has duplicate 0000873 resolvedderick Crash viewing COM object properties in Eclipse PDT 
has duplicate 0001014 resolvedderick trying to create COM objects cause crash 

Activities

pvasilevich

2013-09-17 03:03

reporter  

com-crash-patch (739 bytes)
--- D:/programming/xdebug/xdebug_var.c	Tue Sep 17 10:02:33 2013
+++ D:/programming/xdebug/xdebug_var.c	Tue Sep 17 09:19:20 2013
@@ -1286,7 +1286,10 @@
 			}
 
 			/* Adding normal properties */
-			zend_hash_apply_with_arguments(Z_OBJDEBUG_PP(struc, is_temp) XDEBUG_ZEND_HASH_APPLY_TSRMLS_CC, (apply_func_args_t) object_item_add_to_merged_hash, 2, merged_hash, (int) XDEBUG_OBJECT_ITEM_TYPE_PROPERTY);
+			myht = Z_OBJDEBUG_PP(struc, is_temp);
+			if (myht) {
+				zend_hash_apply_with_arguments(myht XDEBUG_ZEND_HASH_APPLY_TSRMLS_CC, (apply_func_args_t) object_item_add_to_merged_hash, 2, merged_hash, (int) XDEBUG_OBJECT_ITEM_TYPE_PROPERTY);
+			}
 #else
 			/* Adding static properties */
 			if (CE_STATIC_MEMBERS(ce)) {
com-crash-patch (739 bytes)

pvasilevich

2013-09-17 03:04

reporter   ~0002556

Added patch to fix this problem

derick

2013-09-28 12:44

administrator   ~0002559

Thanks for this! I've your patch in a branch - are you okay with me crediting this to "your name" <your email address>?

pvasilevich

2013-09-29 14:59

reporter   ~0002570

ok :)

derick

2013-10-14 00:43

administrator   ~0002583

Thanks again for the patch! It's merged now.

Issue History

Date Modified Username Field Change
2013-09-17 03:01 pvasilevich New Issue
2013-09-17 03:03 pvasilevich File Added: com-crash-patch
2013-09-17 03:04 pvasilevich Note Added: 0002556
2013-09-28 12:44 derick Note Added: 0002559
2013-09-29 14:59 pvasilevich Note Added: 0002570
2013-10-14 00:43 derick Note Added: 0002583
2013-10-14 00:43 derick Status new => closed
2013-10-14 00:43 derick Assigned To => derick
2013-10-14 00:43 derick Resolution open => fixed
2013-10-14 00:43 derick Fixed in Version => 2.2.4
2014-02-27 19:41 derick Relationship added has duplicate 0000873
2014-03-02 14:16 derick Relationship added has duplicate 0001014
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)