Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Error when running in HTML5

A topic by DokZau created Apr 28, 2024 Views: 282 Replies: 7
Viewing posts 1 to 6

Hi!!
The game I'm working on runs and creates the windows executable without problems, but doing it for HTML5 gives me problems

The error I see from the debugger is:


"Unhandled Exception - Uncaught { message : "Error calling extension initialisation function: gml_Script_native_cursor_preinit exception: ReferenceError: native_cursor_preinit_raw is not defined", longMessage : "Error calling extension initialisation function: gml_Script_native_cursor_preinit exception: ReferenceError: native_cursor_preinit_raw is not defined", stacktrace : [ "function _W2("Error calling extension initialisation function: gml_Script_native_cursor_preinit exception: ReferenceError: native_cursor_preinit_raw is not defined")

","function _vC2([unknown])

","function _Ao3(5870.92)

" ], script : "", line : -1 } in file http://127.0.0.1:51264/html5game/Alchemy%20and%20Pomodoro.js?cachebust=213720157... at line 54375"

This repeats itself numerous times per second until the explorer's memory collapses.

I use Opera GX for testing

GML version v2023.11.1.129

Developer

If you need HTML5 support, you can use the first version of this extension (window_set_cursor (for GMS2.3).yymps) - V2 doesn’t have a JS version yet.

Hello, I hope you can personify my disability with these things, but now I am getting this error when starting a play test:

Error : Extension window_set_cursor file does not exist

I deleted the previous extension and then installed the version that you recommended, in the extensions folder of the project the extension appears and in the engine as well

Un saludo!!

Developer

Alright, I uploaded a demo project (window_set_cursor_demo (for GM2024).zip). Seems to work fine on my end on both Windows and HTML5..?

hello

I have tried starting the game in window_set_cursor_demo (for GM2024).zip, but it doesn't seem to work well

In the downloaded project, when starting in Windows, an error code appears:

"(2,16): GMSC Error: Unexpected JSON property '$GMProject'.

Core Resources : Info - Project version is newer than supported version in CoreResources, marking as read-only as we can't safely support this: 2.0 > 1.7

Core Resources : Info - GMAudioGroup Resource version is newer than supported version in CoreResources: 2.0 > 1.3

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFolder Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMTextureGroup Resource version is newer than supported version in CoreResources: 2.0 > 1.3

Core Resources : Info - GMSprite Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSpriteFrame Resource version is newer than supported version in CoreResources: 2.0 > 1.1

Core Resources : Info - GMImageLayer Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSequence Resource version is newer than supported version in CoreResources: 2.0 > 1.4

Core Resources : Info - KeyframeStore<MessageEventKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - KeyframeStore<MomentsEventKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSpriteFramesTrack Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - KeyframeStore<SpriteFrameKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - Keyframe<SpriteFrameKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - SpriteFrameKeyframe Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSprite Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSpriteFrame Resource version is newer than supported version in CoreResources: 2.0 > 1.1

Core Resources : Info - GMImageLayer Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSequence Resource version is newer than supported version in CoreResources: 2.0 > 1.4

Core Resources : Info - KeyframeStore<MessageEventKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - KeyframeStore<MomentsEventKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSpriteFramesTrack Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - KeyframeStore<SpriteFrameKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - Keyframe<SpriteFrameKeyframe> Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - SpriteFrameKeyframe Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMFont Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMObject Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMEvent Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMEvent Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMRoom Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMRInstanceLayer Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMRInstance Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMRBackgroundLayer Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtension Resource version is newer than supported version in CoreResources: 2.0 > 1.2

Core Resources : Info - GMExtensionFile Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMProxyFile Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFile Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFile Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFile Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFile Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMExtensionFunction Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMAmazonFireOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMAndroidOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMHtml5Options Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMiOSOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.3

Core Resources : Info - GMLinuxOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMMacOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMMainOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.4

Core Resources : Info - GMPS4Options Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMPS5Options Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMSwitchOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.0

Core Resources : Info - GMtvOSOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.3

Core Resources : Info - GMWindowsOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.1

Core Resources : Info - GMXboxSeriesXSOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.1

Core Resources : Info - GMOperaGXOptions Resource version is newer than supported version in CoreResources: 2.0 > 1.1

+++ ORIGINAL SERIALISATION SUCCESSFUL LOAD AND LINK TIME: 616.7452ms

Loaded Project: window_set_cursor_23

finished.

Found Project Format 2

+++ FAST SERIALISATION SUCCESSFUL LOAD AND LINK TIME  (with worker concurrency 8): 61.8293ms

Loaded Project: __yy_sdf_shader

finished.

Found Project Format 2

+++ FAST SERIALISATION SUCCESSFUL LOAD AND LINK TIME  (with worker concurrency 8): 51.8497ms

Loaded Project: __yy_sdf_effect_shader

finished.

Found Project Format 2

+++ FAST SERIALISATION SUCCESSFUL LOAD AND LINK TIME  (with worker concurrency 8): 38.7525ms

Loaded Project: __yy_sdf_blur_shader

finished.

Found Project Format 2

+++ FAST SERIALISATION SUCCESSFUL LOAD AND LINK TIME  (with worker concurrency 8): 45.3282ms

Loaded Project: GMPresetParticles

finished.

Release build

Options: C:\Users\Adloa\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\window_set_FA2BF182_9A16B9E0\ExtensionOptions.json

OptionsIni

Options: C:\Users\Adloa\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\window_set_FA2BF182_9A16B9E0\PlatformOptions.json

[Compile] Run asset compiler

C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2023.11.1.160/bin/assetcompiler/windows/x64/GMAssetCompiler.dll  /c /mv=1 /zpex /iv=0 /rv=0 /bv=0 /j=8  /gn="window_set_cursor_23" /td="C:\Users\Adloa\AppData\Local\GameMakerStudio2\GMS2TEMP" /cd="C:\Users\Adloa\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\window_set_FA2BF182_9A16B9E0" /rtp="C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2023.11.1.160" /zpuf="C:\Users\Adloa\AppData\Roaming/GameMakerStudio2\adloaizapi_3944973"  /ffe="d3t+fjZrf25zeTdwgjZ5em98a3GCN4ODbTZzeH5vdnZzfW94fW82eH92dnN9cjZ2eXFzeGl9fXk2fm99fjZtf31+eXdpb3iANnBzdn41cII2cYJpd3luaYFrdnZ6a3pvfDZxgml3eW5pcWt3b31+fHN6NnZzgG9pgWt2dnprem98aX1/bH1tfHN6fnN5eA==" /m=windows /tgt=64 /nodnd /cfg="Default" /o="C:\Users\Adloa\AppData\Local\GameMakerStudio2\GMS2TEMP\window_set_cursor_23_626A3B83_VM" /sh=True /optionsini="C:\Users\Adloa\AppData\Local\GameMakerStudio2\GMS2TEMP\window_set_cursor_23_626A3B83_VM\options.ini"  /cvm /baseproject="C:\ProgramData/GameMakerStudio2/Cache/runtimes\ru

ntime-2023.11.1.160\BaseProject\BaseProject.yyp" "C:\Users\Adloa\Downloads\gamemaker-native-cursors-demo-gm2024\window_set_cursor_23.yyp" /debug /bt=run /rt=vm /64bitgame=true

Looking for built-in fallback image in C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2023.11.1.160\bin\BuiltinImages

Compile Constants...finished.

Remove DnD...finished.

Compile Scripts...finished.

Compile Rooms...finished..... 0 CC empty

Compile Objects...finished.... 0 empty events

Compile Timelines...finished.

Compile Triggers...finished.

Compile Extensions...finished.

Global scripts...finished.

finished.

collapsing enums.

Final Compile...finished.

Saving IFF file... C:\Users\Adloa\AppData\Local\GameMakerStudio2\GMS2TEMP\window_set_cursor_23_626A3B83_VM\window_set_cursor_23.win

Writing Chunk... GEN8 size ... -0.00 MB

option_game_speed=60

Writing Chunk... OPTN size ... 0.00 MB

Writing Chunk... LANG size ... 0.00 MB

Writing Chunk... EXTN size ... 0.00 MB

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'path1')

   at System.IO.Path.Combine(String path1, String path2)

   at GMAssetCompiler.WADSaver`1.WriteExtensions(IList`1 _data, Stream _s, IFF _iff)

   at GMAssetCompiler.IFFChunkHandler`1.Save(Stream _stream, IFF _iff)

   at GMAssetCompiler.IFF.WriteChunks(Stream _stream, TextWriter _out)

   at GMAssetCompiler.WADSaver`1.Save(GMAssets _assets, Stream _stream, List`1 _extraFilenames, Dictionary`2 _extraAttributes)

   at GMAssetCompiler.IFFSaver.Save(GMAssets _assets, String _name)

   at GMAssetCompiler.Program.CompileProject(GMAssets _file)

   at GMAssetCompiler.Program.Reentry(String[] _args)

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)

   at Igor.Program.ExecuteAssetCompiler(String _args)

   at Igor.WindowsBuilder.Compile(Boolean _exe)

   at Igor.WindowsBuilder.Deploy(Boolean _exe)

   at Igor.WindowsBuilder.Run()

Igor complete.

elapsed time 00:00:01.9710949s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2023.11.1.160/bin/igor/windows/x64/Igor.exe" -j=8  -options="C:\Users\Adloa\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Windows Run started at 05/01/2024 14:18:47

FAILED: Run Program Complete

For the details of why this build failed, please review the whole log above and also see your Compile Errors window."

and when starting in HTML5 it seems to start but nothing appears other than a blank screen in the explorer

On the other hand, I have imported the extension to my project and it seems to go a little further. In my project, when starting in windows, I get the same error as with the downloaded project, but when starting in HTML5, the game loads fine and you even see the cursor moving, although clicking and changing the cursor sprite causes it to freeze the game

Thanks for the assistance

Un saludo!!

Developer

The example is for GM2024, hence the name.

I would suggest to test there as GM2023.11 had a tendency to corrupt extensions

hello

in that case, the downloaded demo project works perfectly on windows and html5

But the error persists in my project, it is possible that I have not exported/imported the extension correctly

Un saludo!!

Developer

If you are working with 2023.11 IDE, chances are that it has removed the file names from the extension upon import, as per linked bug report. You can check this by double-clicking the extension in the resource tree.

You could fix this manually by comparing the file contents to the ones in the demo project and assigning the correct name to each file in the extension.

Or, if you have moved to GM2024 IDE, you can remove the extension and use Add Existing (or Tools ➜ Create Local Package) to copy the extension from the demo project to yours.