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

[BUG] Removing breakpoints can cause internal errors #58

Closed
Jartreg opened this issue Jan 28, 2021 · 0 comments · Fixed by #59
Closed

[BUG] Removing breakpoints can cause internal errors #58

Jartreg opened this issue Jan 28, 2021 · 0 comments · Fixed by #59

Comments

@Jartreg
Copy link
Contributor

Jartreg commented Jan 28, 2021

When removing an breakpoint while in stepping mode, the following error can occur:

internal interpreter error; TScript internal assertion failed; [Interpreter.exec_step] 'done' expected

To reproduce:

Example 1
| ;
•| print("Hello World");
  1. Set breakpoints where the dots are
  2. Execute the code
  3. When reaching the first breakpoint, remove the second:
    | ;	# ← debugger is here
       | print("Hello World");
  4. Continue execution
Example 2
| print("Hello");
 | print("World");
•| print("!");
  1. Set breakpoints where the dots are
  2. Execute the code
  3. When reaching the first breakpoint, step forward until the debugger has reached the third line:
    | print("Hello");
     | print("World");
    •| print("!");		# ← debugger is here
  4. Remove the second breakpoint:
    | print("Hello");
     | print("World");
     | print("!");		# ← debugger is here
  5. Continue execution

Cause

When reaching the first breakpoint in the first example or when stepping onto the third line in the second example, the interpreter halts execution just before completing the second breakpoint step, because the breakpoint's sim function returns true. When continuing execution, next_step asserts that the breakpoint's step function returns true. This is however not the case if the breakpoint was deactivated before.

This bug seems to have the preference to occur in front of large audiences 😉.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant