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
-
Create a new GameMaker project
-
Add a JavaScript extension
-
Add a .js file to the extension with no functions mapped
-
Run the game in Reddit via Reddit export -> it will work
-
Now map a function to your .js file in gamemaker
-
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;
}
-
Ensure the extension, file, and function are copied to Reddit export
-
Do not call the function anywhere in GML
-
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
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
Create a new GameMaker project
Add a JavaScript extension
Add a .js file to the extension with no functions mapped
Run the game in Reddit via Reddit export -> it will work
Now map a function to your .js file in gamemaker
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;
}
Ensure the extension, file, and function are copied to Reddit export
Do not call the function anywhere in GML
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