+1
Fixed

Unity crash randomly after hit play

Pawel Lewandowski 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 2

Some of our team members notice that they got unity crashes when just click PLAY MODE. I just take a crash log from one of our team member and notice that occur becouse of BOLT :

Read from location FFFFFFFFFFFFFFFF caused an access violation.

Context:
RDI: 0x0000000000000000 RSI: 0x000001bfc02e6f98 RAX: 0x0000000000000000
RBX: 0x00000000c01dfee7 RCX: 0x000001bf92ef2920 RDX: 0x8b48c04d8b48f98b
RIP: 0x00007ffd2d5f16c6 RBP: 0x0000000000000000 SegCs: 0x8b48c04d00000033
EFlags: 0x0000000000010206 RSP: 0x00000017527ccea0 SegSs: 0x8b48c04d0000002b
R8: 0x000001c04c4822e0 R9: 0x0000000000000000 R10: 0x000001bfb3bc47b0
R11: 0x0000000000000000 R12: 0x00007ffd2d560000 R13: 0x000001bf92ef2920
R14: 0x0000000000000000 R15: 0x000001bf92ef2928


Bytes at CS:EIP:
0f be 42 0a 44 0f b6 42 0b 8b d8 41 83 e0 40 83

Mono DLL loaded successfully at 'S:\Program Files\Unity 3D\2019.1.8f1\Editor\Data\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll'.


Stack Trace of Crashed Thread 14312:
0x00007FFD2D5F16C6 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\metadata\metadata.c:1570] mono_metadata_generic_inst_hash
0x00007FFD2D5EEA27 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\metadata\metadata.c:1620] mono_generic_class_hash
0x00007FFD2D5F5F77 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\metadata\metadata.c:5541] mono_signature_hash
0x00007FFD2D561B95 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\eglib\ghashtable.c:206] do_rehash
0x00007FFD2D56242D (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\eglib\ghashtable.c:243] monoeg_g_hash_table_insert_replace
0x00007FFD2D5E3729 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\metadata\marshal.c:3840] mono_marshal_get_delegate_invoke_internal
0x00007FFD2D766FB6 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\mini\mini-trampolines.c:1262] mono_delegate_trampoline
0x000001BFDC181073 (Mono JIT Code) .()
0x000001BF9D22FCCF (Ludiq.Core.Runtime) Ludiq.StaticFunctionInvoker`2.InvokeUnsafe()
0x000001BF9D22F57B (Ludiq.Core.Runtime) Ludiq.StaticFunctionInvoker`2.Invoke()
0x000001BF9311C5F1 (Ludiq.Core.Runtime) Ludiq.OptimizedReflection.InvokeOptimized()
0x000001BF9D22ED3B (Ludiq.Core.Runtime) Ludiq.ConversionUtility.UserDefinedConversion()
0x000001BF979DB403 (Ludiq.Core.Runtime) Ludiq.ConversionUtility.Convert()
0x000001BF979DAF7B (Ludiq.Core.Runtime) Ludiq.ConversionUtility.Convert()
0x000001BF9803834B (Bolt.Flow.Runtime) Bolt.Flow.GetValue()
0x000001BF98178CEB (Bolt.Flow.Runtime) Bolt.Flow.GetConvertedValue()
0x000001BF9B1E5ABB (Bolt.Flow.Runtime) Bolt.SetMember.Assign()
0x000001BF98037B7B (Bolt.Flow.Runtime) Bolt.Flow.InvokeDelegate()
0x000001BF9803425B (Bolt.Flow.Runtime) Bolt.Flow.Invoke()
0x000001BF980342DB (Bolt.Flow.Runtime) Bolt.Flow.Invoke()
0x000001BF980342DB (Bolt.Flow.Runtime) Bolt.Flow.Invoke()
0x000001BF980342DB (Bolt.Flow.Runtime) Bolt.Flow.Invoke()
0x000001BF98033EBB (Bolt.Flow.Runtime) Bolt.Flow.Run()
0x000001BF9803374B (Bolt.Flow.Runtime) Bolt.EventUnit`1.Run()
0x000001BF98033213 (Bolt.Flow.Runtime) Bolt.EventUnit`1.Trigger()
0x000001BF9B1E23E3 (Bolt.Flow.Runtime) <>c__DisplayClass14_0.b__0()
0x000001BF981752AF (Bolt.Core.Runtime) Bolt.EventBus.Trigger()
0x000001BF98180D33 (Bolt.Core.Runtime) Bolt.EventMachine`2.TriggerRegisteredEvent()
0x000001BF98174972 (Bolt.Core.Runtime) Bolt.EventMachine`2.TriggerEvent()
0x000001BF9D236DDB (Bolt.Core.Runtime) Bolt.EventMachine`2.Update()
0x000001BF9817F168 (mscorlib) System.Object.runtime_invoke_void__this__()
0x00007FFD2D68BBCB (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFD2D612252 (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\metadata\object.c:2919] do_runtime_invoke
0x00007FFD2D61B25F (mono-2.0-bdwgc) [c:\users\builduser\builds\_cjcc5tm\0\vm\mono\mono\metadata\object.c:2966] mono_runtime_invoke
0x00007FF668900256 (Unity) scripting_method_invoke
0x00007FF6688FA545 (Unity) ScriptingInvocation::Invoke
0x00007FF6688B6C32 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007FF6688B6FD6 (Unity) MonoBehaviour::CallUpdateMethod
0x00007FF667FDC6F4 (Unity) BaseBehaviourManager::CommonUpdate
0x00007FF667FE4CF4 (Unity) BehaviourManager::Update
0x00007FF668415DB3 (Unity) `InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
0x00007FF6683FF2C8 (Unity) ExecutePlayerLoop
0x00007FF6683FF3A6 (Unity) ExecutePlayerLoop
0x00007FF668403F60 (Unity) PlayerLoop
0x00007FF667120AA0 (Unity) PlayerLoopController::UpdateScene
0x00007FF66710B29B (Unity) PlayerLoopController::EnterPlayMode
0x00007FF66711B200 (Unity) PlayerLoopController::SetIsPlaying
0x00007FF66711DF38 (Unity) Application::TickTimer
0x00007FF6673DC1EB (Unity) MainMessageLoop
0x00007FF6673E5BF7 (Unity) WinMain
0x00007FF669D28B5E (Unity) __scrt_common_main_seh
0x00007FFD9ED57974 (KERNEL32) BaseThreadInitThunk
0x00007FFDA1BAA271 (ntdll) RtlUserThreadStart

Any thoughts ??

Bolt Version:
1.4.4
Unity Version:
2019.1.8f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED
Satisfaction mark by Pawel Lewandowski 2 years ago
Working on Fix

Hi Pawel,

Thank you for the bug report and sorry you're experiencing this issue. I have noticed a similar issues in recent Unity versions with our JIT reflection optimization engine, but it's very hard to isolate. I will temporarily disable it in the next hotfix version until I can safely address the issue (the delegate optimization engine will still kick in, so performance will be almost identical).