Re: [PyQt] Help understanding a backtrace

2012-02-06 Thread Kovid Goyal
On Mon, Jan 30, 2012 at 12:22:35PM +, Phil Thompson wrote: Try the current tip of the 4.13-maint branch without any additional changes... I'm happy to report I have seen no more crashes. I'd appreciate a 4.13.2 release, so I have to deal with fewer calibre randomnly crashing bug reports.

Re: [PyQt] Help understanding a backtrace

2012-01-30 Thread Kovid Goyal
On Sun, Jan 29, 2012 at 10:14:48PM +, Phil Thompson wrote: Backout that change and apply the second one. Doing that results in a crash, with the assertion causing the output python2: objmap.c:267: add_object: Assertion `sw-flags 0x0200 == 0' failed. Backtrace attached. Kovid. --

Re: [PyQt] Help understanding a backtrace

2012-01-30 Thread Kovid Goyal
I was able to trace the python code that is triggering the assert. Basically, it is the following sequence: view = self.parent() At this point view is a subclass of QMainWindow and view.parent() returns None Calling view.size() causes the assert to be triggered. Interestingly the assert is

Re: [PyQt] Help understanding a backtrace

2012-01-30 Thread Phil Thompson
On Mon, 30 Jan 2012 17:43:30 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: I was able to trace the python code that is triggering the assert. Basically, it is the following sequence: view = self.parent() At this point view is a subclass of QMainWindow and view.parent() returns None

Re: [PyQt] Help understanding a backtrace

2012-01-30 Thread Kovid Goyal
On Mon, Jan 30, 2012 at 12:22:35PM +, Phil Thompson wrote: Try the current tip of the 4.13-maint branch without any additional changes... hg pull -u Done, albeit with hg clone -b 4.13-maint instead as pull wasn't doing the right thing. I'll let you know in a week if there are no more

Re: [PyQt] Help understanding a backtrace

2012-01-29 Thread Phil Thompson
On Sun, 29 Jan 2012 12:42:13 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: I did, specifically to a checkout with hg: hg clone http://www.riverbankcomputing.com/hg/sip/ grep -r SIP_ALIAS sip/ destination directory: sip requesting all changes adding changesets adding manifests adding

Re: [PyQt] Help understanding a backtrace

2012-01-29 Thread Kovid Goyal
On Sun, Jan 29, 2012 at 11:05:39AM +, Phil Thompson wrote: Yes, or the 4.13-maint branch... hg update 4.13-maint ...which (at the moment) are the same. OK, done. You'll hear from me in a week if there are no crashes, sooner otherwise. Kovid. -- _

Re: [PyQt] Help understanding a backtrace

2012-01-29 Thread Phil Thompson
On Sun, 29 Jan 2012 22:20:26 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: Got another crash, with the addition of SIP_ALIAS. The backtrace is a little different, now the crash happens in PyObject__GcUntrack called from removeParent (backtrace attached). To be clear this is running off sip

Re: [PyQt] Help understanding a backtrace

2012-01-28 Thread Phil Thompson
On Sat, 28 Jan 2012 13:07:42 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: On Thu, Jan 26, 2012 at 03:15:31PM +, Phil Thompson wrote: Then can you try the following change to add_object() in objmap.c... if (!(val-flags SIP_SHARE_MAP)) ...to... if (!(val-flags

Re: [PyQt] Help understanding a backtrace

2012-01-28 Thread Kovid Goyal
I did, specifically to a checkout with hg: hg clone http://www.riverbankcomputing.com/hg/sip/ grep -r SIP_ALIAS sip/ destination directory: sip requesting all changes adding changesets adding manifests adding file changes added 1035 changesets with 2861 changes to 151 files (+7 heads) updating

Re: [PyQt] Help understanding a backtrace

2012-01-27 Thread Kovid Goyal
On Fri, Jan 27, 2012 at 10:18:13AM +, Phil Thompson wrote: On Fri, 27 Jan 2012 10:21:29 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: Just got another crash, this time the backtrace had no itertools call. I've attached the full backtrace for both crashes to this mail. How would you

Re: [PyQt] Help understanding a backtrace

2012-01-27 Thread Kovid Goyal
On Thu, Jan 26, 2012 at 03:15:31PM +, Phil Thompson wrote: Then can you try the following change to add_object() in objmap.c... if (!(val-flags SIP_SHARE_MAP)) ...to... if (!(val-flags (SIP_SHARE_MAP | SIP_ALIAS))) ...to see if it helps. I was unable to do this.

Re: [PyQt] Help understanding a backtrace

2012-01-26 Thread Kovid Goyal
It's been a week and I have had no crashes since reverting sip to revision 1027. While that is by no means conclusive proof of a bug, it is highly suggestive. Is there some extra instrumentation I can add to SIP to narrow down the cause? Kovid. On Thu, Jan 19, 2012 at 10:24:56PM +0530, Kovid

Re: [PyQt] Help understanding a backtrace

2012-01-26 Thread Phil Thompson
On Thu, 26 Jan 2012 17:59:57 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: It's been a week and I have had no crashes since reverting sip to revision 1027. While that is by no means conclusive proof of a bug, it is highly suggestive. Is there some extra instrumentation I can add to SIP to

[PyQt] Help understanding a backtrace

2012-01-19 Thread Kovid Goyal
Hi all, I've recently started getting random segfaults in calibre on my dev machine (linux 64bit sip-4.13.1 and PyQt4-4.9). I compiled everything with -ggdb and generated the following backtrace from a core dump (Only kept the top 15 calls) #0 removeFromParent (self=0x5f66cc0) at siplib.c:5265

Re: [PyQt] Help understanding a backtrace

2012-01-19 Thread Phil Thompson
On Thu, 19 Jan 2012 22:24:56 +0530, Kovid Goyal ko...@kovidgoyal.net wrote: Hi all, I've recently started getting random segfaults in calibre on my dev machine (linux 64bit sip-4.13.1 and PyQt4-4.9). I compiled everything with -ggdb and generated the following backtrace from a core dump

Re: [PyQt] Help understanding a backtrace

2012-01-19 Thread Kovid Goyal
On Thu, Jan 19, 2012 at 06:24:41PM +0100, Erik Janssens wrote: FYI, since PyQt 4.9 you don't need to disable the garbage collector any more. When Python desides to delete a Qt object from a different thread, PyQt delayes the deletion until that thread has taken control. I know, I was

Re: [PyQt] Help understanding a backtrace

2012-01-19 Thread Kovid Goyal
On Thu, Jan 19, 2012 at 05:32:49PM +, Phil Thompson wrote: The current version of SIP made some changes to the the mapping between Python and C++ objects. It might be worth trying a version without those changes. You would need to backout the changes up to and including...