ID:2584323
 
Resolved
In a very old bug, the compiler handled the continue statement wrong when used with a labeled outer loop.
BYOND Version:513
Operating System:Windows 10 Pro
Web Browser:Firefox 77.0
Applies to:Dream Maker
Status: Resolved (513.1527)

This issue has been resolved.
Descriptive Problem Summary:
Using continue with a label inside another loop causes a DD crash at runtime.

Numbered Steps to Reproduce Problem:

Code Snippet (if applicable) to Reproduce Problem:
mob/verb/CrashMe()
for(var/outer_key in list(1))
outer_loop:
for(var/inner in list(1))
for(var/innermost in list(1))
continue outer_loop


Expected Results:
No crash.

Actual Results:
Crash.

Does the problem occur:
Every time? Or how often? Yes
In other games?
In other user accounts?
On other computers?

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) Will check soon.

Workarounds: Use a sentinel var

I'm not getting a crash but the behavior is very wrong here. The proc seems to be stopping and the program gets stuck in a weird state. Looking into it.

[edit]
I get a crash in the debugger, so there's that. Something does appear to be a little bit off in terms of how the code is compiled. I'm reclassifying this as a compiler error because I don't think the runtime is at all responsible, but I'm adding a sanity check to the runtime regardless.

As far as I can tell this bug is very old. It deals with parts of the compiler that haven't been touched in forever.
Lummox JR resolved issue with message:
In a very old bug, the compiler handled the continue statement wrong when used with a labeled outer loop.