View Single Post
Old 05-26-2014, 11:24 AM   #49
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi AcidWeb,

Threads are typically allocated with their own max stack allocation. I am not sure whether python objects are allocated on the stack or the heap at run time and if that changes when objects are "returned". Also for "returned" objects does it matter if they are named objects or auto temp allocated/deallocated objects?

So as a workaround, why not spawn a full subprocess (fork) from a thread and just wait for it to finish to collect the output? That should allocate an entire new process (not just a thread) but still allow you to have full concurrency.

My 2 cents ...

Anyway, Glad it is not me tracking it down! ;-)

Take care,

KevinH




Quote:
Originally Posted by AcidWeb View Post
Well I made some additional tests and results are ever more puzzling.

If I extract my Python3 version of your code and run standalone - It run correctly.
If I extract my Python3 version of your code and run standalone as QRunnable thread (Like my program) - It run correctly.
If I run it as QRunnable thread from my program - MemoryError.
If I run it from my program main worker QThread - MemoryError.

As we can see apparently that is not directly connected to your code. Either way debugging that will be pain :-)

Thank you.
KevinH is offline   Reply With Quote