YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

Sequence Editor: GM crash when reordering tracks shortly after using a hotkey combination that changed focus #6624

Closed ClooverDev closed 4 weeks ago

ClooverDev commented 1 month ago

Description

Hi, I've updated my GameMaker Studio 2 to the latest version (IDE V2024.6.1.160 / Runtime v2024.6.1.208) and I've encountered an odd thing on the software.

It keeps closing without saving (unless I auto-save before it happens), nor does it show any warnings, it simply.. close. I just wanna know why it happens, specially that it is happening frequently as I use the program for about a hour or two.

[16:22:26:257(1628)] DoUndoableAction: 'Add parameter track'
[16:22:26:266(1628)] Error: Preference 'machine.Sequences.Parameter Added Dialog'not pre-set, returning a default: Cannot convert null to 'YoYoStudio.GUI.Gadgets.ConfirmDialog.eStandardAcceptancePreference' because it is a non-nullable value type
[16:22:32:402(1628)] DoUndoableAction: 'Reordered tracks'
[16:22:34:24(1628)] --------------------------------------------------------------------------------
[16:22:34:156(1628)] IDE Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Alice.Modules.Sequence.SequenceEditorModule.Copy()
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.<WalkGadgetStack>g__WalkUpGadgetStack|60_0(<>c__DisplayClass60_0&)
   at YoYoStudio.KeyboardShortcuts.KeyboardShortcutManager.ExecuteShortcut(GUIBase focusTarget, Key key, KeyModifiers modifiers)
   at YoYoStudio.GUI.KeyboardManager.HandleKeyEvent(KeyEventPacket _evnt, GUIBase _gadgetInFocus)
   at YoYoStudio.GUI.KeyboardManager.DispatchEvents(Desktop desktop, GUIBase gadgetInFocus, Boolean dragging, Boolean blocking)
   at YoYoStudio.IDE.Run()
   at YoYoStudio.IDE.Execute(String[] _args, Int32 _initialWidth, Int32 _initialHeight)
[16:22:34:156(1628)] --------------------------------------------------------------------------------
[16:22:34:158(1628)] ####################################
[16:22:34:159(1628)] Break in FatalErrorWarning (IDE:4506)
[16:22:34:159(1628)] ####################################

Steps To Reproduce

No idea what's exactly making it happen, I just use any key shortcut, like the Ctrl + D to duplicate, Ctrl + G to create a new sequence, etc. As I use the software using the shortcuts, it just randomly closes the software without warning and without saving if I didn't save before.

Which version of GameMaker are you reporting this issue for?

IDE v2024.6.1.160 Runtime v2024.6.1.208

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

Windows 10.0.19045.0

d0ac97d5-98ff-4b7b-90a6-3403df2cf8db

ClooverDev commented 1 month ago

Just wanna comment that it happens anywhere on the program, not specifically the sequence editor, it just happened with me a few seconds ago while attempting to create a new object.

SmithTom6304 commented 1 month ago

Hi @ClooverDev, hope you're well.

Have been looking into this, but unfortunately haven't been able to reproduce it yet. 1) Does this only occur after the program has been open for a while (ie, an hour or two)? Or have you seen it happen relatively recently after the IDE has been opened. 2) From the callstack above, I can see the exception is being thrown from SequenceEditorModule.Copy(). Had you used the Copy shortcut before the exception was thrown? Or was it thrown once the tracks had been re-ordered? 3) Your comment about seeing the issue after creating a new object - was this created via hotkey? 4) Do you have any more callstacks from your ui.log I could look at? It might help me narrow it down.

Many thanks

ClooverDev commented 1 month ago

Hi @SmithTom6304, thanks for reaching out

I've been using in the past days and it doesn't seem to be repeating, but as I was looking into the error and I couldn't point out exactly what was causing the crash. Sorry if I can't be in much help, just wanted to know if it's indeed a error on the software or an problem caused by whatever I'm doing.

  1. If I remember correctly, yeah it was happening after the program was open for about 1-4 hours.
  2. Can't exactly point out if the shortcut was happening after or before the exception being thrown, since the only thing I would see was my program closing out of nowhere when a element was being copied.
  3. Yes, the same issue was being replicated in most of my actions when creating a new element, like a object, and all of them were created via hotkey, which is easier for me.
  4. Since it's been 2 weeks, on the ui.log itself doesn't have any callbacks, but I have the .gz file from that date.

Just to mention, the error is happening mainly from a Copy action, like copying either a existing sequence or object was causing the sudden crash to occur, without any messages or anything, I don't know much after that.

I'll list the log gz files if it's from any help. ui-2024-07-16-01-42-49.gz ui-2024-07-22-05-37-31.gz ui-2024-07-12-02-35-21.gz

SmithTom6304 commented 4 weeks ago

Think this may actually have been two separate issues. 1) From the ui logs you sent, I can see the vast majority of the exceptions are being thrown from ResourceMenuHelper.CreateNewResource(Type _type). These will have been occurring from https://github.com/YoYoGames/GameMaker-Bugs/issues/6678, which was fixed a few weeks ago now (and explains why the issue stopped occurring in your previous comment). 2) The other exceptions are all being thrown from SequenceEditorModule.Copy(). I haven't been able to reproduce your issue, but I have added a couple extra checks in there that should hopefully catch any further exceptions.

Emc1923 commented 2 weeks ago

Verified as per comment, thanks.