Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Crash on some systems in one specific scene with one specific upgrade equipped

Discussion in 'Windows' started by Pattrigue, Mar 17, 2022.

  1. Pattrigue

    Pattrigue

    Joined:
    Nov 24, 2018
    Posts:
    55
    Hi,

    A few of my players have been reporting a crash with a new upgrade I recently added, however it only happens on some systems and only in one specific scene.
    The crash is consistent. It happens every time the player equips that upgrade and enters that specific scene.
    The log file point towards a problem with Unity rather than a problem with my game:

    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FFB743ECE13 (nvwgf2umx) NVENCODEAPI_Thunk
    4. 0x00007FFB743EA5E4 (nvwgf2umx) NVENCODEAPI_Thunk
    5. 0x00007FFB7444E789 (nvwgf2umx) NVENCODEAPI_Thunk
    6.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFB742553AA)
    7. 0x00007FFB742553AA (nvwgf2umx) (function-name not available)
    8. 0x00007FFB745E5395 (nvwgf2umx) NVDEV_Thunk
    9. 0x00007FFB745E5148 (nvwgf2umx) NVDEV_Thunk
    10. 0x00007FFB7471DCEA (nvwgf2umx) NVDEV_Thunk
    11. 0x00007FFB75486C48 (nvwgf2umx) OpenAdapter12
    12. 0x00007FFC1D887034 (KERNEL32) BaseThreadInitThunk
    13. 0x00007FFC1EAC2651 (ntdll) RtlUserThreadStart
    14.  
    15. ========== END OF STACKTRACE ===========
    The code that executes and somehow causes the crash is very simple, and I have no reason to believe it's the cause - all it's doing is checking the current scene names against elements in a HashSet.
    The helper functions used are used elsewhere in the game too without any problems.
    OnStartWithUpgradeEquipped
    is the method being called.

    Code (CSharp):
    1. private static readonly HashSet<string> ProhibitedLevels = new HashSet<string>
    2. {
    3.     ConstantGameData.TownLevelName, ConstantGameData.SubShooterLevelName, ConstantGameData.RocketLevelName
    4. };
    5.  
    6. protected override void OnStartWithUpgradeEquipped()
    7. {
    8.     string levelName = GameManager.Instance.GetLevelNameFromActiveScene();
    9.  
    10.     if (ProhibitedLevels.Contains(levelName)) return;
    11.     if (levelName == ConstantGameData.LevelBuilderName && SessionManager.CurrentSessionType == SessionType.Editing) return;
    12.  
    13.     Player.GiveFairy();
    14. }
    I have attached a zip file containing the log file, the crash dump and the error log file.
    Does anyone know what might be causing this?

    FYI I'm using Unity 2019.4.32f1.
     

    Attached Files:

    Last edited: Mar 17, 2022
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    That callstack points to a crash inside the Nvidia graphics driver. Crashes like those are almost always caused by a bug in the driver :(. Do the crashes of all players have the same callstack?
     
    Pattrigue likes this.
  3. Pattrigue

    Pattrigue

    Joined:
    Nov 24, 2018
    Posts:
    55
    Hey, first of all, thanks so much for the fast response!
    I have only been able to collect crash logs and dumps from one player, which is what I posted here.

    Told the player to update his driver, and that fixed it. Sorry for wasting your time! Wasn't aware it was related to the NVidia graphics driver.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    No problem, I'm glad it fixed it.