0.48 segfault on startup with both stable OSG 3.6.5 and forked/vendored OSG
testing the new 0.48 release in my environment, i get as far as loading screen; just before getting to main menu, i get a segfault within OSG:
$ lldb openmw
(lldb) target create "openmw"
Current executable set to '/usr/bin/openmw' (x86_64).
(lldb) run
Process 8779 launched: '/usr/bin/openmw' (x86_64)
Loading config file: /etc/openmw/openmw.cfg
Loading config file: /home/q66/.config/openmw/openmw.cfg
Logs dir: /home/q66/.config/openmw/
User data dir: /home/q66/.local/share/openmw/
Screenshots dir: /home/q66/.local/share/openmw/screenshots
Loading settings file: /etc/openmw/defaults.bin
Loading settings file: /home/q66/.config/openmw/settings.cfg
[00:15:59.580 I] OpenMW version 0.48.0
[00:15:59.580 I] Using default (English) font encoding.
[00:15:59.580 W] No such dir: "/home/q66/.local/share/openmw/data"
[00:15:59.581 I] OSG version: 3.6.5
[00:15:59.581 I] SDL version: 2.28.1
[00:15:59.581 I] Loading shader settings file: "/home/q66/.config/openmw/shaders.yaml"
[00:16:02.244 I] OpenGL Vendor: Intel
[00:16:02.245 I] OpenGL Renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
[00:16:02.245 I] OpenGL Version: 4.6 (Compatibility Profile) Mesa 23.1.4
[00:16:02.245 I] Using reverse-z depth buffer
[00:16:02.247 I] Adding BSA archive /home/q66/Morrowind/Data Files/Morrowind.bsa
[00:16:02.250 I] Adding BSA archive /home/q66/Morrowind/Data Files/Tribunal.bsa
[00:16:02.251 I] Adding BSA archive /home/q66/Morrowind/Data Files/Bloodmoon.bsa
[00:16:02.251 I] Adding data directory /usr/share/games/openmw/resources/vfs
[00:16:02.251 I] Adding data directory /home/q66/Morrowind/Data Files
[00:16:02.352 I] Lua version: Lua 5.1.5
[00:16:02.352 I] Loading keybindings file: /home/q66/.config/openmw/input_v3.xml
[00:16:02.357 I] Loading font file magic_cards_regular.fnt
[00:16:02.367 I] Loading font file daedric_font.fnt
[00:16:02.374 I] Loading font file DejaVuLGCSansMono.omwfont
[00:16:02.435 I] Initializing OpenAL...
[00:16:02.908 I] Opened "USB-C to 3.5mm Headphone Jack Adapter Stereo"
[00:16:02.908 I] ALC Version: 1.1
[00:16:02.908 I] ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
[00:16:02.974 I] Vendor: OpenAL Community
[00:16:02.974 I] Renderer: OpenAL Soft
[00:16:02.974 I] Version: 1.1 ALSOFT 1.23.1
[00:16:02.974 I] Extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STATIC_BUFFER AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_buffer_length_query AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFT_source_start_delay AL_SOFT_UHJ AL_SOFT_UHJ_ex
[00:16:02.974 I] HRTF disabled
[00:16:02.974 I] Allocated 256 sound sources
[00:16:02.974 I] Low-pass filter supported
[00:16:02.974 I] EAX Reverb supported
[00:16:02.974 I] Enumerated output devices:
[00:16:02.974 I] USB-C to 3.5mm Headphone Jack Adapter Stereo Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 2 Output Tiger Lake-LP Smart Sound Technology Audio Controller Speaker + Headphones Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 3 Output Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 1 Output
[00:16:02.976 I] Enumerated HRTF names:
[00:16:02.976 I] Default HRTF Built-In HRTF
Input #0, bink, from 'video\bethesda logo.bik':
Duration: 00:00:16.00, start: 0.000000, bitrate: 2324 kb/s
Stream #0:0[0x0]: Video: binkvideo (BIKi / 0x694B4942), yuv420p(tv), 640x480, 30.06 fps, 30.06 tbr, 30.06 tbn
Stream #0:1[0x0]: Audio: binkaudio_rdft, 44100 Hz, stereo, flt
[00:16:05.749 I] Loading content file builtin.omwscripts
[00:16:05.749 I] Loading content file Morrowind.esm
[00:16:06.084 I] Loading content file Tribunal.esm
[00:16:06.130 I] Loading content file Bloodmoon.esm
[00:16:06.495 I] Using 1 async physics threads
[00:16:06.502 V] Using idle priority for thread=140736672406320
[00:16:06.506 V] Disabling Multiview (disabled by config)
[00:16:06.520 I] Preferred locales: en
[00:16:06.602 V] Fallback locale: en
[00:16:06.603 V] Language file "l10n/SettingsMenu/en.yaml" is enabled
[00:16:06.634 V] Fallback locale: en
[00:16:06.635 V] Language file "l10n/DebugMenu/en.yaml" is enabled
[00:16:06.636 V] Fallback locale: en
[00:16:06.636 V] Language file "l10n/PostProcessing/en.yaml" is enabled
[00:16:06.652 V] Lua scripts configuration (8 scripts):
[00:16:06.652 V] #0 PLAYER : scripts/omw/mwui/init.lua
[00:16:06.652 V] #1 GLOBAL : scripts/omw/settings/global.lua
[00:16:06.652 V] #2 PLAYER : scripts/omw/settings/player.lua
[00:16:06.652 V] #3 PLAYER : scripts/omw/camera/camera.lua
[00:16:06.652 V] #4 NPC CREATURE : scripts/omw/ai.lua
[00:16:06.652 V] #5 PLAYER : scripts/omw/console/player.lua
[00:16:06.652 V] #6 GLOBAL : scripts/omw/console/global.lua
[00:16:06.652 V] #7 CUSTOM : scripts/omw/console/local.lua
[00:16:06.709 I] Playing music/special/morrowind title.mp3
Process 8779 stopped
* thread #11, name = 'openmw', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
frame #0: 0x0000000000000000
error: memory read failed for 0x0
(lldb) bt
* thread #11, name = 'openmw', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
* frame #0: 0x0000000000000000
frame #1: 0x00007fffeee71e10 libosg.so.161`osg::State::apply(osg::StateSet const*) at State:1190:28
frame #2: 0x00007fffeee71de8 libosg.so.161`osg::State::apply(osg::StateSet const*) at State:1942:17
frame #3: 0x00007fffeee71da2 libosg.so.161`osg::State::apply(this=0x00007fffe7b17be0, dstate=0x00007fffe86f9d30) at State.cpp:714:9
frame #4: 0x00007fffef1c6e65 libosgUtil.so.161`osgUtil::RenderLeaf::render(this=0x00007fffc85108d0, renderInfo=0x00007fffd8ea06c0, previous=<unavailable>) at RenderLeaf.cpp:0
frame #5: 0x00007fffef1c1de1 libosgUtil.so.161`osgUtil::RenderBin::drawImplementation(this=0x00007fffe81ee170, renderInfo=0x00007fffd8ea06c0, previous=0x00007fffd8ea0798) at RenderBin.cpp:487:21
frame #6: 0x00007fffef1ccb1f libosgUtil.so.161`osgUtil::RenderStage::drawImplementation(this=0x00007fffe81ee170, renderInfo=0x00007fffd8ea06c0, previous=0x00007fffd8ea0798) at RenderStage.cpp:1406:16
frame #7: 0x00007fffef1cb3cb libosgUtil.so.161`osgUtil::RenderStage::drawInner(osg::RenderInfo&, osgUtil::RenderLeaf*&, bool&) [inlined] osgUtil::RenderBin::draw(this=0x00007fffe81ee170, renderInfo=0x00007fffd8ea06c0, previous=0x00007fffd8ea0798) at RenderBin.cpp:430:10
frame #8: 0x00007fffef1cb391 libosgUtil.so.161`osgUtil::RenderStage::drawInner(this=0x00007fffe81ee170, renderInfo=0x00007fffd8ea06c0, previous=0x00007fffd8ea0798, doCopyTexture=0x00007fffd8ea06bf) at RenderStage.cpp:931:16
frame #9: 0x00007fffef1cc27b libosgUtil.so.161`osgUtil::RenderStage::draw(this=0x00007fffe81ee170, renderInfo=0x00007fffe8203f10, previous=0x00007fffd8ea0798) at RenderStage.cpp:1242:9
frame #10: 0x00007fffef1c8fc4 libosgUtil.so.161`osgUtil::RenderStage::drawPreRenderStages(this=<unavailable>, renderInfo=0x00007fffe8203f10, previous=0x00007fffd8ea0798) at RenderStage.cpp:222:22
frame #11: 0x00007fffef1d5ad2 libosgUtil.so.161`osgUtil::SceneView::draw(this=0x00007fffe8203e80) at SceneView.cpp:0
frame #12: 0x00007fffef484bdf libosgViewer.so.161`osgViewer::Renderer::draw(this=0x00007fffef7103f0) at Renderer.cpp:797:24
frame #13: 0x00007fffeedb7c61 libosg.so.161`osg::GraphicsContext::runOperations(this=0x00007fffe8606470) at GraphicsContext.cpp:696:36
frame #14: 0x00007fffeee2dfce libosg.so.161`osg::OperationThread::run(this=0x00007fffec12d7f0) at OperationThread.cpp:438:13
frame #15: 0x00007fffeedbc2a7 libosg.so.161`osg::GraphicsThread::run(this=0x00007fffec12d7f0) at GraphicsThread.cpp:38:22
frame #16: 0x00007fffef82331d libOpenThreads.so.21`OpenThreads::ThreadPrivateActions::StartThread(data=0x00007fffec12d7f0) at PThread.cpp:221:17
My environment is openmw 0.48, OSG 3.6.5, both built with clang 16, musl libc 1.2.4, on Chimera Linux, mesa 23.1.4. The GPU is Intel Xe in i7-1165G on x86_64 arch, I will try reproducing on other hardware later, but it also reproduces when llvmpipe is forced, so it does not seem to be a driver problem (and 0.47 worked fine). The assets are taken straight from Steam. The 0.47 release worked without issues (this is just a direct update). OSG patches: https://github.com/chimera-linux/cports/tree/master/contrib/openscenegraph/patches (likely nothing relevant), openmw patches: https://github.com/chimera-linux/cports/tree/openmw-048/contrib/openmw/patches (none for the engine)
The last frame with line numbers references https://github.com/openscenegraph/OpenSceneGraph/blob/OpenSceneGraph-3.6.5/include/osg/State#L1190
I can't generate the standard log because I don't have gdb available, but there probably wouldn't be anything more relevant in it. Tried fresh settings with re-import via launcher, no changes.