Unity crash (872084)

I use this command every day. I use it first and it opens my unity hub directly. Restart PC and try this command first.

I think the newer versions of unity hub may work differently but I am not sure. I am still using the app image unity hub and have not upgraded.

I hope this helps. Hopefully 22.04 will bring a mesa fix for this issue. It is super annoying.

Oh yeah!! Thanks, It worked I just had to make sure the hub is not running, and unity will just prompt me to either open a project or to open the unity hub. Now I can use 2020, 2019 and 2021 lts

Also, I created 3 simple scripts to run the 3 versions I have, which looked like this:

#!/bin/sh

pkill unityhub-bin
cd /home/$USER/Unity/Hub/Editor
MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 ./$(ls | grep 2021.2)/Editor/Unity

Where 2021.2 can be replaced by any version like 2021.3, 2020.3, etc. I did that grep thing because I wanted to make sure that if I install another patch of 2021.2 then I would still be able to run this same script and expect it to open up the new patch (given that I only keep 1 patch release of any editor)

Hey I just realized that I cannot use unity services without running unity through the hub, any way to avoid that

Ok so I found a workaround, basically, I opened unity through the hub( which crashed), but I looked at htop in the tree view and realized that all unity instances run under the main hub process. So I set the Mesa GL version override and Mesa GLSL version override vars in my zshrc file. and opened up unity hub through a terminal so that the variables persist even after starting unity

@BlueDev5 Could you please tell me how you did that?

I have an NVIDIA driver and still have that problem.

Can someone from unity pls fix this? Im still having this issue 18-09-2022…
Edit:
I now tried every solution in this post, unity keeps crashing on this issue every 5 minutes…
Now im sad, because i cant use linux for unity development…

Crashing here for every 2 or 3 actions i try to do… :confused:
-force-vulkan didn’t help.

System:
Linux Mint 21 Cinnamon 5.4.12
Linux Kernel 5.15.0-50-generic

This works wonders.

Is there any possibility that someone explain the path what to do with Unity Editor file and how? :slight_smile:

If you go to the path “/home/$USER/Unity/Hub/Editor” (without double quotes and where $USER is your username. Just pasting this path on the file explorer should work) will show you a list of folders, each one is an Unity version. Inside it, Unity’s executable is simply called “Unity”.

The awesome script from BlueDev5, if pasted to an empty file and set its properties to allow executing (or executable, or something that resembles that meaning) will allow you to doubleclick that file and launch Unity with the correct mesa drivers that don’t crash. It will ask you which project you want to open, so it’s not as convenient as hub, but until everything is fixed, this workaround just works.