Unity 2019 editor crashing, logs implicate gtk

Howdy I was recommended this community when asking about this in the Gnome git issues. I know this may not be a GTK issue but it’s the only route of investigation I have at this point.

I revisited a project I had not touched for many months today and could not get the Unity Editor to open. Upon some digging I found a log containing many GTK-Crital errors. I installed this editor version (2019.4.2) back in January and used it without issue for 2 months. Since it has been untouched till today, I cannot see how the application is to blame.

Any advice or trouble shooting steps or paths to investigate would be appreciated. I’m a novice Linux user, in that I can generally find logs for crashes :smile: but not much else.

Steps to reproduce

  1. Install Unity 2019 Editor
  2. Open Editor
  3. Silent crash

Version information

I am using an up to date Fedora 38, with a default GTK install. I have tested with Unity 2019.4.2, 2019.4.28, and 2019.4.40 (last release).

I did a OS version upgrade in the timeline somewhere (don’t quite remember when) from 37 to the current 38. I suspect something was changed and now the application cannot run.

I have a dual gpu laptop and have tested this on the amd and nvidia gpu’s in Wayland (default) and Xorg.

Warnings

Application crashes silently.

Editor log (at “~/.config/unity3d/Editor.log”) is normal except that there is between 1 and 30 instances of:

(Unity:18080): Gtk-CRITICAL **: 23:17:41.795: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed

that cut short at:
../../third_party/tcmalloc/chromium/src/tcmalloc.cc:289] Attempt to free invalid pointer 0x55a77dfc1570

and sometimes end with:
Parent process [22965] was terminated

Backtrace

I’ve managed to get some more information using gdb but do not know what to make of it. I want to share the session output log in case it elucidates a solution, but I’m not sure how to upload the log file for sharing on this site yet… so it’s a work in progress. Here is a link to the output: Unity 2019 crash log ($2572201) · Snippets · GitLab

This is a precondition check; whatever is calling gtk_container_foreach() is doing so with an invalid pointer. That’s extremely unlikely to be caused by something GTK is doing internally

You should use thread apply all backtrace in GDB before run, so that you get a full backtrace on all threads.

Thread 1 "Main Thread" received signal SIGSEGV, Segmentation fault.
0x00007ffff24d5e20 in tcmalloc::Abort() () from /mnt/DATA/Unity/Editors/2019.4.2f1/Editor/libcef.so
(gdb) bt
#0  0x00007ffff24d5e20 in tcmalloc::Abort() () at /mnt/DATA/Unity/Editors/2019.4.2f1/Editor/libcef.so
#1  0x00007ffff24e3018 in tcmalloc::Log(tcmalloc::LogMode, char const*, int, tcmalloc::LogItem, tcmalloc::LogItem, tcmalloc::LogItem, tcmalloc::LogItem) () at /mnt/DATA/Unity/Editors/2019.4.2f1/Editor/libcef.so
#2  0x00007ffff24eea74 in (anonymous namespace)::InvalidFree(void*) () at /mnt/DATA/Unity/Editors/2019.4.2f1/Editor/libcef.so
#3  0x00007ffec3c75d78 in llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >, void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >::InsertIntoBucketImpl<void const*>(void const* const&, void const* const&, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*>*) (this=0x7fffe96f5088, TheBucket=0x69, Key=<optimized out>, Lookup=<optimized out>) at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/lib/IR/PassRegistry.cpp:52
#4  llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >, void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >::InsertIntoBucket<void const*, llvm::PassInfo const*>(llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*>*, void const*&&, llvm::PassInfo const*&&) (this=0x7fffe96f5088, TheBucket=0x69, Key=<optimized out>, Values=<optimized out>) at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/include/llvm/ADT/DenseMap.h:547
#5  llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >, void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >::try_emplace<llvm::PassInfo const*>(void const*&&, llvm::PassInfo const*&&) (this=0x7fffe96f5088, Key=<optimized out>, Args=<optimized out>)
    at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/include/llvm/ADT/DenseMap.h:234
#6  llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >, void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*, void>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >::insert(std::pair<void const*, llvm::PassInfo const*>&&) (this=0x7fffe96f5088, KV=<optimized out>)
    at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/include/llvm/ADT/DenseMap.h:215
#7  llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool) (this=0x7ffeca2885e0 <_ZZN4llvm12PassRegistry15getPassRegistryEvE15PassRegistryObj.llvm.3815807359131815657>, PI=..., ShouldFree=true)
    at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/lib/IR/PassRegistry.cpp:52
#8  0x00007ffec5f048ef in initializeSIPeepholeSDWAPassOnce(llvm::PassRegistry&) (Registry=...) at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/lib/Target/AMDGPU/SIPeepholeSDWA.cpp:188
#9  0x00007fffeb76aaf3 in __pthread_once_slow (once_control=0x7ffeca2e0298 <_ZL32InitializeSIPeepholeSDWAPassFlag.llvm.15594638679948419341>, init_routine=0x55555ac0b2e0 <__once_proxy>) at pthread_once.c:116
#10 0x00007ffec5d99b20 in __gthread_once(int*, void (*)()) (__once=0x7fffe96f5088, __func=0x7fffffffbb60) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/x86_64-redhat-linux/bits/gthr-default.h:700
#11 std::call_once<void* (&)(llvm::PassRegistry&), std::reference_wrapper<llvm::PassRegistry> >(std::once_flag&, void* (&)(llvm::PassRegistry&), std::reference_wrapper<llvm::PassRegistry>&&)
    (__once=..., __f=<error reading variable: Cannot access memory at address 0x69>, __args=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/mutex:907
#12 llvm::call_once<void* (&)(llvm::PassRegistry&), std::reference_wrapper<llvm::PassRegistry> >(std::once_flag&, void* (&)(llvm::PassRegistry&), std::reference_wrapper<llvm::PassRegistry>&&)
    (flag=..., F=<error reading variable: Cannot access memory at address 0x69>, ArgList=...) at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/include/llvm/Support/Threading.h:89
#13 llvm::initializeSIPeepholeSDWAPass(llvm::PassRegistry&) (Registry=<optimized out>) at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/lib/Target/AMDGPU/SIPeepholeSDWA.cpp:188
#14 LLVMInitializeAMDGPUTarget() () at /usr/src/debug/llvm-16.0.5-1.fc38.x86_64/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:356
#15 0x00007ffecada1e05 in ac_init_llvm_target () at ../src/amd/llvm/ac_llvm_util.c:42
#16 0x00007fffeb76aaf3 in __pthread_once_slow (once_control=0x7ffecc13a768 <ac_init_llvm_target_once_flag>, init_routine=0x7ffecada1de0 <ac_init_llvm_target>) at pthread_once.c:116
#17 0x00007fffeb76abf5 in ___pthread_once (once_control=<optimized out>, init_routine=<optimized out>) at pthread_once.c:143
#18 0x00007fffeb76e2f9 in __call_once (flag=<optimized out>, func=<optimized out>) at ../sysdeps/pthread/call_once.c:31
#19 0x00007ffecada1e87 in ac_init_shared_llvm_once () at ../src/amd/llvm/ac_llvm_util.c:71
#20 0x00007ffecada1e99 in ac_init_llvm_once () at ../src/amd/llvm/ac_llvm_util.c:85
#21 0x00007ffecacbfb99 in radeonsi_screen_create (fd=97, config=0x7fffffffbf00) at ../src/gallium/drivers/radeonsi/si_pipe.c:1484

This is an invalid free in the Radeon Mesa driver when initialising GL, nothing to do with GTK.

OMG that’s amazing! Thanks for seeing that.

If I go into the ProjectSettings.asset file and manualy switch to the vulkan player from the default OpenGL the editor will launch.

So this has something to do with OpenGL compatibility… not an answer but definitely a step towards one.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.