Breakpoints can become corrupt, causing studio to crash when entering autocompleted statements above them

Reproduction Steps
To reproduce this issue:

  1. Create a new script. This script should have some arbitrary block of code (it can be anything). For this example, a simple if statement will be used.
if true then
    print("Yes")
end
  1. Place one breakpoint on the line labeled print("Yes"). Note that the placement of the breakpoint ultimately does not matter.

image

  1. Create empty space above the script. Enter a block of code that has autocomplete. For this example, enter do and press the return key so that the corresponding end is created automatically. This should cause a duplicate breakpoint to be created as a side effect (which is seen below on the if true then line. This breakpoint was not created manually.)

image

  1. Enter any more autocompleting code (such as another do/end) above the breakpoints (doing it below them will not cause the crash). As soon as the autocompleted closing statement (end, until, etc) is created, studio will crash.

Here is a video showing this off (unfortunately the embed is not working): https://i.imgur.com/XLqxg5V.mp4

Expected Behavior
I expect autocomplete to work smoothly without causing studio to crash, as well as breakpoints not being duplicated if autocompleted code is input.

Actual Behavior
When using autocompleting code and breakpoints, studio crashes under certain cases, as mentioned in the reproduction steps.

Workaround
All breakpoints in my script that are below the place I am editing must be disabled.

Issue Area: Studio
Issue Type: Crashing
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2021-11-26 13:11:00 (-06:00)

3 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

2 Likes