a exception ocurrs when compiling some big python files (more than 250kb) using the debug library (python22_d.dll). When using the release library in the release version of my application the files compile succesfully. Attached is the stack trace.
Logged In: YES user_id=593130 I do not believe this is a compiler bug. While compiler input may by theoretically unbounded, all practical compilers have practical limitations that often depend, in part, on the amount of memory on your particular system. This is one reason for import and include mechanisms. As I understand the stack trace, the exception occured during an attempt to reallocate memory (ie, move an object to a larger block). (Including Python's exception trace would make this clearer). I presume debug mode uses more memory so you hit the limit sooner with that mode. Your solutions are to either 1) add more memory to your computer (should probably work) or try on a system with more memory or 2) break your source into more modules (certain to work if the problem is, indeed, simply running out of memory). 250K is not merely big but huge. The largest file in the standard lib is under 100K and the median is around 10K. Unless you have more reason to think this a bug, please withdraw or close.
Logged In: YES user_id=45365 I agree with the original poster that this is a bug. While it may not be fixable (and definitely not in the general case) you should get a decent error message from Python (at the very least a MemoryError), not a crash of the interpreter.
Logged In: YES user_id=593130 If, by 'exception', PY indeed means a system crash rather than a Python exception, then I agree that more graceful termination would be desireable. However, I believe someone once pointed out on Py-Dev list that memory failures may make interpreter operation, even to produce a Python stack trace, impossible. In any case, the details of system software and hardware, including memory, needed to even discuss this, are still missing.