Search Unity

Crash on 32-bit Linux player (5.6.4p4)

Discussion in 'Linux' started by topherr, Jan 3, 2018.

  1. topherr

    topherr

    Joined:
    Jun 1, 2013
    Posts:
    25
    Here is the log output
    Code (csharp):
    1.  
    2. Set current directory to /home/x/Documents
    3. Found path: /home/x/Documents/linux.x86
    4. Mono path[0] = '/home/x/Documents/linux_Data/Managed'
    5. Mono path[1] = '/home/x/Documents/linux_Data/Mono'
    6. Mono config path = '/home/x/Documents/linux_Data/Mono/etc'
    7. PlayerConnection initialized from /home/x/Documents/linux_Data (debug = 0)
    8. PlayerConnection initialized network socket : 0.0.0.0 55369
    9. Multi-casting "[IP] 192.168.11.58 [Port] 55369 [Flags] 3 [Guid] 2704242422 [EditorId] 1853395198 [Version] 1048832 [Id] LinuxPlayer(192.168.11.58) [Debug] 1" to [225.0.0.222:54997]...
    10. Waiting for connection from host on [0.0.0.0:55369]...
    11. Timed out. Continuing without host connection.
    12. Started listening to [0.0.0.0:55369]
    13. Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56422
    14. Preloaded 'libCSteamworks.so'
    15. Preloaded 'libluajit.so'
    16. Preloaded 'libsteam_api.so'
    17. Preloaded 'luajit.so'
    This is from a Development build, have also tried a non-Development build. Display resolution dialogue is Disabled. Running on Ubuntu 17.10 x64.

    Short of trying various patch versions of 5.6.4, I feel at a loss on how to debug this without the engine source code.
     
    Last edited: Jan 3, 2018
  2. topherr

    topherr

    Joined:
    Jun 1, 2013
    Posts:
    25
    I did a build where I stripped most of the flow of launching our game so that it's almost a simple scene. It appears to just be closing when calling Shader.Find in this case, at least.

    Code (csharp):
    1. Set current directory to /home/x/Documents/strippedbuild
    2. Found path: /home/x/Documents/strippedbuild/linux.x86
    3. Mono path[0] = '/home/x/Documents/strippedbuild/linux_Data/Managed'
    4. Mono path[1] = '/home/x/Documents/strippedbuild/linux_Data/Mono'
    5. Mono config path = '/home/x/Documents/strippedbuild/linux_Data/Mono/etc'
    6. PlayerConnection initialized from /home/x/Documents/strippedbuild/linux_Data (debug = 0)
    7. PlayerConnection initialized network socket : 0.0.0.0 55161
    8. Multi-casting "[IP] 192.168.11.58 [Port] 55161 [Flags] 3 [Guid] 3542460277 [EditorId] 920343059 [Version] 1048832 [Id] LinuxPlayer(192.168.11.58) [Debug] 1" to [225.0.0.222:54997]...
    9. Waiting for connection from host on [0.0.0.0:55161]...
    10. Timed out. Continuing without host connection.
    11. Started listening to [0.0.0.0:55161]
    12. Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56277
    13. Preloaded 'libluajit.so''Scenes/GameMain' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
    14. To add a scene to the build settings use the menu File->Build Settings...
    15. UnityEngine.SceneManagement.SceneManager:LoadSceneAsyncNameIndexInternal(String, Int32, Boolean, Boolean)
    16. UnityEngine.SceneManagement.SceneManager:LoadSceneAsync(String, LoadSceneMode) (at /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs:132)
    17. MissionLauncherComponent:Awake() (at /Users/chrisx.redden/Dev/p4/warringstates/unity/Assets/Game/Scripts/Missions/MissionLauncherComponent.cs:32)
    18.  
    19. [/home/builduser/buildslave/unity/build/Runtime/SceneManager/SceneManager.cpp line 140]
    20. (Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs Line: 132)
    21.  
    22. Scene 'Scenes/GlobalResources' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
    23. To add a scene to the build settings use the menu File->Build Settings...
    24. UnityEngine.SceneManagement.SceneManager:LoadSceneAsyncNameIndexInternal(String, Int32, Boolean, Boolean)
    25. UnityEngine.SceneManagement.SceneManager:LoadSceneAsync(String, LoadSceneMode) (at /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs:132)
    26. MissionLauncherComponent:Awake() (at /Users/chrisx.redden/Dev/p4/warringstates/unity/Assets/Game/Scripts/Missions/MissionLauncherComponent.cs:33)
    27.  
    28. [/home/builduser/buildslave/unity/build/Runtime/SceneManager/SceneManager.cpp line 140]
    29. (Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs Line: 132)
    30.  
    31. Scene 'Scenes/MenuResources' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
    32. To add a scene to the build settings use the menu File->Build Settings...
    33. UnityEngine.SceneManagement.SceneManager:LoadSceneAsyncNameIndexInternal(String, Int32, Boolean, Boolean)
    34. UnityEngine.SceneManagement.SceneManager:LoadSceneAsync(String, LoadSceneMode) (at /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs:132)
    35. MissionLauncherComponent:Awake() (at /Users/chrisx.redden/Dev/p4/warringstates/unity/Assets/Game/Scripts/Missions/MissionLauncherComponent.cs:34)
    36.  
    37. [/home/builduser/buildslave/unity/build/Runtime/SceneManager/SceneManager.cpp line 140]
    38. (Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs Line: 132)
    39.  
    40. terminate called after throwing an instance of 'std::length_error'
    41.  what():  vector::reserve
    42. Stacktrace:
    43.  
    44.  at (wrapper managed-to-native) UnityEngine.Shader.Find (string) <0x00004>
    45.  at (wrapper managed-to-native) UnityEngine.Shader.Find (string) <0x00004>
    46.  at HighlightingSystem.HighlightingBase.Initialize () [0x0004d] in /Users/chrisx.redden/Dev/p4/warringstates/unity/Assets/Plugins/HighlightingSystem/Scripts/Internal/HighlightingBase.cs:401
    47.  at HighlightingSystem.HighlightingBase.OnEnable () [0x00001] in /Users/chrisx.redden/Dev/p4/warringstates/unity/Assets/Plugins/HighlightingSystem/Scripts/Internal/HighlightingBase.cs:226
    48.  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0001c, 0x0008e>
    49.  
    50. Native stacktrace:
    51.  
    52.   /home/x/Documents/strippedbuild/linux_Data/Mono/x86/libmono.so(+0x89c9b) [0xf2a6fc9b]
    53.   [0xf7f6ade0]
    54.   [0xf7f6adb9]
    55.   /lib/i386-linux-gnu/libc.so.6(gsignal+0xc2) [0xf7ad17e2]
    56.   /lib/i386-linux-gnu/libc.so.6(abort+0x161) [0xf7ad2f51]
    57.   /usr/lib/i386-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x132) [0xf7e0d1f2]
    58.   /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x72874) [0xf7e0a874]
    59.   /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x728ed) [0xf7e0a8ed]
    60.   /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x72bfc) [0xf7e0abfc]
    61.   /usr/lib/i386-linux-gnu/libstdc++.so.6(_ZSt20__throw_length_errorPKc+0x46) [0xf7e36cd6]
    62.   ./linux.x86() [0x89195d7]
    63.   ./linux.x86() [0x8923baa]
    64.   ./linux.x86() [0x8923ffb]
    65.   ./linux.x86() [0x890c1ad]
    66.   ./linux.x86() [0x8c29770]
    67.   ./linux.x86() [0x8c133a0]
    68.   ./linux.x86() [0x8c135b2]
    69.   ./linux.x86() [0x8c163cc]
    70.   ./linux.x86() [0x8198cd7]
    71.   ./linux.x86() [0x88c4038]
    72.   ./linux.x86() [0x8c96b0e]
    73.   [0xf2269f74]
    74.   [0xf2269349]
    75.   [0xf2268d61]
    76.   [0xf15323ef]
    77.   /home/x/Documents/strippedbuild/linux_Data/Mono/x86/libmono.so(+0x25c5b) [0xf2a0bc5b]
    78.   /home/x/Documents/strippedbuild/linux_Data/Mono/x86/libmono.so(mono_runtime_invoke+0x66) [0xf2b0d375]
    79.   ./linux.x86() [0x8b7d942]
    80.   ./linux.x86() [0x8bf4f9f]
    81.   ./linux.x86() [0x8bbd401]
    82.   ./linux.x86() [0x8bc2c5b]
    83.   ./linux.x86() [0x8c0b9f2]
    84.   ./linux.x86() [0x880dab1]
    85.   ./linux.x86() [0x880df05]
    86.   ./linux.x86() [0x880fcaf]
    87.   ./linux.x86() [0x88107d8]
    88.   ./linux.x86() [0x8810b88]
    89.   ./linux.x86() [0x88815ab]
    90.   ./linux.x86() [0x87c61eb]
    91.   ./linux.x86() [0x87c6362]
    92.   ./linux.x86() [0x80cb079]
    93.   /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf7abc986]
    94.   ./linux.x86() [0x80d6f99]
    95.  
    96. Debug info from gdb:
    97.  
    98. I refuse to debug myself!
    99. No threads.
    100.  
    101. =================================================================
    102. Got a SIGABRT while executing native code. This usually indicates
    103. a fatal error in the mono runtime or one of the native libraries
    104. used by your application.
    105. =================================================================
    106.  
    107. Aborted (core dumped)
    108.  
    Just to be clear, I want to know why the engine is completely crashing out, so ignore the scene issues in this log as I artificially caused them and they shouldn't cause a hard crash.
     
  3. topherr

    topherr

    Joined:
    Jun 1, 2013
    Posts:
    25
    Every time I strip away loading assets at runtime it gets further, but crashes on the next time it loads assets from runtime.

    I've done a build with 2017 and still crashing:

    Code (csharp):
    1. Receiving unhandled NULL exception
    2. #0  0x000000ffb19f40 in (Unknown)
    3. #1  0x000000ffb1a520 in void GameObject::TransferComponents<StreamedBinaryRead<false> >(StreamedBinaryRead<false>&)
    4. #2  0x000000ffb1a590 in void GameObject::Transfer<StreamedBinaryRead<false> >(StreamedBinaryRead<false>&)
    5. #3  0x000000ffb1a610 in GameObject::VirtualRedirectTransfer(StreamedBinaryRead<false>&)
    6. #4  0x000000ffb1a650 in SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&)
    7. #5  0x000000ffb1a780 in PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool)
    8. #6  0x000000ffb1a7e0 in PersistentManager::ReadObjectThreaded(int)
    9. #7  0x000000ffb1a870 in PersistentManager::ReadObject(int, AwakeFromLoadMode)
    10. #8  0x000000ffb1a8b0 in ReadObjectFromPersistentManager(int)
    11. #9  0x000000ffb1a8d0 in Resources_CUSTOM_Load(MonoString*, MonoObject*)
    12. #10 0x000000ffb1a9a0 in (Unknown)
    13. #11 0x000000ffb1a9f0 in (Unknown)
    14. #12 0x000000ffb1aa20 in (Unknown)
    15. #13 0x000000ffb1aa50 in (Unknown)
    16. #14 0x000000ffb1aa70 in (Unknown)
    17. #15 0x000000ffb1aab0 in mono_set_defaults
    18. #16 0x000000ffb1ab10 in mono_runtime_invoke
    19. #17 0x000000ffb1ab40 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    20. #18 0x000000ffb1ab60 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    21. #19 0x000000ffb1abb0 in Coroutine::InvokeMoveNext(ScriptingExceptionPtr*) [clone .constprop.118]
    22. #20 0x000000ffb1ace0 in Coroutine::Run(bool*)
    23. #21 0x000000ffb1ad30 in MonoBehaviour::TryCreateAndRunCoroutine(ScriptingObjectPtr, ScriptingMethodPtr, Coroutine**)
    24. #22 0x000000ffb1adc0 in MonoBehaviour::StartCoroutineManaged2(ScriptingObjectPtr)
    25. #23 0x000000ffb1ae30 in MonoBehaviour_CUSTOM_StartCoroutine_Auto_Internal(MonoObject*, MonoObject*)
    26. #24 0x000000ffb1ae60 in (Unknown)
    27. #25 0x000000ffb1aeb0 in (Unknown)
    28. #26 0x000000ffb1aed0 in (Unknown)
    29. #27 0x000000ffb1aef0 in (Unknown)
    30. #28 0x000000ffb1af30 in mono_set_defaults
    31. #29 0x000000ffb1af90 in mono_runtime_invoke
    32. #30 0x000000ffb1afc0 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    33. #31 0x000000ffb1afe0 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    34. #32 0x000000ffb1b030 in ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*)
    35. #33 0x000000ffb1b060 in MonoBehaviour::CallAwake()
    36. #34 0x000000ffb1b280 in MonoBehaviour::AddToManager()
    37. #35 0x000000ffb1b3c0 in MonoBehaviour::AwakeFromLoad(AwakeFromLoadMode)
    38. #36 0x000000ffb1b5e0 in AwakeFromLoadQueue::PersistentManagerAwakeFromLoad()
    39. #37 0x000000ffb1b650 in LoadSceneOperation::CompleteAwakeSequence()
    40. #38 0x000000ffb1b690 in LoadSceneOperation::IntegrateMainThread()
    41. #39 0x000000ffb1b6d0 in PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int)
    42. #40 0x000000ffb1b790 in PreloadManager::UpdatePreloading()
    43. #41 0x000000ffb1b7f0 in InitPlayerLoopCallbacks()::EarlyUpdateUpdatePreloadingRegistrator::Forward()
    44. #42 0x000000ffb1b820 in PlayerLoop()
    45. #43 0x000000ffb1b850 in main
    46. #44 0x000000ffb1c470 in __libc_start_main
    47. #45 0x000000ffb1c4e0 in _start
    48. Stacktrace:
    49.  
    50.   at (wrapper managed-to-native) UnityEngine.Resources.Load (string,System.Type) <0x00004>
    51.   at (wrapper managed-to-native) UnityEngine.Resources.Load (string,System.Type) <0x00004>
    52.   at UnityEngine.Resources.Load<object> (string) [0x0000c] in /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/ResourcesBindings.gen.cs:59
    53.   at GameMainComponent/<Initialise>c__Iterator0.MoveNext () [0x000fc] in /home/x/Desktop/warringstates/unity/Assets/Game/Scripts/GameMainComponent.cs:92
    54.   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator,intptr) [0x00028] in /home/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17
    55.   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object_intptr (object,intptr,intptr,intptr) <IL 0x00022, 0x0009d>
    56.   at (wrapper managed-to-native) UnityEngine.MonoBehaviour.StartCoroutine_Auto_Internal (System.Collections.IEnumerator) <0x00004>
    57.   at (wrapper managed-to-native) UnityEngine.MonoBehaviour.StartCoroutine_Auto_Internal (System.Collections.IEnumerator) <0x00004>
    58.   at UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator) [0x00003] in /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/MonoBehaviourBindings.gen.cs:62
    59.   at GameMainComponent.Awake () [0x00025] in /home/x/Desktop/warringstates/unity/Assets/Game/Scripts/GameMainComponent.cs:41
    60.   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0001c, 0x0008e>
    61.  
    62. Native stacktrace:
    63.  
    64.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(+0x8a0b8) [0xf2aba0b8]
    65.    [0xf7fb5de0]
    66.    [0xf7fb5db9]
    67.    /lib/i386-linux-gnu/libc.so.6(gsignal+0xc2) [0xf7b1c7e2]
    68.    /lib/i386-linux-gnu/libc.so.6(abort+0x161) [0xf7b1df51]
    69.    ./LinuxBuild.x86() [0x8ccf159]
    70.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(+0xbc060) [0xf2aec060]
    71.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(+0x22052) [0xf2a52052]
    72.    [0xf7fb5de0]
    73.    ./LinuxBuild.x86() [0x81f5cda]
    74.    ./LinuxBuild.x86() [0x81f72d9]
    75.    ./LinuxBuild.x86() [0x81f4cbf]
    76.    ./LinuxBuild.x86() [0x8d35750]
    77.    ./LinuxBuild.x86() [0x8d1eef0]
    78.    ./LinuxBuild.x86() [0x8d1f102]
    79.    ./LinuxBuild.x86() [0x8d21dec]
    80.    ./LinuxBuild.x86() [0x81d8d07]
    81.    ./LinuxBuild.x86() [0x8da7e28]
    82.    [0xee6ad338]
    83.    [0xee694b86]
    84.    [0xf311df24]
    85.    [0xecceb06b]
    86.    [0xecceb12e]
    87.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(+0x2601b) [0xf2a5601b]
    88.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(mono_runtime_invoke+0x66) [0xf2b57c05]
    89.    ./LinuxBuild.x86() [0x8c857c2]
    90.    ./LinuxBuild.x86() [0x8cfeccf]
    91.    ./LinuxBuild.x86() [0x8cc0cd4]
    92.    ./LinuxBuild.x86() [0x8cc1942]
    93.    ./LinuxBuild.x86() [0x8cc7e10]
    94.    ./LinuxBuild.x86() [0x8cc8190]
    95.    ./LinuxBuild.x86() [0x8dbb845]
    96.    [0xecceaf21]
    97.    [0xecceae6f]
    98.    [0xf311d838]
    99.    [0xf0d03907]
    100.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(+0x2601b) [0xf2a5601b]
    101.    /home/x/Desktop/warringstates/unity/BuildLinux/LinuxBuild_Data/Mono/x86/libmono.so(mono_runtime_invoke+0x66) [0xf2b57c05]
    102.    ./LinuxBuild.x86() [0x8c857c2]
    103.    ./LinuxBuild.x86() [0x8cfeccf]
    104.    ./LinuxBuild.x86() [0x8cff710]
    105.    ./LinuxBuild.x86() [0x8cc6b8a]
    106.    ./LinuxBuild.x86() [0x8cc7158]
    107.    ./LinuxBuild.x86() [0x8ccc7cb]
    108.    ./LinuxBuild.x86() [0x8d08ec2]
    109.    ./LinuxBuild.x86() [0x88cb3f1]
    110.    ./LinuxBuild.x86() [0x88cda44]
    111.    ./LinuxBuild.x86() [0x88ce5a8]
    112.    ./LinuxBuild.x86() [0x88cec2c]
    113.    ./LinuxBuild.x86() [0x887f0df]
    114.    ./LinuxBuild.x86() [0x88613dd]
    115.    ./LinuxBuild.x86() [0x80d8c8c]
    116.    /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf7b07986]
    117.    ./LinuxBuild.x86() [0x80e5a79]
    118.  
    119. Debug info from gdb:
    120.  
    121. I refuse to debug myself!
    122. No threads.
    123.  
    124. =================================================================
    125. Got a SIGABRT while executing native code. This usually indicates
    126. a fatal error in the mono runtime or one of the native libraries
    127. used by your application.
    128. =================================================================
    129.  
    130. Aborted (core dumped)
    Definitely seems to crash the moment I do any kind of runtime asset loading.

    I should add, it runs fine on Mac and Windows.
     
  4. topherr

    topherr

    Joined:
    Jun 1, 2013
    Posts:
    25
    In the end, it was a ScriptableObject instance we had in the Resources folder that caused the hard crash (just by being there) on Linux ONLY when any asset was accessed from Resources.

    There is clearly a major issue in the Linux code here, but we have a work-around so, whatever. Good luck.
     
  5. PJayB

    PJayB

    Unity Technologies

    Joined:
    Apr 24, 2017
    Posts:
    105
    Thanks for the thorough investigation. Please can you submit a repro project via the Editor Bug Reporter?