[PyQt] crash: *** glibc detected *** python: double free or corruption (fasttop): 0x0a802370 ***

Tom Kuiper kuiper at jpl.nasa.gov
Mon Nov 30 17:13:58 GMT 2009


Thank you, Alex. This kind of "fix" will not do for me as I am writing a 
program that is intended to run continuously, monitoring data 
acquisition, and will generally not be watched by anyone.  Unpredictable 
crashes are not acceptable.

I did see a comment to a similar posting in this list about six weeks 
ago in which Jason H-3 wrote  "GUI operations can only be done in the 
main thread. "Whether this is relevant or not, I certainly am breaking 
this rule, so I will try to restructure my code accordingly.

Since you have the problem in C and I have seen it reported in many 
different contexts, not just pyqt or even Python, I guess it is a 
serious bug, perhaps in glibc.  Since it is unpredictable, it may be 
hard to fix.  However, Travis Oliphant in the numpy list wrote on April 
17, 2008, that it had been fixed in a recent release.  I guess I have to 
wait for Debian to catch up.

Thanks for your response.

Tom

Aleksandar Nedeljkovic wrote:
> Did you try:
>
> export MALLOC_CHECK_ = 0.
>
> This is only temporary solution, you must review your code, because 
> somewhere in it there is double free of memory.
>
> I have same problem, in C,  I solve it with removing unnecessary 
> freeing of memory.
>
> Solution in first row will only hide the problem, when you test your 
> code with more serious cases, you will probably receive segmentation 
> fault.
>
> Hope this help.
>
>
>
> On Fri, Nov 27, 2009 at 11:54 PM, Tom Kuiper <kuiper at jpl.nasa.gov 
> <mailto:kuiper at jpl.nasa.gov>> wrote:
>
>     Greetings!
>
>     A pyQt4 application using QThread (I suspect this is relevant)
>     crashed unpredictably with the above error message.  Searching the
>     web I found this type of error in many diverse applications, not
>     just Python or pyqt4.  I could not find a clue to resolving this
>     problem.  I'm somewhat reluctant to post here the 120 lines of
>     diagnostics so here are some parts that I suspect are relevant:
>
>     *** glibc detected *** python: double free or corruption
>     (fasttop): 0x0a802370 ***
>     ======= Backtrace: =========
>     /lib/i686/cmov/libc.so.6[0xb7dd9624]
>     /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7ddb826]
>     /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb77142e1]
>     /usr/lib/libQtGui.so.4(_ZN7QRegion7cleanUpEPNS_11QRegionDataE+0x48)[0xb68e9558]
>     /usr/lib/libQtGui.so.4(_ZN7QRegionaSERKS_+0x3e)[0xb68e95ce]
>     ...
>     python(PyRun_SimpleFileExFlags+0x19a)[0x80ee00a]
>     python(Py_Main+0xc07)[0x8059327]
>     python(main+0x22)[0x80586f2]
>     /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7d81455]
>     python[0x8058631]
>     ======= Memory map: ========
>     08048000-08143000 r-xp 00000000 08:01 1213624    /usr/bin/python2.5
>     08143000-08168000 rw-p 000fa000 08:01 1213624    /usr/bin/python2.5
>     08168000-0816e000 rw-p 08168000 00:00 0
>     094ce000-0ad3f000 rw-p 094ce000 00:00 0          [heap]
>     ...
>     b2c33000-b2c35000 r--s 00000000 08:01 8522271  
>      /var/cache/fontconfig/646addb8444faa74ee138aa00ab0b6a0-x86.cache-2
>     b2c35000-b2c38000 r--s 00000000 08:01 8522270  
>      /var/cache/fontconfig/dfe01fa16583a85Aborted
>
>     I'm running an up-to-date Debian lenny with a 2.6.26-1-686 i686
>     GNU/Linux kernel.
>
>     For any insights, many thanks.
>
>     Tom
>     _______________________________________________
>     PyQt mailing list    PyQt at riverbankcomputing.com
>     <mailto:PyQt at riverbankcomputing.com>
>     http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091130/0f66e8ad/attachment.html


More information about the PyQt mailing list