#37298 [NEW]: segfault on php shutdown after drag and drop
| From: | cweiske@php.net | Date: | Wed, 03 May 2006 18:32:51 +0000 |
| Subject: | #37298 [NEW]: segfault on php shutdown after drag and drop | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-2818@lists.php.net to get a copy of this message | ||
From: cweiske@php.net
Operating system: Gentoo/Linux
PHP version: 5.1.3
PHP Bug Type: PHP-GTK related
Bug description: segfault on php shutdown after drag and drop
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 bug report at http://bugs.php.net/?id=37298&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37298&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37298&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37298&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37298&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37298&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37298&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37298&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37298&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37298&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37298&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37298&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37298&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37298&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37298&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37298&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37298&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37298&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37298&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37298&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37298&r=mysqlcfg