#37298 [Opn->Csd]: segfault on php shutdown after drag and drop

From: Date: Sat, 05 Aug 2006 18:57:01 +0000
Subject: #37298 [Opn->Csd]: segfault on php shutdown after drag and drop
References: 1  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-3348@lists.php.net to get a copy of this message
ID: 37298 Updated by: andrei@php.net Reported By: cweiske@php.net -Status: Open +Status: Closed Bug Type: PHP-GTK related Operating System: Gentoo/Linux PHP Version: 5.1.3 New Comment: This has already been fixed. Previous Comments: ------------------------------------------------------------------------ [2006-05-08 17:29:28] anant@php.net I don't get a segfault when I the script but recieve this instead. I have debug enabled, otherwise I don't think the message would even appear. --------------------------------------- /var/tmp/portage/php-5.1.2-r1/work/php-5.1.2/Zend/zend_variables.h(35) : Block 0x08BE40AC status: /var/tmp/portage/php-5.1.2-r1/work/php-5.1.2/Zend/zend_variables.c(36) : Actual location (location was relayed) Beginning: Overrun (magic=0x554C4941, expected=0x7312F8DC) End: Unknown --------------------------------------- drag-drop string(8) "text/xml" [Mon May 8 20:07:47 2006] Script: 'bug_dnd_segfault_end.phpw' --------------------------------------- /var/tmp/portage/php-5.1.2-r1/work/php-5.1.2/Zend/zend_variables.h(35) : Block 0x08BC906C status: /var/tmp/portage/php-5.1.2-r1/work/php-5.1.2/Zend/zend_variables.c(36) : Actual location (location was relayed) Beginning: Overrun (magic=0x00000021, expected=0x7312F8DC) End: Unknown --------------------------------------- ------------------------------------------------------------------------ [2006-05-03 18:32:51] cweiske@php.net Description: ------------ Bug in drag'n'drop: Drag from "from" button to "to" button and close the window. You will get a segfault. Reproduce code: --------------- <?php $wnd = new GtkWindow(); $wnd->connect_simple('destroy', array('Gtk', 'main_quit')); $hbox = new GtkHBox(); $wnd->add($hbox); $btnFrom = new GtkButton('From'); $btnTo = new GtkButton('To'); $hbox->pack_start($btnFrom); $hbox->pack_start($btnTo); $btnFrom->drag_source_set( Gdk::BUTTON1_MASK, //change to text/plain, and it works array(array('text/xml', 0, 1)), Gdk::ACTION_COPY | Gdk::ACTION_MOVE ); $btnTo->drag_dest_set( Gtk::DEST_DEFAULT_ALL, //change to text/plain, and it works array(array('text/xml', 0, 1)), Gdk::ACTION_COPY | Gdk::ACTION_MOVE ); $btnTo->connect('drag-drop', 'onDragDrop'); function onDragDrop($widget, $context, $x, $y, $time) { global $strMimeType, $strTypeNumber; echo "drag-drop\r\n"; var_dump( $widget->drag_dest_find_target( $context, array(array('text/xml', 0, 1)) ) ); } $wnd->show_all(); Gtk::main(); ?> Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 20597)] 0x0831d37f in shutdown_memory_manager (silent=0, full_shutdown=0) at /data/cvs/php/php-5.1.2/Zend/zend_alloc.c:511 511 REMOVE_POINTER_FROM_LIST(ptr); (gdb) bt #0 0x0831d37f in shutdown_memory_manager (silent=0, full_shutdown=0) at /data/cvs/php/php-5.1.2/Zend/zend_alloc.c:511 #1 0x082f850d in php_request_shutdown (dummy=0x0) at /data/cvs/php/php-5.1.2/main/main.c:1303 #2 0x0839f120 in main (argc=2, argv=0xbfb79c64) at /data/cvs/php/php-5.1.2/sapi/cli/php_cli.c:1230 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37298&edit=1

« previous php.gtk.dev (#3348) next »