Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a exception ocurrs when compiling a Python file #39686

Closed
pabloyabo mannequin opened this issue Dec 9, 2003 · 5 comments
Closed

a exception ocurrs when compiling a Python file #39686

pabloyabo mannequin opened this issue Dec 9, 2003 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@pabloyabo
Copy link
Mannequin

pabloyabo mannequin commented Dec 9, 2003

BPO 856841
Nosy @jackjansen, @birkenfeld, @terryjreedy
Files
  • stack.txt: stack trace
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2006-02-20.15:39:00.000>
    created_at = <Date 2003-12-09.12:57:40.000>
    labels = ['interpreter-core']
    title = 'a exception ocurrs when compiling a Python file'
    updated_at = <Date 2006-02-20.15:39:00.000>
    user = 'https://bugs.python.org/pabloyabo'

    bugs.python.org fields:

    activity = <Date 2006-02-20.15:39:00.000>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2003-12-09.12:57:40.000>
    creator = 'pablo_yabo'
    dependencies = []
    files = ['1135']
    hgrepos = []
    issue_num = 856841
    keywords = []
    message_count = 5.0
    messages = ['19346', '19347', '19348', '19349', '19350']
    nosy_count = 4.0
    nosy_names = ['jackjansen', 'georg.brandl', 'terry.reedy', 'pablo_yabo']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue856841'
    versions = ['Python 2.2']

    @pabloyabo
    Copy link
    Mannequin Author

    pabloyabo mannequin commented Dec 9, 2003

    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.

    @pabloyabo pabloyabo mannequin closed this as completed Dec 9, 2003
    @pabloyabo pabloyabo mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Dec 9, 2003
    @pabloyabo pabloyabo mannequin closed this as completed Dec 9, 2003
    @pabloyabo pabloyabo mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Dec 9, 2003
    @terryjreedy
    Copy link
    Member

    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.

    @jackjansen
    Copy link
    Member

    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.

    @terryjreedy
    Copy link
    Member

    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.

    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=849994

    This is likely to be resolved with the new AST compiler in 2.5.

    If not, please open another bug report then.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants