[PyQt] PyQt 3.18.1 qApp.translate() issues since sip 4.11.1 (at least)
Phil Thompson
phil at riverbankcomputing.com
Sat Oct 9 14:26:45 BST 2010
On Thu, 7 Oct 2010 20:53:51 +0200, "Hans-Peter Jansen" <hpj at urpla.net>
wrote:
> On Thursday 07 October 2010, 13:14:45 Phil Thompson wrote:
>> On Wed, 6 Oct 2010 14:33:29 +0200, "Hans-Peter Jansen"
>> > today, I noticed, that there's an ugly issue, resulting in such
>> tracebacks:
>> >
>> > As you can see, qApp is always involved, translate() most of the
>> > time, too. The real ugliness comes from not being reproducible, the
>> > same code happens to run perfectly well on the next try, and I was
>> > not able to create a minimum example, yet.
>>
>> Don't worry about an example that always fails - one that fails
>> sometimes will probably do.
>
> Okay, here we go. It's bigger then I hoped, and does don't crash
> reliable. It behaves fine most of the time, and the issue happens at a
> random point, either immediately after start:
>
> Traceback (most recent call last):
> File "./testapp.py", line 49, in <module>
> win = TestWin()
> File "testwin.py", line 15, in __init__
> TestWinBase.__init__(self, parent, name, fl)
> File "testwinbase.py", line 43, in __init__
> self.languageChange()
> File "testwinbase.py", line 50, in languageChange
> self.setCaption(self.__tr("TestWin"))
> File "testwinbase.py", line 61, in __tr
> return qApp.translate("TestWinBase",s,c)
> RuntimeError: underlying C/C++ object has been deleted
>
> or periodically during execution:
>
> $ LANG=de_DE ./testapp.py
> Traceback (most recent call last):
> File "testwin.py", line 34, in statusTimeout
> qApp.mainWidget().statusBar().message(self.__tr(
> RuntimeError: underlying C/C++ object has been deleted
> Traceback (most recent call last):
> File "testwin.py", line 31, in statusTimeout
> qApp.mainWidget().staticMsg.setText(self.__tr("Running since: %1")
> RuntimeError: underlying C/C++ object has been deleted
> Traceback (most recent call last):
> File "testwin.py", line 31, in statusTimeout
> qApp.mainWidget().staticMsg.setText(self.__tr("Running since: %1")
> RuntimeError: underlying C/C++ object has been deleted
> Traceback (most recent call last):
> File "testwin.py", line 31, in statusTimeout
> qApp.mainWidget().staticMsg.setText(self.__tr("Running since: %1")
> RuntimeError: underlying C/C++ object has been deleted
>
> Interacting with the "do nothing" menu item seems to contribute to the
> problem, but again in elusive ways. This pretty much constitutes a
> heisenbug, that it is. It happened also in both the "de_DE" and the "C"
> locale, and it should appear within two dozen tries..
>
>> > I do know for sure, that this doesn't happen with sip 4.10.1, hence
>> > it's something, that crawled in between 4.10.1 and 4.11.1. Does this
>> > ring a bell for you?
>>
>> There have been changes in an area where the only use case is qApp in
>> PyQt3.
>
> Could you point me to the commit ids of those?
Those around Aug 18th.
Should be fixed in tonight's SIP snapshot.
Thanks,
Phil
More information about the PyQt
mailing list