Open BimDav opened 5 months ago
Since none of this is showing libraries for the engine itself it seems it might be external, some error in the OS or similar, not directly the engine
Maybe, but the error begins with the error in propagate_notification
. I also have edited the first post to precise that the propagate_notification
call that seems to cause the crash is not called from my code.
That's not necessarily relevant directly, as it's not part of the stack trace, what I mean is that it's not certain the crash is due to bad code in the editor, but something broken in the system libraries etc.
I get these ones very often as well. I think it might be the same thing as this other issue https://github.com/godotengine/godot/issues/71010
Godot v4.2.1.stable - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)
USER ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
at: propagate_notification (scene/main/node.cpp:2236)
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.2.1.stable.official (b09f793f564a6c95dc76acc654b390e68441bd01)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] 1 libsystem_platform.dylib 0x000000019110b584 _sigtramp + 56
[2] 2 CoreFoundation 0x0000000191174218 -[__NSDictionaryM setObject:forKey:] + 348
[3] 3 Metal 0x000000019b566d58 -[MTLStructTypeInternal initWithMembers:count:] + 268
[4] deserializeStructArgument(id<MTLDeviceSPI>, AirReflection::NodeId const*, flatbuffers::Vector<AirReflection::NodeId const*::Offset<id<MTLDeviceSPI>::Node>> const*, ReflectionDeserializeContext&, bool*)
[5] deserializeStructArgument(id<MTLDeviceSPI>, AirReflection::NodeId const*, flatbuffers::Vector<AirReflection::NodeId const*::Offset<id<MTLDeviceSPI>::Node>> const*, ReflectionDeserializeContext&, bool*)
[6] deserializeArgument(id<MTLDeviceSPI>, AirReflection::NodeId const*, flatbuffers::Vector<AirReflection::NodeId const*::Offset<id<MTLDeviceSPI>::Node>> const*, ReflectionDeserializeContext&, MTLBindingInternal**)
[7] deserializeArguments(id<MTLDeviceSPI>, flatbuffers::Vector<AirReflection::NodeId const*> const*, flatbuffers<id<MTLDeviceSPI>::Offset<flatbuffers::Vector::Node>> const*, ReflectionDeserializeContext&, MTLBindingInternal**&, bool, unsigned int*)
[8] MTLVertexReflectionDeserializerAIR::deserialize(id<MTLDeviceSPI>, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>)
[9] MTLInputStageReflectionReader::deserialize(id<MTLDeviceSPI>, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>)
[10] 10 Metal 0x000000019b52e4e4 -[MTLFunctionReflectionInternal initWithDevice:reflectionData:functionType:options:] + 252
[11] AGX::Program<AGX::G13::VertexProgramVariant, AGX::VertexProgramKey, AGX::G13::IndirectArgumentLayout, AGXG13XFamilyIndirectArgumentBufferLayout>::signalPending(unsigned long, NSObject<OS_dispatch_data>*, ReflectionKey const&, id<MTLDeviceSPI>, MTLFunctionType, MTLCompilerError)
[12] invocation function for block in AGX::UserCommonShaderFactory<AGX::G13::Encoders, AGX::G13::Classes, AGX::G13::ObjClasses>::createVertexProgramVariant(MTLRenderPipelineDescriptor*, AGXG13XFamilyDevice*, unsigned long, AGXG13XFamilyBinaryArchive*, NSArray*, AGX::G13::VertexProgram*, AGX::G13::FragmentProgramVariant*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, bool, void (AGX::G13::VertexProgramVariant*, ReflectionKey, NSMutableDictionary*, MTLCompilerError, NSString*) block_pointer)
[13] invocation function for block in void AGX::Compiler::compileProgram<AGX::VertexProgramKey, AGCDeserializedReply>(AGX::VertexProgramKey const&, MTLCompileFunctionRequestData*, void (AGCDeserializedReply const&, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, MTLCompilerError, NSString*, unsigned long long) block_pointer)
[14] 14 libdispatch.dylib 0x0000000190f28750 _dispatch_call_block_and_release + 32
[15] 15 libdispatch.dylib 0x0000000190f2a3e8 _dispatch_client_callout + 20
[16] 16 libdispatch.dylib 0x0000000190f2d580 _dispatch_queue_override_invoke + 928
[17] 17 libdispatch.dylib 0x0000000190f3bea8 _dispatch_root_queue_drain + 392
[18] 18 libdispatch.dylib 0x0000000190f3c6b8 _dispatch_worker_thread2 + 156
[19] 19 libsystem_pthread.dylib 0x00000001910d6fd0 _pthread_wqthread + 228
[20] 20 libsystem_pthread.dylib 0x00000001910d5d28 start_wqthread + 8
-- END OF BACKTRACE --
================================================================
For me the following script reliably reproduces this on M1 Mac in Godot 4.3 (though the time before crash varies). Just copy paste this into any Node2D. Anyone can confirm?
extends Node2D
var a = A.new()
func _ready() -> void:
a.start()
class Base extends RefCounted:
var runner
var name = ""
signal finished
func start():
prints(self.name, "started")
run()
prints(self.name, "returned --")
return
func run():
pass
func done():
prints(self.name, "DONE -------------")
finished.emit()
class A extends Base:
func _init():
name = "A"
func run():
runner = B.new()
runner.finished.connect(on_runner_done)
runner.start()
func on_runner_done():
done()
start()
class B extends Base:
func _init():
name = "B"
func run():
runner = C.new()
runner.finished.connect(done)
runner.start()
class C extends Base:
func _init():
name = "C"
func run():
await Engine.get_main_loop().create_timer(0.2).timeout
done()
Anyone can confirm?
I had to wait almost 2 minutes, maybe next week I'll find time to debug it on MacOS.
Tested versions
4.2.2.stable
System information
MacOS Ventura 13.5.2 M2
Issue description
I have had several random crashes in my game, with this stack trace:
Edit: I should have precised that I don't have any call to
propagate_notification
in my code, not do I use threads. It is an engine callSteps to reproduce
This is hard to reproduce, it seems possible to happen at any time.
Minimal reproduction project (MRP)
see above