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

Stack doesn't clear on exception termination #427

Closed
Dunbaratu opened this issue Nov 29, 2014 · 1 comment
Closed

Stack doesn't clear on exception termination #427

Dunbaratu opened this issue Nov 29, 2014 · 1 comment
Assignees
Labels
bug Weird outcome is probably not what the mod programmer expected.

Comments

@Dunbaratu
Copy link
Member

When an exception is thrown, causing execution to stop, the stack remains as it is.. When another command is issued after the exception happened, it lays its stack information on top of the leftover garbage was still there when the exception happened.

You don't notice much of an effect when running a program with an exception, because running a new program will clear the stack. But you do notice when running commands interactively. The effect.the user sees is that the second time an exception happens, when printing the stack trace to the screen it will claim, quite incorrectly, that the second command was called from the first one. If the user keeps typing more commands at the interactive prompt and gets a third command with an exception, then the stack trace will claim the third command was called from the second which was called from the first, and so on. This is because the call stack information contained in the stack is left behind from each previous time there was an exception.

@Dunbaratu Dunbaratu added the bug Weird outcome is probably not what the mod programmer expected. label Nov 29, 2014
@erendrake erendrake modified the milestone: v0.15.X Punch List Dec 4, 2014
@erendrake
Copy link
Member

How much work are we talking about for this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Weird outcome is probably not what the mod programmer expected.
Projects
None yet
Development

No branches or pull requests

2 participants