As a native Java developer, I think I have reached a situation which is what I am used to.
I am developing a multi-threaded Python 2.7 application using PyDev and running from Eclipse on Windows 7 64 bit. It is multi-threaded because it uses wxPython and so it uses the GUI main thread and heavy lifting threads (and my or my there is some heavy lifting) with one thread per callback.
I have reached a point where I get a popup 0xc00000fd
error in python27.dll
with an appcrash message. This occurs as a function in a thread returns a value. If I reduce the amount of data the callback is working with, the piece of code works fine so I am pretty sure that there is just too much stuff on the stack and there is no recursion gone bad anywhere.
I could call stack_size
on the thread before creation to increase the space available to me and perhaps this could work for a time if I were to figure out how much space would satisfy it. The thread is going to have to do more not less work going forward so this seems like a band-aid situation.
I thought that Python created the stack using heap memory and so this should not be a problem in Python? Is it one of my many third party apis which is the real offender? So then without that low level memory creation decision making ability I would have in C, how do I get some of this off the stack and into heap memory?