YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

Interpreter stack limit exceeded, and other stack crashes in 0.8.0 #6960

Open thennothinghappened opened 4 months ago

thennothinghappened commented 4 months ago

Description

This came up from testing one of my games on Interpreter which uses the Input library. Input does a lot of jumping around and calls a lot of recursive functions while setting itself up, namely __input_initialize and __input_global are the main culprits. During execution, the interpreter crashes with "interpreter stack limit exceeded".

I made a test project to isolate the issue and have a few findings: Note that these numbers seem to vary to some extent in the range of +/-20, for GMRT's Interpreter, at least.

GMRT

Interpreter

Native

Current Runtime (for reference)

VM

YYC

Expected Change

No response

Steps To Reproduce

A) Input

This is the first way I found this behaviour, which lead onto B. Import Input into a new project. The version present in my project was 6.1.4, although I tested on the latest 6.3.1 and encountered the exact same issue.

Compile with the Interpreter, and you will encounter the original "interpreter stack limit exceeded" message. This message, in my testing, was hit, depending on the version, at:

B) crash()

To further test, I made a very quick and dirty test function in a new project:

function crash(depth = 0) {

    show_debug_message($"Callstack depth: {depth}");

    if (depth < 1000) {
        crash(depth + 1);
    }

    throw "kaboom";

}

crash();

Changing that < 1000 value to others was all I used to get the other test information. I also added {debug_get_callstack()} in the debug message for testing that, but it is not present as shown here.

Test Project: GMRT-Interpreter-Stack-Limit-Reached.zip

How reliably can you recreate this issue using your steps above?

None

Which version of GameMaker are you reporting this issue for?

Beta (Please put the exact version number in your Description)

Which platform(s) are you seeing the problem on?

Windows

Compiler Log File

Sample .yyz File

andy-yoyo commented 4 months ago

Hi. I have commented on another related issue explaining some of what's happening here: https://github.com/GMExternal/NewRuntimeBeta/issues/172

In this case the problems seem to be:

Thanks for filing this with so much detail. Especially the comparisons to the current runtime 👍