[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] OSX segfault emitting signal with dict argument
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2010-04-23 15:05:31
Message-ID: fb11f051a194e54faa7127d9a19edab0 () localhost
[Download RAW message or body]

On Tue, 20 Apr 2010 18:32:43 +0100, Jugdish <jugdizh@gmail.com> wrote:
> I've tested the following bit of code under these 2 setups:
> 
> 1. Mac OSX 10.6.2 Intel
>    Python 2.6.5
>    Qt 4.6.2
>    PyQt 4.7.2
> 
> 2. GNU/Linux x64 Fedora 8
>    Python 2.6.2
>    Qt 4.6.2
>    PyQt 4.7
> 
> The code runs fine on the Linux setup, but results in a segfault on OSX.
> Interestingly, if I declare the signal as pyqtSignal(object) rather than
> pyqtSignal(dict), the segfault doesn't happen. Also, if I change the
> dictionary's key from an integer to a string, the segfault goes away.
> 
> #######################################
> from PyQt4 import QtCore
> 
> class A(QtCore.QObject):
>     foo = QtCore.pyqtSignal(dict)
> 
> class B(QtCore.QObject):
>     def doStuff(self, obj):
>         print "got object", obj
> 
> a = A()
> b = B()
> a.foo.connect(b.doStuff)
> a.foo.emit({0: "value"})

It's actually broken on all platforms - fixed in tonight's snapshot.

Thanks,
Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic