YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

Project Saving: GM crash when duplicating an asset which had been manually re-added into the .yyp and project is in a OneDrive folder #5845

Open gm-bug-reporter[bot] opened 6 months ago

gm-bug-reporter[bot] commented 6 months ago

Description

When trying to duplicate this half glitched object, it doesnt work in asset browser, but pressing the keybind will crash it, it works with other objects, but not this one?

also the projects here, try and duplicate obj_doorA, if you have a better way to add them back, tell me, idk how but using github one time removed them

Steps To Reproduce

1: use github and somehow remove the object 2: add them back by adding them into resource list file and yyp 3: duplicate

Which version of GameMaker are you reporting this issue for?

IDE v2024.4.0.137 Runtime v2024.4.0.168

Which operating system(s) are you seeing the problem on?

Windows 10.0.19042.0

756cdecb-5d9b-4432-965a-dc10e3920dbb

YYDan commented 6 months ago

Can see the errors - looks like there were multiple attempts to access the file and link it properly, so we get lots of this one:

[21:12:24:619(c15f)] Failed to parse enum of type 'eGridResizeMode' using the value 'ResizeHeight' - exception message: 'Requested value 'ResizeHeight' was not found.'
[21:13:49:15(c15f)] Exception in YoYoStudio.GUI.Gadgets.ContextMenu+<>c__DisplayClass139_0,Void <InitialiseEntry>b__0() :    System.Exception: Failed to link to resource 'sprites/Sprite18/Sprite18.yy : Sprite18' from file 'C:\Users\...\OneDrive\Documents\Github\...\...\objects\obj_doorA\obj_doorA.yy'.
   at YoYoStudio.Resources.ResourceBase.LinkerForGraphExtending.LookupResourceBase(YYFilePathPair referrerPathPair, ResourceSymbolicLink resourceSymbolicLink)
   at YYPSerialiser.ResourceLinkerForNewAndExtending.LookupResourceBase(YYFilePathPair referrerPathPair, ResourceSymbolicLink resourceSymbolicLink)
   at SerialisationCompiledCode.ExtensionsForReader.Resolve(GMSCDeserialiserBase userDeserialisationContext, ResourceSymbolicLink resourceSymbolicLink, Object referrer, Object userParam)
   at SerialisationCompiledCode.Code.<>c__DisplayClass178_3.<ReadExact>b__2(Object userParam)
   at GMSCLibrary.GMSCFileParseResult`1.ApplyOutwardLinkingActions(Object contextObjectToSendToLinkActions)
   at YYPSerialiser.Loader.ResourceBaseLoader.LoadFileAndReferences(PrefabCentralPaths prefabCentralPaths, YYFilePathPair pathToLoad, Func`2 loadFileImage, Int32 workerConcurrency, ParseResourceBaseFileDelegate parseResource, Func`2 loadAfreshDecisionFunc, Func`2 getLinkerAfterLoadCompleted, Boolean isRefreshingResourceFromFileSystemChange)
   at YYPSerialiser.EntryPoints.InternalLoadAdditionalResource(GMProject hostProject, String resourceRelPath, Byte[] resourceJsonFileImage, PrefabCentralPaths prefabCentralPaths, Boolean isRefreshingResourceFromFileSystemChange)
   at YYPSerialiser.EntryPoints.LoadAdditionalResource(GMProject hostProject, String newResourceRelPath, Byte[] newResourceJsonFileImage, PrefabCentralPaths prefabCentralPaths)
   at YoYoStudio.Resources.ResourceBase.Duplicate(Boolean _deferPostDuplicate, GMProject _project)
   at YoYoStudio.Plugins.AssetBrowser.AssetTreeContextMenu.MenuDuplicate()
   at WeakDelegate(Object , Object[] )
   at YoYoStudio.Core.Utils.WeakDelegate`1.Invoke(Object[] _args)

And then the final crash is:

[21:14:22:194(c15f)] --------------------------------------------------------------------------------
[21:14:22:197(c15f)] IDE Exception: System.Exception: Failed to link to resource 'sprites/Sprite18/Sprite18.yy : Sprite18' from file 'C:\Users\...\OneDrive\Documents\Github\...\...\objects\obj_doorA\obj_doorA.yy'.
   at YoYoStudio.Resources.ResourceBase.LinkerForGraphExtending.LookupResourceBase(YYFilePathPair referrerPathPair, ResourceSymbolicLink resourceSymbolicLink)
   at YYPSerialiser.ResourceLinkerForNewAndExtending.LookupResourceBase(YYFilePathPair referrerPathPair, ResourceSymbolicLink resourceSymbolicLink)
   at SerialisationCompiledCode.ExtensionsForReader.Resolve(GMSCDeserialiserBase userDeserialisationContext, ResourceSymbolicLink resourceSymbolicLink, Object referrer, Object userParam)
   at SerialisationCompiledCode.Code.<>c__DisplayClass178_3.<ReadExact>b__2(Object userParam)
   at GMSCLibrary.GMSCFileParseResult`1.ApplyOutwardLinkingActions(Object contextObjectToSendToLinkActions)
   at YYPSerialiser.Loader.ResourceBaseLoader.LoadFileAndReferences(PrefabCentralPaths prefabCentralPaths, YYFilePathPair pathToLoad, Func`2 loadFileImage, Int32 workerConcurrency, ParseResourceBaseFileDelegate parseResource, Func`2 loadAfreshDecisionFunc, Func`2 getLinkerAfterLoadCompleted, Boolean isRefreshingResourceFromFileSystemChange)
   at YYPSerialiser.EntryPoints.InternalLoadAdditionalResource(GMProject hostProject, String resourceRelPath, Byte[] resourceJsonFileImage, PrefabCentralPaths prefabCentralPaths, Boolean isRefreshingResourceFromFileSystemChange)
   at YYPSerialiser.EntryPoints.LoadAdditionalResource(GMProject hostProject, String newResourceRelPath, Byte[] newResourceJsonFileImage, PrefabCentralPaths prefabCentralPaths)
   at YoYoStudio.Resources.ResourceBase.Duplicate(Boolean _deferPostDuplicate, GMProject _project)
   at YoYoStudio.Plugins.AssetBrowser.AssetTreeContextMenu.MenuDuplicate()
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.<>c__DisplayClass55_0.<ExecuteShortcut>b__1(IShortcutContext context)
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.<WalkGadgetStack>g__WalkUpGadgetStack|57_0(<>c__DisplayClass57_0& )
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.WalkGadgetStack(GUIBase gadgetInFocus, ExecuteDelegate executeAction)
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.ExecuteShortcut(GUIBase focusTarget, Key key, KeyModifiers modifiers)
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.DispatchEvents(Desktop desktop, GUIBase focusTarget)
   at YoYoStudio.IDE.Run()
   at YoYoStudio.IDE.Execute(String[] _args, Int32 _initialWidth, Int32 _initialHeight)
[21:14:22:198(c15f)] --------------------------------------------------------------------------------
YYDan commented 6 months ago

We'll look into the crash and the project properly, obviously, but just to quickly say you really need to not use OneDrive for storing your projects in - and I suspect that moving the project now will avoid creating this error situation again in future.

(2024.4 has just added in lots of messaging about not using OneDrive and similar services, plus also changes the defaults for where new projects will live.)

YYDan commented 6 months ago

Actually, if that's GitHub Desktop you were modifying the file using, then you might potentially have had three different applications all simultaneously accessing/locking/reading your files ;)