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.

Bug Standalone build error on start (some machines)

Discussion in 'Editor & General Support' started by gabrimo, Sep 20, 2023.

  1. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    Hello, so I've been working in a big project alone for almost 2 years, already released some alphas and last week it was the time to finally move it to the beta phase. The project were split into 2, one free for everybody and another closed for supporters only. For some reason, the supporters only version is crashing on start (just after the user click to open the .exe file) in some machines. The supporters only version has more content, managed with Addressables plus a simple validation system which gets the user MAC plus Windows date and time, beyond that, both systems are the same. The machines where the error happened run the free for all version fine, so it's something related with the supporters only version and their specific machine. When they open the application the window opens and the following pop-up error screen is shown (the image isn't mine, I got it on Google, but the pop-up is the same):



    The.rar file attached contains 3 Player.log files, 2 showing machines where it crashed and one showing one where it didn't. Please help me, I don't know where should I look to solve that issue...
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,375
    It's crashing right away, there isn't much in the logs. :(

    The only thing to go on is the video card and drivers. The working log is with an older driver and a 6 GB card, the two crashing logs have a newer driver and cards with 4 GB. Since that's the only thing to go on perhaps the supporter's edition requires more video ram? Still odd that it would crash so early.

    Do both versions work for you?
    Could you send the supporters version to the user who has the regular version working normally to see if that runs?
     
  3. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    Both versions should require a good amount of VRAM, but not right away, so it still strange it crashes on startup.

    Both versions work on my machine.

    The last question is tricky, cause the supporters only version has a password in the rar file on top of the validation I mentioned and I wouldn't like to opened for the public, but like I said, the free one works on both machines where the supporters only does not...
     
  4. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    Is it worth trying to run a development build on those machines? I'll try to make that when possible, I depend on the users' availability for that...
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
    Any reason you're using OpenGL on Windows? That generally is not a great idea.

    Anyway I'd double check that you're copying over all files. It seems it crashes trying to create some default materials.
     
  6. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    Well, I'm not even sure where I did it to be honest. My application isn't a game, but a tool which generates textures procedurally. Any suggestions on where should I look for that Open GL usage? I mean, my application is kinda big and I wouldn't know where to start looking. Shaders maybe?

    Which files would that be? Open GL's specific stuff? I didn't get it...

    Beyond some additional content, the only difference between both versions is the validation, at the same time, I believe that getting MAC, date and time shouldn't produce such a error.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
    It's in player settings: https://docs.unity3d.com/Manual/GraphicsAPIs.html

    I suspect you disabled Automatic Graphics API for Windows, and added OpenGL to the top of the list.
     
    Kurt-Dekker likes this.
  8. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    I've never changed such settings, I believe mine are standard for a 3D project, check the attachment to see if I should change anything please.

    Also, my Unity is 2022.3.0 if this means anything...

    EDIT:
    I attached the crash.dmp file too from one of the machines where my app doesn't run.
     

    Attached Files:

    Last edited: Sep 21, 2023
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
    Your latest dump shows a completely different issue. It's a division by zero somewhere either in your scripts or il2cpp runtime. I can't tell exactly where it happens, as I would need the "_BackUpWithFolder_ButDontShipItWithTheGame" contents, or at least the GameAssembly.dll and GameAssembly.pdb files from the game and that folder.

    That said, it's weird that division by zero exception takes down the game, as it generally should result in an exception.
     
  10. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    Well, is there any place where I can send you those? I mean, the folder you mentioned is kinda big plus sending those files here doesn't seems a good idea...

    I'm kinda desperate with this one cause the error only happens on some cases and those logs doesn't tell me nothing...
     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
    You can upload it to some cloud storage (like google drive) and send me a link privately. You are right, you should not post it publicly.
     
    gabrimo likes this.
  12. gabrimo

    gabrimo

    Joined:
    May 2, 2015
    Posts:
    86
    So it's solved!

    Both tests failed on laptops and that was the hint, it happens that I only considered ethernet network interfaces in my test, disregarding wi-fi or bluetooth ones, which are very likely to be the primary network interface on laptops. Completing that test seems to have solved the problem, the code piece which solved the issue got like this:

    Code (CSharp):
    1. NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
    2. foreach (NetworkInterface nic in nics)
    3. {
    4.     if (nic.OperationalStatus == OperationalStatus.Up)
    5.     {
    6.         if (nic.NetworkInterfaceType == NetworkInterfaceType.Ethernet ||
    7.             nic.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 ||
    8.             nic.NetworkInterfaceType == NetworkInterfaceType.FastEthernetFx)
    9.         {
    10.             macAddress = nic.GetPhysicalAddress().ToString();
    11.             break;
    12.         }
    13.         else
    14.             throw new Exception("No valid network interface found!");
    15.     }
    16.     else
    17.         throw new Exception("No valid network interface found!");
    18. }
    19. }
    EDIT: I actually forgot one additional test to confirm the network interface is active.
     
    Last edited: Sep 22, 2023