Ardot66 / DialogueTrees

A graph-based dialogue system
MIT License
7 stars 2 forks source link

Editor (4.3 beta) crashes with access violation when trying to load previously created tree in scene #6

Open lewiji opened 3 weeks ago

lewiji commented 3 weeks ago

Platform: Windows 11

Created a DialogueTree node in the editor in a scene. Added code to start the dialogue and display text. Went back to the editor after some time and switched back into the scene with the DialogueTree. The editor crashes to desktop (reliably crashes whenever I select the DialogueTree node in the scene when the project is open in the editor).

Godot Engine v4.3.beta1.mono.official.a4f2ea91a - https://godotengine.org
OpenGL API 3.3.0 - Build 31.0.101.4575 - Compatibility - Using Device: Intel - Intel(R) Iris(R) Xe Graphics

Editing project: D:/dev/dev/drpg
Godot Engine v4.3.beta1.mono.official.a4f2ea91a - https://godotengine.org
Vulkan 1.3.242 - Forward+ - Using Device #1: NVIDIA - NVIDIA T550 Laptop GPU

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Godot.NativeInterop.NativeFuncs.godotsharp_method_bind_ptrcall(IntPtr, IntPtr, Void**, Void*)
   at Godot.NativeCalls.godot_icall_3_764(IntPtr, IntPtr, IntPtr, Godot.NativeInterop.godot_bool, Int32)
   at Godot.Node.AddChild(Godot.Node, Boolean, InternalMode)
   at Ardot.DialogueTrees.DialogueGraph.<LoadTree>g__AddDialogueNode|26_0(Godot.Node, Int32, <>c__DisplayClass26_0 ByRef)
   at Ardot.DialogueTrees.DialogueGraph.LoadTree(Ardot.DialogueTrees.DialogueTreeData, Boolean, Godot.Collections.Array`1<Godot.Node>)
   at Ardot.DialogueTrees.DialogueTreeDock.LoadTree(Ardot.DialogueTrees.DialogueTree)
   at Ardot.DialogueTrees.DialogueTreesPlugin._Edit(Godot.GodotObject)
   at Godot.EditorPlugin.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name ByRef, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant ByRef)
   at Ardot.DialogueTrees.DialogueTreesPlugin.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name ByRef, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant ByRef)
   at Godot.Bridge.CSharpInstanceBridge.Call(IntPtr, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, Int32, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.go)
lewiji commented 3 weeks ago

Having run the plugin through the debugger while this happens - I have no idea why, it seems innocuous enough. It throws during the AddChild method when constructing the graph editor dock. But it doesn't seem to be doing anything strange or threaded. It could just be down to 4.3 being beta, and unrelated to the plugin code specifically, I will try again on master later and then try an older version to compare.