I'm on Ubuntu 20.04 LTS. Unity crashes when I run it, and displays me this : Editor.log : [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. Unity: ../../src/xcb_io.c :260 : poll_for_event: assertion « !xcb_xlib_threads_sequence_lost » failed. Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e800003e4b Obtained 22 stack frames. #0 0x007fca1f1f53c0 in funlockfile #1 0x007fca1f03418b in gsignal #2 0x007fca1f013859 in abort #3 0x007fca1f013729 in (Unknown) #4 0x007fca1f024f36 in __assert_fail #5 0x007fca2057e643 in _XFreeX11XCBStructure #6 0x007fca2057e6ed in _XFreeX11XCBStructure #7 0x007fca2057e9ea in _XEventsQueued #8 0x007fca205819dd in _XGetRequest #9 0x007fca2056cdd8 in XNoOp #10 0x007fca106b5fc4 in glIsTextureEXT #11 0x007fca1ed234fc in glXGetVisualFromFBConfig #12 0x0055691554a5a3 in CreateNativeGLContext(void*) #13 0x00556913bf5f88 in MakeNewContextGL(GfxDeviceLevelGL, unsigned long, int, int, int, bool, bool, bool, DepthBufferFormat) #14 0x00556913bf6159 in SetupGraphicsContextFromWindow(unsigned long, int, int, bool&) #15 0x00556913382151 in WindowGLES::Reshape(int, int, DepthBufferFormat, bool) #16 0x0055691338201b in WindowGLES::WindowGLES(unsigned long, int, int, DepthBufferFormat, bool) #17 0x0055691336001e in GfxDeviceGLES::CreateGfxWindow(unsigned long, int, int, DepthBufferFormat, bool) #18 0x005569148c5e55 in GUIView::CreateGfxWindow() #19 0x005569148c939b in GUIView::SetWindow(ContainerWindow*) #20 0x00556914d04c80 in GUIView_CUSTOM_Internal_SetWindow(ScriptingBackendNativeObjectPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*) #21 0x00000041fe665e in (wrapper managed-to-native) UnityEditor.GUIView:Internal_SetWindow (UnityEditor.GUIView,UnityEngine.ScriptableObject) Launching bug reporter QObject: Cannot create children for a parent that is in a different thread. (Parent is QObject(0x20a5470), parent's thread is QThread(0x1ed33b0), current thread is Thread(0x217d2e0) I tried many things but none worked. Thanks in advance for any help ! Don't hesitate to ask me for further details.
I got exactly the same bug. I tried to upgrade and downgrade Unity releases, with or without Unity-Hub (killing btw pending unityhub processes). With no effect at all.
I got something similar on Arch Linux. My editor version is 2020.3.29f1. It crashes when it has finished loading, just before launching. Here is the error report in Editor.log: [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. Unity: xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed. Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e8000018ab Obtained 23 stack frames. #0 0x007f94e4950560 in __sigaction #1 0x007f94e499d34c in __pthread_kill_implementation #2 0x007f94e49504b8 in raise #3 0x007f94e493a534 in abort #4 0x007f94e493a45c in __assert_fail_base.cold #5 0x007f94e4949116 in __assert_fail #6 0x007f94eb0fee2d in _XFreeX11XCBStructure #7 0x007f94eb0feec8 in _XFreeX11XCBStructure #8 0x007f94eb0ff282 in _XEventsQueued #9 0x007f94eb102246 in _XGetRequest #10 0x007f94eb0ed3e5 in XNoOp #11 0x007f93ec779429 in MesaGLInteropGLXExportObject #12 0x007f94ec187494 in glXCreateContext #13 0x0055b21f43c763 in CreateNativeGLContext(void*) #14 0x0055b21dae4f28 in MakeNewContextGL(GfxDeviceLevelGL, unsigned long, int, int, int, bool, bool, bool, DepthBufferFormat) #15 0x0055b21dae50f9 in SetupGraphicsContextFromWindow(unsigned long, int, int, bool&) #16 0x0055b21d2711e1 in WindowGLES::Reshape(int, int, DepthBufferFormat, bool) #17 0x0055b21d2710ab in WindowGLES::WindowGLES(unsigned long, int, int, DepthBufferFormat, bool) #18 0x0055b21d24f0fe in GfxDeviceGLES::CreateGfxWindow(unsigned long, int, int, DepthBufferFormat, bool) #19 0x0055b21e7b7905 in GUIView::CreateGfxWindow() #20 0x0055b21e7bae4b in GUIView::SetWindow(ContainerWindow*) #21 0x0055b21ebf6730 in GUIView_CUSTOM_Internal_SetWindow(ScriptingBackendNativeObjectPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*) #22 0x000000412dcf0e in (wrapper managed-to-native) UnityEditor.GUIView:Internal_SetWindow (UnityEditor.GUIView,UnityEngine.ScriptableObject) EDIT: I just learned about taskset which, if I understand it correctly, limits the number of threads available to a process. I've only tried it two times so far, but it seems to fix the bug for me. First, I launch Unity Hub. Second, I use htop to find the PID of the process which name is unityhub-bin on my system. Third, I execute taskset -c -pa 0 <PID> to limit the process to one thread. Fourth, I launch the editor from Unity Hub, and it works. EDIT 2: On my third attempt, taskset doesn't fix the bug anymore.
What I noticed here is that the problem was created when I updated Linux. I have just called 'Software Updates' on Ubuntu 20.04.4LTS which had two new Linux Base updates. After installing and restarting my machine I was able to start the editor again as normal. EDIT: It doesn't work every time it seems. I'll update the post if I find out something else.
Solution The issue is due to a recent mesa driver. Your options are Either downgrade to a mesa driver version lower than 21.0.0 or switch driver. In my case I just switched to Nvidia driver. Issue: https://issuetracker.unity3d.com/product/unity/issues/guid/1375312 I sincerely hope you can find a solution soon.
I FOUND A FIX: go to your Unity directory (where the unity executable is located) in the terminal then copy and paste this line: MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 ./Unity the game development gods have responded to us
Thanks @ Yoboy123456789. This solved my issue as well. I was using Unity3d in Ubuntu 20.04 in a Macmini. I am curious why was Unity crashing all of a sudden when it was working fine all this while?
Adding -force-vulkan command line argument worked for me while messing with OpenGL versions (including Yoboy123456789's solution) did nothing.
This worked for me, adding the command line argument -force-vulkan is the only solution that fixed the project for me.
That doesn't work, because the editor redirects to the unity hub from where the fix means nothing. The flags also didn't work So now I hove 2 options: 1. Downgrade Mesa (I literally cannot find any way on the internet to downgrade it on linux mint) 2. Someone tell me how to do the fix suggested by yoboy (this seems a better option to me)
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: Code (CSharp): #!/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
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... :/ -force-vulkan didn't help. ---- System: Linux Mint 21 Cinnamon 5.4.12 Linux Kernel 5.15.0-50-generic
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.