View Issue Details

IDProjectCategoryView StatusLast Update
0000373Xdebugpublic2009-11-22 16:59
Reporterjdelaney Assigned Toderick  
Status resolvedResolutionunable to reproduce 
Summary0000373: Segmentation fault with PHP-GTK

I have a problem using Xdebug with PHP-GTK 2.0.x

If I create a class that extends GtkWindow, and then try to create a new GtkComboBox anywhere in that class, I get a segmentation fault.

In classes that do not extend GtkWindow, I get no such error. If I remove Xdebug from php.ini, I don't get the error either.

Additional Information

john@johnd testscripts $ cat combo1.php


    class MyClass extends GtkWindow
            function __construct()
                    $objComboBox = new GtkComboBox();

    $objTest = new MyClass();
    echo &quot;Finished\n&quot;;

john@johnd testscripts $ ls -l which php5
lrwxrwxrwx 1 root staff 23 2008-02-21 15:05 /usr/local/bin/php5 -> /usr/local/php5/bin/php
john@johnd testscripts $ php5 -v
PHP 5.2.5 (cli) (built: May 21 2008 14:00:17)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans
john@johnd testscripts $ gdb php5
GNU gdb 6.7.1-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/i686/cmov/".
(gdb) run combo1.php
Starting program: /usr/local/bin/php5 combo1.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb75036d0 (LWP 15655)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb75036d0 (LWP 15655)]
0xb726fcfb in zim_GtkComboBox_construct (ht=0, return_value=0x86fe180, return_value_ptr=0x0, this_ptr=0x86fe198, return_value_used=0) at ext/gtk+/gtk.overrides:2247
2247 if (model && Z_TYPE_P(model) != IS_NULL) {
(gdb) bt
#0 0xb726fcfb in zimGtkComboBox
construct (ht=0, return_value=0x86fe180, return_value_ptr=0x0, this_ptr=0x86fe198, return_value_used=0) at ext/gtk+/gtk.overrides:2247
#1 0x0834a4b2 in execute_internal (execute_data_ptr=0xbfc13310, return_value_used=0) at /home/john/src/php-5.2.5/Zend/zend_execute.c:1385
0000002 0xb73602b4 in xdebug_execute_internal (current_execute_data=0xbfc13310, return_value_used=0) at /home/john/src/xdebug-2.0.2/xdebug.c:1573
0000003 0x08358dd3 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfc13310) at /home/john/src/php-5.2.5/Zend/zend_vm_execute.h:202
0000004 0x0834b74f in execute (op_array=0x870112c) at /home/john/src/php-5.2.5/Zend/zend_vm_execute.h:92
0000005 0xb735ff58 in xdebug_execute (op_array=0x870112c) at /home/john/src/xdebug-2.0.2/xdebug.c:1509
0000006 0x08358a4c in zend_do_fcall_common_helper_SPEC (execute_data=0xbfc13560) at /home/john/src/php-5.2.5/Zend/zend_vm_execute.h:234
0000007 0x0834b74f in execute (op_array=0x86fe658) at /home/john/src/php-5.2.5/Zend/zend_vm_execute.h:92
0000008 0xb735ff58 in xdebug_execute (op_array=0x86fe658) at /home/john/src/xdebug-2.0.2/xdebug.c:1509
0000009 0x0832e80a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/john/src/php-5.2.5/Zend/zend.c:1134
0000010 0x082ef445 in php_execute_script (primary_file=0xbfc1599c) at /home/john/src/php-5.2.5/main/main.c:2004
0000011 0x083a88ce in main (argc=2, argv=0xbfc15ab4) at /home/john/src/php-5.2.5/sapi/cli/php_cli.c:1140
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb) quit
john@johnd testscripts $ sed -e "s/ extends GtkWindow//" combo1.php > combo2.php
john@johnd testscripts $ php5 combo2.php

TagsNo tags attached.
Operating SystemDebian testing
PHP Version5.2.5



2008-05-22 13:34

reporter   ~0000854

Just re-read what I submitted earlier, and don't think I've made it sufficiently clear why I think that Xdebug is causing this error. Here are a few more lines to demonstrate:

john@johnd testscripts $ php5 combo1.php
Segmentation fault
john@johnd testscripts $ grep -vi xdebug /usr/local/lib/php5/php.ini > ./php.ini
john@johnd testscripts $ php5 -c . combo1.php


2009-11-22 16:59

administrator   ~0001157

I've been using Xdebug with PHP-GTK pretty heavily recently, and don't see this issue at all. Please re-open if you can confirm this with Xdebug 2.0.5 or from CVS, and a recent PHP version.

Issue History

Date Modified Username Field Change
2008-05-22 11:33 jdelaney New Issue
2008-05-22 13:34 jdelaney Note Added: 0000854
2009-11-22 16:59 derick Note Added: 0001157
2009-11-22 16:59 derick Status new => resolved
2009-11-22 16:59 derick Resolution open => unable to reproduce
2009-11-22 16:59 derick Assigned To => derick
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)