Skip to content

Infinite loop locks up assignment #18

@aarchiba

Description

@aarchiba

If a student creates an infinite loop in a submitted answer, the assignment reads "Your answer is being marked. Please wait." and hangs there, apparently forever. Other questions on the same page also seem not to be able to be run until the page is reloaded.

I realize that it's not simple to handle this case, but from a user interface point of view it would help if hitting any "submit" button interrupted the interpreter, possibly yielding a KeyboardInterrupt exception in the infinite loop, or just killing the interpreter. The problematic submission could then report that it had been interrupted, and the user would be able to decide whether waiting longer would be a good idea.

This came up because I'm writing a question where users identify and fix common mistakes in example code, and I'd like to highlight forgetting to update the variable that triggers exit from a while loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions