[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: PyFinalize crash when mixing sip and PyQt-Builder extensions?
From: Patrick Stinson <patrickkidd () gmail ! com>
Date: 2022-10-26 20:38:12
Message-ID: CADb17j0C1foL0ExZ+gxjfGxN+jGXVtSUV7zRfmdCjLsRkeqR=Q () mail ! gmail ! com
[Download RAW message or body]
I read somewhere on SO that this may have something to do with the qt
library's finalizer being called before the pyqt finalizer, resulting in a
double free()?
On Tue, Oct 25, 2022 at 8:39 AM Patrick Stinson <patrickkidd@gmail.com>
wrote:
> I am getting a crash on exit when I include both my basic sip extension
> and PyQt-Builder extension. If I A) only import my pure sip extension in
> python and not the PyQt-Builder extension, or B) change the sip extension
> builder to PyQt-Builder, it doesn't crash. Import order doesn't matter.
> PyQt-5.15.7, python-3.10
>
> The macOS Crash Report says:
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0 libsystem_kernel.dylib 0x7ff80be2b00e __pthread_kill + 10
> 1 libsystem_pthread.dylib 0x7ff80be611ff pthread_kill + 263
> 2 libsystem_c.dylib 0x7ff80bdacd24 abort + 123
> 3 libsystem_malloc.dylib 0x7ff80bc8a357 malloc_vreport + 551
> 4 libsystem_malloc.dylib 0x7ff80bc8d52b malloc_report + 151
> 5 Family Diagram 0x1071ee985 _PyObject_Free + 165
> 6 Family Diagram 0x107359e71 finalise + 177
> 7 Family Diagram 0x1072e8bd9 Py_FinalizeEx + 409
> 8 Family Diagram 0x106b2d776 pyqtdeploy_start(int,
> char**, _inittab*, char const*, char const*, char const**) + 1862
> (pyqtdeploy_start.cpp:236)
> 9 dyld 0x1147cc52e start + 462
>
> It's complaining about a pointer being freed that wasn't allocated.
>
> I'm not sure where to start with that stack trace. I'd just change the
> project builder on the pre sip extension but it's shared with a server
> process and I need to avoid a Qt/qmake dependency.
>
> Cheers,
> -Patrick
>
[Attachment #3 (text/html)]
<div dir="ltr">I read somewhere on SO that this may have something to do with the qt \
library's finalizer being called before the pyqt finalizer, resulting in a double \
free()?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, \
Oct 25, 2022 at 8:39 AM Patrick Stinson <<a \
href="mailto:patrickkidd@gmail.com">patrickkidd@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I am \
getting a crash on exit when I include both my basic sip extension and PyQt-Builder \
extension. If I A) only import my pure sip extension in python and not the \
PyQt-Builder extension, or B) change the sip extension builder to PyQt-Builder, it \
doesn't crash. Import order doesn't matter. PyQt-5.15.7, \
python-3.10<div><br></div><div>The macOS Crash Report \
says:</div><div><br></div><div><font face="monospace">Thread 0 Crashed:: Dispatch \
queue: com.apple.main-thread<br>0 libsystem_kernel.dylib \
0x7ff80be2b00e __pthread_kill + 10<br>1 libsystem_pthread.dylib \
0x7ff80be611ff pthread_kill + 263<br>2 libsystem_c.dylib \
0x7ff80bdacd24 abort + 123<br>3 libsystem_malloc.dylib \
0x7ff80bc8a357 malloc_vreport + 551<br>4 libsystem_malloc.dylib \
0x7ff80bc8d52b malloc_report + 151<br>5 Family Diagram \
0x1071ee985 _PyObject_Free + 165<br>6 Family Diagram \
0x107359e71 finalise + 177<br>7 Family Diagram \
0x1072e8bd9 Py_FinalizeEx + 409<br>8 Family Diagram \
0x106b2d776 pyqtdeploy_start(int, char**, _inittab*, char const*, char const*, char \
const**) + 1862 (pyqtdeploy_start.cpp:236)<br>9 dyld \
0x1147cc52e start + 462</font><br></div><div><br></div><div>It's complaining \
about a pointer being freed that wasn't \
allocated.</div><div><br></div><div>I'm not sure where to start with that stack \
trace. I'd just change the project builder on the pre sip extension but it's \
shared with a server process and I need to avoid a Qt/qmake \
dependency.<br></div><div><br></div><div>Cheers,</div><div>-Patrick</div></div> \
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic