Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Crashing loading new scene

Discussion in '2017.3 Beta' started by snacktime, Dec 17, 2017.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So I get very constistent crashes loading in the first scene that has network activity going on at the same time. Not sure if that's related but it's suspect. This is with .NET 4.6 enabled.

    So the crashes are specifically right after it's done unloading all serialized files, immediately after it prints the time taken in the editor log. At that point there are often incoming messages being delivered to components marked as don't destroy on load. But I'm wondering if firing delegates between scene loads could trigger this. Scene loading is all synchronous and not additive.

    It's not a thread safety issue, this is code that has been stable for several years on the networking side, it uses concurrent queues to shuffle messages between unity and the async network clients.

    Networking might not even be related, it's just the only thing I can think of on my end given where the crash happens. It's sporadic but frequent. Probably 1/5 times I run the game it crashes going into that scene. My second guess is it's something not cleaned up correctly when the new scene starts to load. FYI the same scene that crashes in the normal flow, works fine when I play it directly in the editor.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please submit a bug report with a (minimal) reproduction project?
     
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So it's not the networking, monitoring a dozen crashes the editor log is showing the same output for why it failed. It always fails with the same stack trace and right after the messages saying fallback handler could not load the dll. Reliably reproducing it is a large task on my end, it's a large scene and a big project. But I would think this info is enough to have an idea of what the problem is?



    Packing sprites:
    [ 186 MB ]- Skipping packing - Sprite Packer (Legacy) is off.
    [ 186 MB ]Reloading assemblies for play mode.
    Begin MonoManager ReloadAssembly
    Refreshing native plugins compatible for Editor in 6.23 ms, found 6 plugins.
    Preloading 2 native plugins for Editor in 0.11 ms.
    Fallback handler could not load library E:/Program Files/Unity2017.3.rc2/Editor/Data/Mono/lib/data-00000000419ACB00.dll
    Mono: successfully reloaded assembly
    - Completed reload, in 3.693 seconds
    Initializing Unity.PackageManager (PackageManager) v2017.3.0 for Unity v2017.3.0f2
    Registering platform support modules:
    Registered platform support modules in: 0.1152941s.
    Native extension for WindowsStandalone target not found
    Load scene 'Temp/__Backupscenes/0.backup' time: 1.579923 ms
    Fallback handler could not load library E:/Program Files/Unity2017.3.rc2/Editor/Data/Mono/lib/data-000000006120E200.dll
    Fallback handler could not load library E:/Program Files/Unity2017.3.rc2/Editor/Data/Mono/lib/data-000000003FC4A090.dll
    Fallback handler could not load library E:/Program Files/Unity2017.3.rc2/Editor/Data/Mono/lib/data-0000000002859040.dll
    Crash!!!

    ========== OUTPUTING STACK TRACE ==================

    0x00007FFA7623C6BA (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\class.c:4887] mono_class_init
    0x00007FFA76235BC2 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\class.c:2945] collect_implemented_interfaces_aux
    0x00007FFA7624158F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\class.c:4095] mono_class_setup_vtable_general
    0x00007FFA762414AE (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\class.c:3630] mono_class_setup_vtable_full
    0x00007FFA7623B7BB (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\class.c:2540] mono_class_get_vtable_entry
    0x00007FFA760E2779 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-trampolines.c:903] mono_vcall_trampoline
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 0000000023CA1838)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 0000000023CA1838)
    0x0000000023CA1838 ((<unknown>)) (function-name not available)
    0x00000000505B2F5C (Mono JIT Code) System.Collections.Generic.Stack`1<T_REF>:push (T_REF)
    0x000000004A7680C0 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Utility\ObjectPool.cs:46] UnityEngine.UI.ObjectPool`1<T_REF>:Release (T_REF)
    0x00000000506CC972 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Utility\ListPool.cs:20] UnityEngine.UI.ListPool`1<UnityEngine.Vector2>:Release (System.Collections.Generic.List`1<UnityEngine.Vector2>)
    0x00000000506CC219 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Utility\VertexHelper.cs:107] UnityEngine.UI.VertexHelper:Dispose ()
    0x00000000506CBF8C (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\InputField.cs:1942] UnityEngine.UI.InputField:OnFillVBO (UnityEngine.Mesh)
    0x00000000506C8654 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\InputField.cs:1914] UnityEngine.UI.InputField:UpdateGeometry ()
    0x000000005069B034 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\InputField.cs:1872] UnityEngine.UI.InputField:Rebuild (UnityEngine.UI.CanvasUpdate)
    0x0000000002AEAF09 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\CanvasUpdateRegistry.cs:151] UnityEngine.UI.CanvasUpdateRegistry:performUpdate ()
    0x0000000002AEA31D (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\modules\UI\UICanvasBindings.gen.cs:240] UnityEngine.Canvas:SendWillRenderCanvases ()
    0x0000000002AEA219 (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\modules\UI\UICanvasBindings.gen.cs:241] UnityEngine.Canvas:ForceUpdateCanvases ()
    0x0000000002AEA146 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\ScrollRect.cs:259] UnityEngine.UI.ScrollRect:EnsureLayoutHasRebuilt ()
    0x0000000002AE8358 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\ScrollRect.cs:382] UnityEngine.UI.ScrollRect:LateUpdate ()
    0x000000004FFB2C44 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FFA7604437A (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2620] mono_jit_runtime_invoke
    0x00007FFA76248E87 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2853] do_runtime_invoke
    0x00007FFA7625188F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2905] mono_runtime_invoke
    0x0000000140A30AAC (Unity) scripting_method_invoke
    0x0000000140A2443A (Unity) ScriptingInvocation::Invoke
    0x00000001409E6721 (Unity) MonoBehaviour::CallMethodIfAvailable
    0x00000001409F08CF (Unity) MonoBehaviour::CallUpdateMethod
    0x00000001405055F6 (Unity) BaseBehaviourManager::CommonUpdate<LateBehaviourManager>
    0x00000001405056C8 (Unity) LateBehaviourManager::Update
    0x000000014071FFE3 (Unity) `InitPlayerLoopCallbacks'::`41'::preLateUpdateScriptRunBehaviourLateUpdateRegistrator::Forward
    0x000000014071D19E (Unity) PlayerLoop
    0x00000001411DF9E5 (Unity) PlayerLoopController::UpdateScene
    0x00000001411E9D9A (Unity) PlayerLoopController::EnterPlayMode
    0x00000001411EA616 (Unity) PlayerLoopController::SetIsPlaying
    0x00000001411EB466 (Unity) Application::TickTimer
    0x000000014141127F (Unity) MainMessageLoop
    0x0000000141412B25 (Unity) WinMain
    0x0000000141E633E8 (Unity) __tmainCRTStartup
    0x00007FFABF7C1FE4 (KERNEL32) BaseThreadInitThunk
    0x00007FFABF8FEF91 (ntdll) RtlUserThreadStart

    ========== END OF STACKTRACE ===========
     
  4. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    a few more runs and I got a couple of stack traces where it failed in different places but for the same reason.

    I'm writing this off as most likely a 4.6 issue with dll reloading. Given the type of error it is and the stack traces, I'm guessing it's dependency and timing related which makes it nearly impossible to repro 100%. But I filed a bug report anyways as it might give some clue and at least it's in your system.

    Case 979570
     
    LeonhardP likes this.