Search Unity

Windows 8 Unity 2018.4 Crash, any insight?

Discussion in 'Windows' started by Botaurus, Jul 16, 2019.

  1. Botaurus

    Botaurus

    Joined:
    Feb 20, 2013
    Posts:
    81
    I'm wondering if anyone can give me insight into whats happening in this crash?
    first there is a nullref from this code
    Code (CSharp):
    1.            if (model == null)
    2.                return;
    3.  
    4.            if (!_flatList.Contains(model))
    5.                return;
    (no chance the _flatList is null)
    I've been told that 'SymGetSymFromAddr64' means I'm having memory issues
    the last named function seems to be 0x000000D6C8699D65 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()
    and at the very end, FMOD says [FMOD] OutputWASAPI::mixerThread : Starvation detected in WASAPI output buffer!
    Do you think the fmod error at the end, and the nullref, are a result of the hard crash? I've been spending a lot of time cleaning up my FMOD implementation but I'm thinking it might not be the problem.
    Any help would be much appreciated, thanks!
    (I've attached the crash log)
     

    Attached Files:

  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    You've been told wrong. It just means that a symbol name for that frame couldn't be found. Could you attach a .dmp file that was generated from the crash?
     
  3. Botaurus

    Botaurus

    Joined:
    Feb 20, 2013
    Posts:
    81
    unfortunately I dont have a .dmp file, I recall clicking 'debug' when prompted after the crash but /locallow/ does not have a dmp file for that crash.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    The dump should be located here (it's in your log file):

    Code (csharp):
    1. A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
    2.  * C:/Users/Danny/AppData/Local/Temp/Bird Bath Games/GAME/Crashes
     
  5. Botaurus

    Botaurus

    Joined:
    Feb 20, 2013
    Posts:
    81
    ah ok, I just upgraded to 2018, didn't realize they went to a new place, thanks

    I removed music from my game and I haven't gotten a crash again. I had a poor implementation, I was streaming 10+ large music files at once. Possibly a cause?
     

    Attached Files:

  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Looks like there's some corruption going on in your game... Here's the full callstack:

    Code (csharp):
    1. UnityPlayer.dll!Scripting::ScriptingWrapperFor(Object *)
    2. [Inline Frame] UnityPlayer.dll!Marshalling::UnityObjectUnmarshaller<Transform>::GetScriptingObject()
    3. [Inline Frame] UnityPlayer.dll!Marshalling::UnityObjectUnmarshaller<Transform>::operator struct MonoObject *()
    4. [Inline Frame] UnityPlayer.dll!Marshalling::Unmarshal(MonoObject * *)
    5. UnityPlayer.dll!GameObject_Get_Custom_PropTransform(MonoObject *)
    6. (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()
    7. SimplePool/Pool:Spawn (UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform) [V:\COMPANY\Projects\GAME\Assets\SharedLib\SimplePool.cs:133]
    8. SimplePool:Spawn (UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion) [V:\COMPANY\Projects\GAME\Assets\SharedLib\SimplePool.cs:223]
    9. GAME.Game.Crops.WeedsView:_refreshAt (Int2) [V:\COMPANY\Projects\GAME\Assets\GAME\Scripts\Game\Crops\Weeds\WeedsView.cs:185]
    10. GAME.Game.Crops.WeedsView:_onDirtyCallback (System.Collections.Generic.HashSet`1<Int2>,System.Collections.Generic.HashSet`1<Int2>) [V:\COMPANY\Projects\GAME\Assets\GAME\Scripts\Game\Crops\Weeds\WeedsView.cs:99]
    11. (wrapper delegate-invoke) System.Action`2<System.Collections.Generic.HashSet`1<Int2>, System.Collections.Generic.HashSet`1<Int2>>:invoke_void__this___HashSet`1<Int2>_HashSet`1<Int2> (System.Collections.Generic.HashSet`1<Int2>,System.Collections.Generic.HashSet`1<Int2>)
    12. TileViewport:Update () [V:\COMPANY\Projects\GAME\Assets\GAME\Scripts\Core\ViewUtils\TileViewport.cs:110]
    13. (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    14. mono.dll!mono_jit_runtime_invoke(_MonoMethod *, void *, void * *, MonoObject * *)
    15. mono.dll!mono_runtime_invoke(_MonoMethod *, void *, void * *, MonoObject * *)
    16. UnityPlayer.dll!scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments &, ScriptingExceptionPtr *, bool)
    17. UnityPlayer.dll!ScriptingInvocation::Invoke(ScriptingExceptionPtr *, bool)
    18. UnityPlayer.dll!MonoBehaviour::CallMethodIfAvailable(int)
    19. UnityPlayer.dll!MonoBehaviour::CallUpdateMethod(int)
    20. UnityPlayer.dll!BaseBehaviourManager::CommonUpdate<BehaviourManager>()
    21. UnityPlayer.dll!BehaviourManager::Update()
    22. UnityPlayer.dll!`InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward()
    23. UnityPlayer.dll!ExecutePlayerLoop(NativePlayerLoopSystem *)
    24. UnityPlayer.dll!PlayerLoop()
    25. UnityPlayer.dll!PerformMainLoop()
    26. UnityPlayer.dll!MainMessageLoop()
    27. UnityPlayer.dll!UnityMainImpl(HINSTANCE__ *, HINSTANCE__ *, wchar_t *, int)
    28. UnityPlayer.dll!UnityMain(HINSTANCE__ *, HINSTANCE__ *, wchar_t *, int)
    29. Atomicrops.exe!wWinMain(HINSTANCE__ *, HINSTANCE__ *, wchar_t *, int)
    The VTable pointer inside Transform object is 0x57415756ec8b4855, which is clearly not valid. That's why it crashes.

    Is there any chance that object that you're taking from your SimplePool already destroyed?
     
  7. Botaurus

    Botaurus

    Joined:
    Feb 20, 2013
    Posts:
    81
    seems unlikely, I very rarely, if ever, destroy objects (other than scene switching)
    this system is also function properly >99% of the time (this is the first time I've seen the crash specifically happen here), it's constantly activating/ unactivating objects as they enter the screen area :/
    is it in the realm of possibility that a very poor FMOD implementation (on my part), that uses way too much memory, could cause something like this?
    I've attached another crash, would you mind expanding this one too?
    really appreciate the help, thanks
     

    Attached Files:

  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    When you say FMOD implementation, what exactly do you mean? The callstack from the new dump is a bit different:

    Code (csharp):
    1. KERNELBASE.dll!RaiseException()
    2. mono.dll!g_logv(const char * log_domain, GLogLevelFlags log_level, const char * format, char * args) Line 201
    3. mono.dll!g_log(const char * log_domain, GLogLevelFlags log_level, const char * format, ...) Line 211
    4. mono.dll!mono_convert_imt_slot_to_vtable_slot(void * * slot, __int64 * regs, unsigned char * code, _MonoMethod * method, _MonoMethod * * impl_method, int * need_rgctx_tramp) Line 199
    5. mono.dll!mono_magic_trampoline(__int64 * regs, unsigned char * code, void * arg, unsigned char * tramp) Line 350
    You're hitting this: https://github.com/Unity-Technologies/mono/blob/unity-2018.4/mono/mini/mini-trampolines.c#L198

    Looks like class pointer is getting corrupted this time.. this definitely sounds like memory corruption and not destroyed object at this point.
     
  9. Botaurus

    Botaurus

    Joined:
    Feb 20, 2013
    Posts:
    81
    I mean adding sound to the game using the FMOD Unity plugin. I'm calling way too many sound instances (500+) and streaming in 10+ large files at that same time. I've been cleaning it up because I'm hoping that's the problem.
    I've also been improving my code based on the BestPracticeUnderstandingPerformanceInUnity article.
    Could too many managed heap allocations and too much memory fragmentation cause this crash?
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It shouldn't. Can you try enabling AppVerifier for your app? That might point to the culprit.

    1. Open AppVerifier:

    upload_2019-7-18_17-38-19.png

    2. Add your executable and make sure that "Heaps" and "Memory" checkboxes are checked (don't check others):

    upload_2019-7-18_17-38-57.png

    3. Press Save;
    4. Run your game until it crashes;
    5. Drop a new crash dump here;
    6. Remove your application from app verifier.