#37296 [Opn->Csd]: segfault when doing drag and drop

From: Date: Sat, 05 Aug 2006 19:51:26 +0000
Subject: #37296 [Opn->Csd]: segfault when doing drag and drop
References: 1  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-3350@lists.php.net to get a copy of this message
ID: 37296 Updated by: andrei@php.net Reported By: cweiske@php.net -Status: Open +Status: Closed Bug Type: PHP-GTK related Operating System: Linux/Gentoo PHP Version: 5.1.3 New Comment: Fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2006-05-08 17:34:15] anant@php.net Similar situation here, no segfault, but a debug message: GtkButton drag-data-get drag-drop string(8) "text/xml" [Mon May 8 20:08:05 2006] Script: 'bug_dnd_segfault_get.phpw' --------------------------------------- /var/tmp/portage/php-5.1.2-r1/work/php-5.1.2/Zend/zend_variables.h(35) : Block 0x08BDD0A4 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=0x00000000, Expected=0x7312F8DC) End: Unknown --------------------------------------- ------------------------------------------------------------------------ [2006-05-03 18:29:25] cweiske@php.net Description: ------------ Bug in drag'n'drop: Drag from "from" button to "to" button several (3) times. You will get a segfault. The segfault appears only if the drag-data-get signal is connected 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 ); $btnFrom->connect('drag-data-get', 'onGetDragData'); $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 onGetDragData($widget, $context, $selection, $info, $time) { echo $widget->get_name() . " drag-data-get\r\n"; $selection->set_text('ThisIsTheContent'); } 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 20610)] 0xb7b793f5 in mallopt () from /lib/libc.so.6 (gdb) bt #0 0xb7b793f5 in mallopt () from /lib/libc.so.6 #1 0xb7b78a91 in mallopt () from /lib/libc.so.6 #2 0xb7b77b33 in malloc () from /lib/libc.so.6 #3 0xb6f9177e in cairo_matrix_invert () from /usr/lib/libcairo.so.2 #4 0x0000020c in ?? () #5 0x3fecfcfc in ?? () #6 0xb6fc39f4 in ?? () from /usr/lib/libcairo.so.2 #7 0xb6f9161e in cairo_matrix_invert () from /usr/lib/libcairo.so.2 #8 0x08eb96b8 in ?? () #9 0x00000000 in ?? () #10 0xbf917fc8 in ?? () #11 0xb700ddb9 in gdk_cairo_set_source_color () from /usr/lib/libgdk-x11-2.0.so.0 #12 0x00917fc0 in ?? () #13 0x08eb2ea8 in ?? () #14 0x08eb2ea0 in ?? () #15 0xb6f9131a in cairo_matrix_invert () from /usr/lib/libcairo.so.2 #16 0x08eb2ea8 in ?? () #17 0x00000000 in ?? () #18 0xbf917fa0 in ?? () #19 0x00000001 in ?? () #20 0x00000000 in ?? () #21 0x00000000 in ?? () #22 0x00000000 in ?? () #23 0xb6f85d8a in cairo_move_to () from /usr/lib/libcairo.so.2 #24 0x08eb2ea8 in ?? () #25 0x00000000 in ?? () #26 0x00000000 in ?? () #27 0x00000000 in ?? () #28 0x00000000 in ?? () #29 0x00000000 in ?? () #30 0x00000000 in ?? () #31 0x00000000 in ?? () #32 0xb6fc39f4 in ?? () from /usr/lib/libcairo.so.2 #33 0x08eb2ea0 in ?? () #34 0x08e96d28 in ?? () #35 0xb6f864f0 in cairo_rectangle () from /usr/lib/libcairo.so.2 #36 0x08eb2ea0 in ?? () #37 0x00000000 in ?? () #38 0x3ff00000 in ?? () #39 0x00000000 in ?? () #40 0x00000000 in ?? () #41 0xb6fc39f4 in ?? () from /usr/lib/libcairo.so.2 #42 0x08eb2ea0 in ?? () #43 0xb6f8523a in cairo_create () from /usr/lib/libcairo.so.2 #44 0x00000000 in ?? () #45 0x403f0000 in ?? () #46 0x00000000 in ?? () #47 0x405c8000 in ?? () #48 0x08eb2ea0 in ?? () #49 0xb707b0a8 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #50 0x08eb2ea0 in ?? () #51 0xb702803e in gdk_window_get_internal_paint_info () from /usr/lib/libgdk-x11-2.0.so.0 #52 0x00000000 in ?? () ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37296&edit=1

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