Skip to content

In-Game: [Reddit] Game crashes on startup when adding JavaScript extensions containing functions #13951

@shockjuicegames

Description

@shockjuicegames

What Is The Bug?

Adding any JavaScript extension function to a GameMaker project causes the game to crash on startup only when using the Reddit export. The crash happens even with a no-op JS function and no runtime usage.

The same project runs correctly when the JS extension exists without any functions

Expected Change

Javascript functions work correctly for Reddit export

Steps To Reproduce

  1. Create a new GameMaker project

  2. Add a JavaScript extension

  3. Add a .js file to the extension with no functions mapped

  4. Run the game in Reddit via Reddit export -> it will work

  5. Now map a function to your .js file in gamemaker

  6. Add a function mapping to the extension:
    a. Name: gm_navigate_to
    b. External Name: gm_navigate_to
    c. Return type: real
    d. Arguments: 1 string
    e. JS file contents (minimal no-op):
    function gm_navigate_to(url) {
    return 1;
    }

  7. Ensure the extension, file, and function are copied to Reddit export

  8. Do not call the function anywhere in GML

  9. Export / run using Reddit export -> game will fail to init

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

Always

Which version(s) of GameMaker are you reporting this issue for?

2024.14.3 Monthly

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

Reddit

Sample Package

https://api.gamemaker.io/api/github/downloads/416878d1-5391-4204-b08e-8e22b13cb08c

Metadata

Metadata

Labels

GMRT_CHECK_REQUIREDFix exists in runner but needs checking for GMRT portgms2-bugIn-game bugs with the "GameMaker Studio 2" runtimes
No fields configured for In-Game Bug.

Projects

Status
Verified

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions