php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Your comment was added to the bug successfully.
Bug #37297 segfault when dumping GtkSelectionData
Submitted: 2006-05-03 18:31 UTC Modified: 2022-08-05 11:40 UTC
From: cweiske@php.net Assigned: cweiske (profile)
Status: Closed Package: PHP-GTK related
PHP Version: 5.1.3 OS: Linux/Gentoo
Private report: No CVE-ID: None
 [2006-05-03 18:31 UTC] cweiske@php.net
Description:
------------
Bug in drag'n'drop:
Drag from "from" button to "to" button.
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
);
$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
);

function onGetDragData($widget, $context, $selection, $info, $time) {
    var_dump($selection);
}


$wnd->show_all();
Gtk::main();
?>

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 20870)]
0xb7c5b203 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0xb7c5b203 in strlen () from /lib/libc.so.6
#1  0xb75dbcbd in phpg_GtkSelectionData_read_type (object=0x8eb03ec,
    return_value=0xbf8f3cf0) at gen_gtk.c:45552
#2  0xb75ff86b in phpg_get_properties (object=0x8d9bb74)
    at /data/cvs/phpgtk2/php-gtk/main/phpg_support.c:173
#3  0x082c852b in php_var_dump (struc=0x87d1e64, level=1)
    at /data/cvs/php/php-5.1.2/ext/standard/var.c:139
#4  0x082c8736 in zif_var_dump (ht=1, return_value=0x8da9a74,
    return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /data/cvs/php/php-5.1.2/ext/standard/var.c:192
#5  0x0834a906 in zend_do_fcall_common_helper_SPEC (execute_data=0xbf8f3e20)
    at zend_vm_execute.h:192
#6  0x0834a218 in execute (op_array=0x8d95078) at zend_vm_execute.h:92
#7  0x08328339 in zend_call_function (fci=0xbf8f3f50, fci_cache=0x0)
    at /data/cvs/php/php-5.1.2/Zend/zend_execute_API.c:907
#8  0x08327bae in call_user_function_ex (function_table=0x0, object_pp=0x0,
    function_name=0x0, retval_ptr_ptr=0x0, param_count=0, params=0x0,
    no_separation=0, symbol_table=0x0)
    at /data/cvs/php/php-5.1.2/Zend/zend_execute_API.c:571
#9  0xb7605a8a in phpg_closure_marshal (closure=0x8da9b50, return_value=0x0,
    n_param_values=5, param_values=0xbf8f4210, invocation_hint=0xbf8f40f8,
    marshal_data=0x0) at /data/cvs/phpgtk2/php-gtk/main/phpg_closure.c:124
#10 0xb6fe330e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-30 19:17 UTC] andrei@php.net
I fixed this in CVS. Now the selection, target, and type properties of GtkSelectionData are GdkAtom objects and you have to cast them to (string) in order to get the string representation. Let me know if this is going to be too cumbersome. I may adjust GtkSelectionData to have just strings instead of GdkAtom objects for properties.

Also, when running your example the 'data' property is NULL. Is that normal?
 [2021-02-05 06:55 UTC] jeanmitchell191 at gmail dot com
Facing same issue here. Help is appreciated. Thanks for the info i will try to figure it out for more.



https://www.krogereschedule.us/
 [2021-12-08 10:59 UTC] fincherdavid at gmail dot com
Thanks for the best solution and i loved it
https://19216811.support/
 [2021-12-14 21:36 UTC] paitynplace7 at gmail dot com
Thanks you it's good
https://19216811.vn/
 [2022-01-20 12:58 UTC] takesurvery11 at gmail dot com
Facing same issue here. Help is appreciated. Thanks for the info i will try to figure it out for more.

https://takesurvery.com/myindigocard-login-activation-2022/
 [2022-02-08 18:55 UTC] paitynplace7 at gmail dot com
https://19216811.world/
 [2022-02-12 15:00 UTC] johndav201986 at gmail dot com
Facing same issue here. Help is appreciated. Thanks for the info i will try to figure it out for more.


https://takesurveyofficial.com/mcdvoice-survey-2022/
 [2022-02-18 10:31 UTC] coyogac833 at chatich dot com
Postalexperience.com/pos – USPS conducted a U.S. Postal Service Survey for all customers who want to share their experience. Check U.S. Postal Service Customer Experience Survey Steps.

https://takesurvey.onl/usps-customer-satisfaction-survey/
 [2022-02-25 08:12 UTC] happyhours865 at gmail dot com
Freebirds Happy Hour menu takes one of their most sought-after menu items and offers it at a price that is nearly 2 dollars less than their usual cost. What this means for people who dine in the afternoon and evening is that you’ll get to get the most value for money Freebird offers without paying more for it. 

https://happy-hours-menu.info/freebirds-happy-hour/
 [2022-02-26 03:56 UTC] williamw55612 at gmail dot com
PF Chang’s Appetizers Menu: P.F. Changs’s is an American restaurant chain that serves casual dining. It’s known for its Asian-themed restaurant interiors and menus. They offer a variety of Chinese dishes, including dim sum, chicken, beef, fish, Appetizers, seafood entrees, and rice meals. It is America’s largest casual-dining Chinese restaurant chain.

They have over 200 locations in the United States, and more than 50 internationally.

Below are the latest PF Chang’s Appetizers Menu prices.

https://appetizermenus.com/pf-changs-appetizers-menu/
 [2022-02-26 08:24 UTC] latestmenuprices at gmail dot com
Searching for Golden Corral Prices for 2022? We’ve looked at everything to find it for you starting from Golden Corral Buffet prices to Lunch prices and breakfast price menus. 

https://latestmenuprices.today/golden-corral-menu-prices/
 [2022-02-28 10:11 UTC] sofiaeleanor62 at gmail dot com
Are your family or friends guests showed to your house suddenly and you’d like to get food for them at a low cost and also tasty? Then you can look up the Tap Tap Haitian Restaurant Appetizers Menu list and then order the food in accordance with it. You can also access taptaprestaurant’s hidden menu prices here


https://appetizermenus.com/tap-tap-haitian-restaurant-appetizers-menu/
 [2022-03-03 04:46 UTC] robertartjoe4321 at gmail dot com
Facing same issue here. Help is appreciated. Thanks for the info i will try to figure it out for more.

https://breakfast-menu.website/aandw-breakfast-menu-prices/
 [2022-03-05 04:59 UTC] zoeyaria374 at gmail dot com
Did you make the most of your feast at Jack In The Box Restaurant as of late? Do you have any messages to give Jack In The Box? If your answer is yes, at that point here, you get an opportunity to give your input.

Jack In The Box presents an extraordinary open door for its clients to share their genuine criticism.

By taking an interest in the Jack In The Box Survey, each client can without much of a stretch offer their visit involvement.

https://customerfeedbacks.info/www-jacklistens-com/
 [2022-03-05 05:14 UTC] alaxtiger at gmail dot com
https://www.mytvcodeenter.com/
 [2022-04-02 12:29 UTC] allisthegame999 at gmail dot com
bad bug for sure, thanks

cutt.ly/7DVDR4Y
 [2022-06-09 07:45 UTC] adamdennis155 at gmail dot com
This Texas-based fast-food chain is well-known for its tasty sandwiches and burgers, and they also offer magnificent breakfast meals everyone loves.
 [2022-06-09 07:47 UTC] adamdennis155 at gmail dot com
This Texas-based fast-food chain is well-known for its tasty sandwiches and burgers, and they also offer magnificent breakfast meals everyone loves.  whataburger-breakfast-menu.info/
 [2022-07-02 03:29 UTC] yabohap499 at lenfly dot com
The survey basically wants to know what customers think of their products and how happy clients are with their general customer services.

So, if you have shopped at the Home Depot store or are a regular shopper, you should consider leaving some feedback.
 [2022-08-05 11:33 UTC] sweetkristy456 at gmail dot com
Good one. I appreciate this page. Thanks
 [2022-08-05 11:39 UTC] cweiske@php.net
-Assigned To: +Assigned To: cweiske -Block user comment: No +Block user comment: Yes
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 19:01:27 2024 UTC