[ python-Bugs-856841 ] a exception ocurrs when compiling a Python
file
SourceForge.net
noreply at sourceforge.net
Tue Dec 16 10:37:50 EST 2003
Bugs item #856841, was opened at 2003-12-09 07:57
Message generated for change (Comment added) made by tjreedy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856841&group_id=5470
Category: Parser/Compiler
Group: Python 2.2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Pablo Yabo (pablo_yabo)
Assigned to: Nobody/Anonymous (nobody)
Summary: a exception ocurrs when compiling a Python file
Initial Comment:
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.
----------------------------------------------------------------------
Comment By: Terry J. Reedy (tjreedy)
Date: 2003-12-16 10:37
Message:
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.
----------------------------------------------------------------------
Comment By: Jack Jansen (jackjansen)
Date: 2003-12-15 05:04
Message:
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.
----------------------------------------------------------------------
Comment By: Terry J. Reedy (tjreedy)
Date: 2003-12-14 23:26
Message:
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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856841&group_id=5470
More information about the Python-bugs-list
mailing list