Open thennothinghappened opened 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:
debug_get_callstack
isn't working properly with the interpreterThanks for filing this with so much detail. Especially the comparisons to the current runtime 👍
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
debug_get_callstack
returns an empty array every time, but each call takes longer based on the depth of the callstack.throw
/show_error
freezes for an extreme period proportional to the callstack length.Native
debug_get_callstack
returns the callstack array correctly, but as with the interpreter, calls get substantially slower over time.Current Runtime (for reference)
VM
Stack Overflow detected!!! exiting...
"2237
no longer report errors on crash, and the runtime crashes silently.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:
__input_initialize
, made by a recursive call to__input_global()
. The moment the function was called, it would crash. I tried querying its_initialized
value using__input_initialize[$ "_initialized"] == true
, and if that was true, would not call it again. This just moved the error to a bit later.__input_initialize
, either ashow_error
call, or if that call was no-oped to continue further, a seemingly random nested function call in___input_config_verbs
would cause a crash. Inspecting where this happened seemed to move it around, which I somewhat expected given it was a crash with the callstack being too long.B)
crash()
To further test, I made a very quick and dirty test function in a new project:
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