|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2011-07-18 05:56 UTC] falk dot herrmann at bike24 dot net
 Description:
------------
Every PHP-GTK application returns an segmentation fault on quit. Alt-F4, close via menu, or close button brings the same error. The program itself runs fine. Only the quit command returns segfault after the last line of code.
Return code: 139
Test script:
---------------
<?php
dl('php_gtk2.so');
$wnd = new GtkWindow();
$wnd->set_title('Hello world');
$wnd->connect_simple('destroy', array('gtk', 'main_quit'));
 
$lblHello = new GtkLabel("Hello world!'");
$wnd->add($lblHello);
 
$wnd->show_all();
Gtk::main();
Expected result:
----------------
Return code: 0
Actual result:
--------------
fh@psyco ~/php-gtk $ php -f hello-world.php
Segmentation fault
fh@psyco ~/php-gtk $ echo $?
139
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 14:00:01 2025 UTC | 
... Core was generated by `php -f hello-world.php'. Program terminated with signal 11, Segmentation fault. [New process 11395] #0 0x08310f1e in clean_module_class (ce=0x961d994, module_number=0xbf8b5e4c) at /usr/src/bApache2/php-5.3.7RC3/Zend/zend_API.c:2087 2087 if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->module->module_number == *module_number) { (gdb) bt #0 0x08310f1e in clean_module_class (ce=0x961d994, module_number=0xbf8b5e4c) at /usr/src/bApache2/php-5.3.7RC3/Zend/zend_API.c:2087 #1 0x0831add4 in zend_hash_apply_with_argument (ht=0x9468480, apply_func=0x8310f00 <clean_module_class>, argument=0xbf8b5e4c) at /usr/src/bApache2/php-5.3.7RC3/Zend/zend_hash.c:698 #2 0x08314bb8 in module_destructor (module=0x94b3648) at /usr/src/bApache2/php-5.3.7RC3/Zend/zend_API.c:2097 #3 0x0831ac58 in zend_hash_apply_deleter (ht=0x87a4300, p=0x96119a8) at /usr/src/bApache2/php-5.3.7RC3/Zend/zend_hash.c:612 #4 0x0831ad5b in zend_hash_reverse_apply (ht=0x87a4300, apply_func=0x8310f60 <module_registry_unload_temp>) at /usr/src/bApache2/php-5.3.7RC3/Zend/zend_hash.c:761 #5 0x0830fa9e in zend_post_deactivate_modules () at /usr/src/bApache2/php-5.3.7RC3/Zend/zend.c:937 #6 0x082bf095 in php_request_shutdown (dummy=0x0) at /usr/src/bApache2/php-5.3.7RC3/main/main.c:1644 #7 0x083927b4 in main (argc=3, argv=0xbf8b62f4) at /usr/src/bApache2/php-5.3.7RC3/sapi/cli/php_cli.c:1363