Re: Bug #54427 [NEW]: Segfault when emiting custom signal with object parameter
| From: | Bruno P. Gonçalves | Date: | Wed, 30 Mar 2011 17:12:10 +0000 |
| Subject: | Re: Bug #54427 [NEW]: Segfault when emiting custom signal with object parameter | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-4515@lists.php.net to get a copy of this message | ||
Make sure if you are destroying the dialog to re-open =)
- - -
Bruno Pitteli Gonçalves
bruno@pitteli.com.br
+55 018 97958674
- - -
ScornInPC - http://blog.scorninpc.com/
Browse Happy - http://browsehappy.com/
On Wed, Mar 30, 2011 at 1:01 PM, ptlis at ptlis dot net <
php-bugs@lists.php.net> wrote:
> From:
> Operating system: Ubuntu 10.4
> PHP version: 5.3.6
> Package: PHP-GTK related
> Bug Type: Bug
> Bug description:Segfault when emiting custom signal with object parameter
>
> Description:
> ------------
> The first time the OK button on the dialog is clicked the custom signal is
> emitted correctly, on the second click php segfaults on the call to
> emit().
>
> If no object is provided to emit() the second signal emits without segfault
> as expected.
>
> Test script:
> ---------------
> <?php
>
> /** Class implements custom signal 'product-ready'. */
> class customDialog extends GtkDialog {
> public $__gsignals = array(
> 'product-ready' => array(
> GObject::SIGNAL_RUN_LAST,
> GObject::TYPE_BOOLEAN,
> array(
> GObject::TYPE_PHP_VALUE
> )
> )
> );
>
> public function __construct($title, GtkWindow $parent) {
> parent::__construct($title, $parent,
> Gtk::DIALOG_MODAL);
>
> $product = new stdClass();
>
> $okButton = new GtkButton('OK');
> $this->action_area->add($okButton);
> $okButton->connect_simple('clicked', array($this,
> 'ok_clicked'),
> $product);
> }
>
> public function ok_clicked(stdClass $product) {
> $this->emit('product-ready', $product);
> }
> }
> GObject::register_type('customDialog');
>
>
>
> $window = new GtkWindow();
> $window->show_all();
>
> $dialog = new customDialog('fire signal dialog', $window);
> $dialog->show_all();
>
> $dialog->connect('product-ready', 'product_ready');
>
> function product_ready() {
> echo 'segfaults on second signal' . "\n";
> return true;
> }
>
> Gtk::main();
>
>
> --
> Edit bug report at
> http://bugs.php.net/bug.php?id=54427&edit=1
> --
> Try a snapshot (PHP 5.2):
> http://bugs.php.net/fix.php?id=54427&r=trysnapshot52
> Try a snapshot (PHP 5.3):
> http://bugs.php.net/fix.php?id=54427&r=trysnapshot53
> Try a snapshot (trunk):
> http://bugs.php.net/fix.php?id=54427&r=trysnapshottrunk
> Fixed in SVN:
> http://bugs.php.net/fix.php?id=54427&r=fixed
> Fixed in SVN and need be documented:
> http://bugs.php.net/fix.php?id=54427&r=needdocs
> Fixed in release:
> http://bugs.php.net/fix.php?id=54427&r=alreadyfixed
> Need backtrace:
> http://bugs.php.net/fix.php?id=54427&r=needtrace
> Need Reproduce Script:
> http://bugs.php.net/fix.php?id=54427&r=needscript
> Try newer version:
> http://bugs.php.net/fix.php?id=54427&r=oldversion
> Not developer issue:
> http://bugs.php.net/fix.php?id=54427&r=support
> Expected behavior:
> http://bugs.php.net/fix.php?id=54427&r=notwrong
> Not enough info:
> http://bugs.php.net/fix.php?id=54427&r=notenoughinfo
> Submitted twice:
> http://bugs.php.net/fix.php?id=54427&r=submittedtwice
> register_globals:
> http://bugs.php.net/fix.php?id=54427&r=globals
> PHP 4 support discontinued:
> http://bugs.php.net/fix.php?id=54427&r=php4
> Daylight Savings:
> http://bugs.php.net/fix.php?id=54427&r=dst
> IIS Stability:
> http://bugs.php.net/fix.php?id=54427&r=isapi
> Install GNU Sed:
> http://bugs.php.net/fix.php?id=54427&r=gnused
> Floating point limitations:
> http://bugs.php.net/fix.php?id=54427&r=float
> No Zend Extensions:
> http://bugs.php.net/fix.php?id=54427&r=nozend
> MySQL Configuration Error:
> http://bugs.php.net/fix.php?id=54427&r=mysqlcfg
>
>
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>