#47063 [Opn]: PHP-GTK

From: Date: Thu, 15 Jan 2009 01:30:44 +0000
Subject: #47063 [Opn]: PHP-GTK
References: 1  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-4313@lists.php.net to get a copy of this message
ID: 47063 Updated by: auroraeosrose@php.net Reported By: db4fn1 dot snl at gishpuppy dot com Status: Open Bug Type: PHP-GTK related Operating System: Ubuntu PHP Version: 5.2.8 New Comment: At the moment it appears the issue is in the GTK library itself. I can't get this to reproduce on Ubuntu x86, only on x64, as well which makes it very difficult to track down. If you are using append_text methods with GtkComboBox you SHOULD be using the static constructor anyway - the methods will not work properly with a regular GtkComboBox See http://library.gnome.org/devel/gtk/stable/GtkComboBox.html#gtk-combo-box-append-text (which is the C level call we're wrapping) Previous Comments: ------------------------------------------------------------------------ [2009-01-15 00:57:39] db4fn1 dot snl at gishpuppy dot com Is there a long-term fix for the original script without having to modify the script? We have hundreds of scripts using "new GtkComboBox()" and fixing them will cost a lot of time. ------------------------------------------------------------------------ [2009-01-14 23:03:38] bmajdak@php.net i am researching this a bit. however the following solution will get you past your immediate problem: http://php.pastebin.com/f7bcedbd5 e.g. replacing "new GtkComboBox()" with "GtkComboBox::new_text()" ------------------------------------------------------------------------ [2009-01-14 22:22:14] db4fn1 dot snl at gishpuppy dot com The actual segmentation fault occurs with the following script: http://php.pastebin.com/d9d5fc14 ------------------------------------------------------------------------ [2009-01-11 01:32:32] auroraeosrose@php.net I do NOT get a crash - however the reproduce script is incorrect and throws GTK warnings and a fatal error http://php.pastebin.com/f3a9d9ba7 - This has correct fixes for the code Notice you cannot use insert_text unless you've used GtkComboBox::new_text(); when creating the combo box - this is mentioned in the documentation at gtk.php.net In addition the "main loop" is Gtk::main(); not Gtk::show(); you don't need to set things visible, you can just use the show_all(); method on your main window. Finally, you are using PHP built with the Suhosin-Patch which is known to have conflicts with some PHP extensions. Try removing the patch or building a PHP CLI just for your PHP-GTK extensions. ------------------------------------------------------------------------ [2009-01-10 23:42:56] db4fn1 dot snl at gishpuppy dot com $ php --version PHP 5.2.6-2ubuntu4 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct 14 2008 20:06:32) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/47063 -- Edit this bug report at http://bugs.php.net/?id=47063&edit=1

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