View Issue Details

IDProjectCategoryView StatusLast Update
0028463RunnerExtensionsPublic2018-10-26 11:33
ReporterParodyKnaveBobAssigned ToAntanas Budvytis 
PriorityHighSeverityA - Crash/HangReproducibility100%
Status ClosedResolutionFixed 
PlatformHTML5OSWindows 10OS VersionHome 64-bit
Product VersionPre-2.1.3 
Target Version2.2.1Fixed in Version2.2.1 
Summary0028463: Extensions: HTML5: gmcallback_* scripts are broken

GameGeisha/FrostyCat pointed out on the GMC ( ) that gmcallback_* has broken, now requiring JS extension code to contain an extra gml_Script_* prefix plus supply extra arguments (which don't seem feasible to send from GML proper, thus losing thier information to the cyberether), thereby losing the ability to automatically keep instance scope.

See attached demo project.
Steps To ReproduceIn my demo project, "Search in scripts..." to get every...


...that I noted for you. You can try un/commenting those lines to see the problems when running in debug mode. Also, note in the JS file itself that every...


...line instead reads...

gml_Script_gmcallback_*(null, null, arg);

Well, while writing this up, I couldn't leave well enough alone. I went ahead and coded...

function jsHack(_idSelf, _idOther, _strHack) {
    return gml_Script_gmcallback_hack(null, null, _idSelf, _idOther, _strHack);
} opposed of course to what should instead look more like...

function jsRelay(_strRelay) {
    return gmcallback_relay(_strRelay);
} indeed see it work as expected, but I'm sure you understand this not being a desirable workaround.
Additional InformationMuch to my surprise -- private report maybe? -- I found no relevant Javascript / gml_Script_gmcallback_* bug report on Mantis, hence taking the liberty to file this myself.
TagsExtension, Extensions, html5, Runner
1.4 Found In1.4.1773
2.x Runtime Found In
2.x Runtime Verified In2.2.1.268



2017-12-02 10:31


js-extension.gmz (338,802 bytes)

Mike Dailly

2018-04-03 09:41

Developer   ~0058538


Antanas Budvytis

2018-07-31 17:37

Developer   ~0060989

Fixed gmcallback_ functions not working. Regarding the current instance reference being lost, this is expected behaviour when calling GML callbacks from JS.