Open cart opened 5 years ago
Pulling in the mono master @neikeq
Can you copy here the mono log as well?
Sure thing!
Config attempting to parse: '/etc/mono/config'. (in domain Mono, info)
Config attempting to parse: '/home/carter/.mono/config'. (in domain Mono, info)
Image addref mscorlib[0x5e97830] (asmctx DEFAULT) -> /usr/lib/mono/4.5/mscorlib.dll[0x5d16320]: 3 (in domain Mono, info)
Prepared to set up assembly 'mscorlib' (/usr/lib/mono/4.5/mscorlib.dll) (in domain Mono, info)
AOT: module /usr/lib/mono/4.5/mscorlib.dll.so is unusable: compiled with unsupported SIMD extensions. (in domain Mono, info)
Assembly mscorlib[0x5e97830] added to domain GodotEngine.RootDomain, ref_count=1 (in domain Mono, info)
Assembly mscorlib[0x5e97830] added to domain GodotEngine.ToolsDomain, ref_count=2 (in domain Mono, info)
Image addref GodotSharpTools[0x5f1f930] (asmctx DEFAULT) -> /home/carter/code/godot/bin/GodotSharp/Tools/GodotSharpTools.dll[0x5f1def0]: 2 (in domain Mono, info)
Prepared to set up assembly 'GodotSharpTools' (/home/carter/code/godot/bin/GodotSharp/Tools/GodotSharpTools.dll) (in domain Mono, info)
Assembly GodotSharpTools[0x5f1f930] added to domain GodotEngine.ToolsDomain, ref_count=1 (in domain Mono, info)
Assembly mscorlib[0x5e97830] added to domain GodotEngine.ScriptsDomain, ref_count=3 (in domain Mono, info)
Image addref GodotSharp[0x6552a60] (asmctx DEFAULT) -> /home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharp.dll[0x5f4c230]: 3 (in domain Mono, info)
Prepared to set up assembly 'GodotSharp' (/home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharp.dll) (in domain Mono, info)
Assembly GodotSharp[0x6552a60] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Loading reference 0 of /home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharp.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Config attempting to parse: ''. (in domain Mono, info)
Assembly Ref addref GodotSharp[0x6552a60] -> mscorlib[0x5e97830]: 4 (in domain Mono, info)
Loading reference 2 of /home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharp.dll asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Image addref System[0x6570ae0] (asmctx DEFAULT) -> /usr/lib/mono/4.5/System.dll[0x656f9d0]: 2 (in domain Mono, info)
Prepared to set up assembly 'System' (/usr/lib/mono/4.5/System.dll) (in domain Mono, info)
Assembly System[0x6570ae0] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Assembly Ref addref GodotSharp[0x6552a60] -> System[0x6570ae0]: 2 (in domain Mono, info)
Loading reference 0 of /usr/lib/mono/4.5/System.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System[0x6570ae0] -> mscorlib[0x5e97830]: 5 (in domain Mono, info)
Loading reference 2 of /usr/lib/mono/4.5/System.dll asmctx DEFAULT, looking for System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (in domain Mono, info)
Image addref System.Configuration[0x6604000] (asmctx DEFAULT) -> /usr/lib/mono/4.5/System.Configuration.dll[0x66038d0]: 2 (in domain Mono, info)
Prepared to set up assembly 'System.Configuration' (/usr/lib/mono/4.5/System.Configuration.dll) (in domain Mono, info)
Assembly System.Configuration[0x6604000] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Assembly Ref addref System[0x6570ae0] -> System.Configuration[0x6604000]: 2 (in domain Mono, info)
Loading reference 0 of /usr/lib/mono/4.5/System.Configuration.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Configuration[0x6604000] -> mscorlib[0x5e97830]: 6 (in domain Mono, info)
Loading reference 2 of /usr/lib/mono/4.5/System.Configuration.dll asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Configuration[0x6604000] -> System[0x6570ae0]: 3 (in domain Mono, info)
Loading reference 1 of /usr/lib/mono/4.5/System.Configuration.dll asmctx DEFAULT, looking for System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Image addref System.Xml[0x664e320] (asmctx DEFAULT) -> /usr/lib/mono/4.5/System.Xml.dll[0x664d110]: 2 (in domain Mono, info)
Prepared to set up assembly 'System.Xml' (/usr/lib/mono/4.5/System.Xml.dll) (in domain Mono, info)
Assembly System.Xml[0x664e320] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Assembly Ref addref System.Configuration[0x6604000] -> System.Xml[0x664e320]: 2 (in domain Mono, info)
Loading reference 0 of /usr/lib/mono/4.5/System.Xml.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Xml[0x664e320] -> mscorlib[0x5e97830]: 7 (in domain Mono, info)
Loading reference 2 of /usr/lib/mono/4.5/System.Xml.dll asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Xml[0x664e320] -> System[0x6570ae0]: 4 (in domain Mono, info)
Image addref Mono.Security[0x61a6020] (asmctx DEFAULT) -> /usr/lib/mono/4.5/Mono.Security.dll[0x613d4f0]: 2 (in domain Mono, info)
Prepared to set up assembly 'Mono.Security' (/usr/lib/mono/4.5/Mono.Security.dll) (in domain Mono, info)
Assembly Mono.Security[0x61a6020] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Loading reference 0 of /usr/lib/mono/4.5/Mono.Security.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref Mono.Security[0x61a6020] -> mscorlib[0x5e97830]: 8 (in domain Mono, info)
Loading reference 3 of /usr/lib/mono/4.5/System.dll asmctx DEFAULT, looking for System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System[0x6570ae0] -> System.Xml[0x664e320]: 3 (in domain Mono, info)
Image addref GodotSharpEditor[0x6cdaaf0] (asmctx DEFAULT) -> /home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharpEditor.dll[0x623a4d0]: 3 (in domain Mono, info)
Prepared to set up assembly 'GodotSharpEditor' (/home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharpEditor.dll) (in domain Mono, info)
Assembly GodotSharpEditor[0x6cdaaf0] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Loading reference 0 of /home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharpEditor.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref GodotSharpEditor[0x6cdaaf0] -> mscorlib[0x5e97830]: 9 (in domain Mono, info)
Image addref Repro_MonoCrash[0x6cd7e20] (asmctx DEFAULT) -> /home/carter/Repro_MonoCrash/.mono/temp/bin/Tools/Repro_MonoCrash.dll[0x6cd2980]: 3 (in domain Mono, info)
Prepared to set up assembly 'Repro_MonoCrash' (/home/carter/Repro_MonoCrash/.mono/temp/bin/Tools/Repro_MonoCrash.dll) (in domain Mono, info)
Assembly Repro_MonoCrash[0x6cd7e20] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Loading reference 1 of /home/carter/Repro_MonoCrash/.mono/temp/bin/Tools/Repro_MonoCrash.dll asmctx DEFAULT, looking for GodotSharp, Version=1.0.7105.19899, Culture=neutral, PublicKeyToken=null (in domain Mono, info)
Assembly Ref addref Repro_MonoCrash[0x6cd7e20] -> GodotSharp[0x6552a60]: 2 (in domain Mono, info)
Loading reference 0 of /home/carter/Repro_MonoCrash/.mono/temp/bin/Tools/Repro_MonoCrash.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref Repro_MonoCrash[0x6cd7e20] -> mscorlib[0x5e97830]: 10 (in domain Mono, info)
Loading reference 1 of /home/carter/Repro_MonoCrash/.mono/assemblies/GodotSharp.dll asmctx DEFAULT, looking for System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Image addref System.Core[0x7f453e0] (asmctx DEFAULT) -> /usr/lib/mono/4.5/System.Core.dll[0x7f44150]: 2 (in domain Mono, info)
Prepared to set up assembly 'System.Core' (/usr/lib/mono/4.5/System.Core.dll) (in domain Mono, info)
Assembly System.Core[0x7f453e0] added to domain GodotEngine.ScriptsDomain, ref_count=1 (in domain Mono, info)
Assembly Ref addref GodotSharp[0x6552a60] -> System.Core[0x7f453e0]: 2 (in domain Mono, info)
Loading reference 0 of /usr/lib/mono/4.5/System.Core.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Core[0x7f453e0] -> mscorlib[0x5e97830]: 11 (in domain Mono, info)
mono_threads_enter_gc_safe_region_unbalanced Cannot transition thread 0x7fc4a5adbdc0 from STATE_BLOCKING with DO_BLOCKING (in domain , error)
I believe this is a more general problem. I am also hitting this when I run GetInstanceId
from a "body_exited" signal handler.
Maybe the issue is godot_icall_XXXX
functions fail when run in nested event handlers?
ex:
at <unknown> <0xffffffff>
at Godot.NativeCalls:godot_icall_0_27 <0x000c2>
at Godot.Object:GetInstanceId <0x000d3>
at HighHat.Scene.Attacks.Attack:BodyExited <0x000bb>
at HighHat.Scene.Nodes.ExtendedArea:BodyExitedInternal <0x000de>
at <Module>:runtime_invoke_void__this___object <0x000d8>
at <unknown> <0xffffffff>
at Godot.NativeCalls:godot_icall_1_12 <0x000e8>
at Godot.Area:SetMonitoring <0x000cf>
at Godot.Area:set_Monitoring <0x0009b>
at HighHat.Scene.Attacks.Attack:Remove <0x00097>
at HighHat.Scene.Attacks.PunchMove:OnActivateEnd <0x000af>
at HighHat.Actors.Players.MoveBehavior:Recover <0x000c3>
at HighHat.Actors.Players.MoveBehavior:_PhysicsProcess <0x0061f>
at <Module>:runtime_invoke_void__this___single <0x000dc>
Any movement on this? I'm currently in a weird place where I can't publicly release my game on 3.1 due to bugs and I can't publicly release on master (soon to be 3.2) due to bugs.
Of course I assume full responsibility for building on preview software and I am nothing but thankful to everyone involved in building this awesome (free) product. That being said, making High Hat releasable on 3.2 is a high priority for me, so if none of the subject matter experts are looking into this I will need to become a subject matter expert and fix it myself. I would just appreciate knowing whether I should wait or start diving into the weeds.
I think the fix should be that for 3.2 and the next bugfix version of 3.1 to set mono to work without the hybrid suspend mode. If you search the repository they are still fixing issues with that, and also they added it by default only on linux and mac, this may be why I can't reproduce on windows some similar crashes I have. Somehow adding to the environment MONO_THREADS_SUSPEND=preemptive what do you say @neikeq ?
I've been trying to see if I could find the source of the problem for the last two days without luck so as you say, we will have to hard-code it to use preemptive suspend mode as a workaround until we can get this fixed.
We'll be forcing preemptive mode for now (#31784), so these crashes should not happen anymore.
Let's keep this issue open until we can get an actual fix.
That worked! High Hat works with 3.2 now. Big thanks to @neikeq and @santouits for looking in to this.
Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
Moving to the 3.x milestone since we don't use Mono in 4.0.
@neikeq Not sure if we still want to look for a fix or if the temporary fix (https://github.com/godotengine/godot/pull/31784) is good enough and should close the issue.
Godot version: e21f808530b02a393a46d597afe89b4fbf886bb6
OS/device including version: Arch Linux
Issue description: This is a weird one. If you do an icall from within an RPC call from within an _Input, you get a crash. This behavior was not present in official 3.1 builds, but it is present in current master mono builds.
I hit this a number of times in my game High Hat. I was also able to reproduce it in a sample project.
Steps to reproduce:
Minimal reproduction project: Repro_MonoCrash.zip