#[Linux][Native] Segmentation fault during initial resource loading (Solved)

1 messages · Page 1 of 1 (latest)

quick slate
#

Game window does initialize and I can see load progress, until it crashes when trying to load certain resource.
Steam file integrity check is passed without errors

stdout:

[000002561][WAR]: [LUNA] Success in loading [events/chaos/gamemode_chaos128.png]
[000002561][WAR]: [LUNA] Success in loading [events/tagteam/gamemode_tag128.png]
[000002561][WAR]: [LUNA] Success in loading [fbfadd/CSelect.png]
[000002594][WAR]: [LUNA] Success in loading [fbfadd/CSelect_a.png]
./100orange.sh: line 4: 31104 Segmentation fault      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" ./100orange "$@"

dmesg:

[25370.692186] 100orange[31114]: segfault at 998 ip 0000731efd019b29 sp 0000731ef0bfaab8 error 4 in libGLdispatch.so.0.0.0[44b29,731efd019000+3b000] likely on CPU 6 (core 6, socket 1)
[25370.692201] Code: 00 f3 0f 1e fa 48 8b 05 15 a4 06 00 64 4c 8b 18 41 ff a3 c0 02 00 00 66 2e 0f 1f 84 00 00 00 00 00 64 48 8b 04 25 c0 fd ff ff <ff> a0 98 09 00 00 41 ff a3 c8 02 00 00 66 2e 0f 1f 84 00 00 00 00

gdb: (no aslr)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5df2b29 in ?? () from /usr/lib/libGLdispatch.so.0
(gdb) bt
#0  0x00007ffff5df2b29 in ?? () from /usr/lib/libGLdispatch.so.0
#1  0x0000555556cac8d5 in ?? ()
#2  0x0000555556d7991e in ?? ()
#3  0x00005555564f8e47 in ?? ()
#4  0x00005555565005e1 in ?? ()
#5  0x00005555562cd129 in ?? ()
#6  0x0000555556f8c80f in ?? ()
#7  0x00007ffff77aa0bb in ?? () from /usr/lib/libc.so.6
#8  0x00007ffff782a38c in ?? () from /usr/lib/libc.so.6
(gdb)

Artix Linux
FX-8350
GTX 1660, NVIDIA driver 570.133.07-2
X11/dwm

honest spade
#

create a copy of the 100orange.sh script, and edit the call to the following:
__GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" ./100orange "$@"
don't forget to check if the script is executable
in Steam in the library, right-click the game, Properties, General, and put the following command:
"/home/username/.steam/steam/steamapps/common/100 Orange Juice/your_script.sh" %command%

this way you can play 3.25.0 with proprietary driver, it switches nvidia's broken OpenGL to an OpenGL-to-Vulkan layer using Zink

quick slate
# honest spade create a copy of the 100orange.sh script, and edit the call to the following: `_...

Thank you for reply. I tried your solution and unfortunately it does not work as it is - DRI3 not supported, I think I'll need different driver for that.
I tried just the MESA_LOADER_DRIVER_OVERRIDE=zink instead and it did managed to start, I checked window state with mangohud so it was Vulkan alright.

But the game still crashes at the same spot as before so I'm not entirely sure it's driver related.

honest spade
#

you're not the first to report issues with DRI3

#

the proprietary driver does not (yet) support DRI3 extension, only DRI2, but it doesn't work as fallback

quick slate
#

I thought proprietary driver is missing DRI entirely (even if reports DRI2 support), because it's mesa feature and I need something like nouveau to make use of that

#

Anyway, I would switch to proton version, but there's a thread already about it being non-functional as well

honest spade
#

would your GPU benefit more from nouveau than from binary drivers? I know my 4060 doesn't

#

since you have an FX-8350, there is no integrated GPU you could've used as fallback for OJ

quick slate
#

No, there isn't and nouveau is too fiddly, between crashes and framerate drops I never managed to use it as daily driver (lol)

honest spade
#

what you instead could use is adding LIBGL_DRI3_DISABLE=true to what I posted in my first reply

quick slate
#

Sadly, still complains about missing DRI3

honest spade
#

ugh, sadly I cannot test this myself since my 4060 runs without throwing a DRI3 error on mesa (using 570.133.07)
you can ask @lavish moat if they found a solution, since this user also ran into the same issue with DRI3

quick slate
#

Thank you; I'll wait to see if they find time to visit this thread.

lavish moat
#

I use a 3090 and I've tried reinstalling the drivers, hell even tried running it with windows build with proton ge 26 and still no luck

icy rune
#

Some people had luck using SDL_HINT_OPENGL_LIBRARY to set directly libGL.so.1, apparently this can bypass the NVIDIA dispatch library. My plan was to start shipping ES 2.0 on Linux too to maybe bypass if the issue pertains more the Desktop GL driver, but the Steam Overlay is a pain (basically it forcibly tries to call legacy GL functions to work, that messes with the state a lot, but even more on ES 2.0 that fully deprecated those functions) (but even a normal desktop GL will end messed up with if its created with the Core profile) this messes with the game rendering AND doesn't render the overlay at all.
I was able to pinpoint it dying on a glTexImage2D call, but they are all fine on all OSs and vendors MINUS some Nvidia GPUs + Linux + too recent of a driver

quick slate
#

The game works using software GL inside Xephyr

Xephyr -br -ac -noreset -screen 1600x900 :1
DISPLAY=:1 openbox

Although framerate is about 20-ish on my CPU, I'll use it as workaround until issue gets resolved.
Thank you all.

honest spade
#

updated nvidia-dkms to 570.144 and still have to use my workaround

azure field
#

I also have this issue on my CachyOS with proprietary Nvidia driver. Is there any fix or workaround for now?

honest spade
#

depends on what model your GPU is
if it's an RTX 30 or 40 series, you can use my workaround with Zink posted above
if it's any other series, no idea
apparently it works with using nouveau instead of proprietary on all generations

lavish moat
#

I cant get to work on 30 series yet

azure field
#

I have 40 series GPU

vital wyvern
azure field
#

I'll try it later again. I tried once and got some errors.

azure field
#
$ __GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" ./100orange
[S_API] SteamAPI_Init(): Loaded '/home/<redacted>/.local/share/Steam/linux64/steamclient.so' OK.
[000000000][INF]: Initializing raylib 5.6-dev
[000000000][INF]: Platform backend: DESKTOP (SDL)
[000000000][INF]: Supported raylib modules:
[000000000][INF]:     > rcore:..... loaded (mandatory)
[000000000][INF]:     > rlgl:...... loaded (mandatory)
[000000000][INF]:     > rshapes:... loaded (optional)
[000000000][INF]:     > rtextures:. loaded (optional)
[000000000][INF]:     > rtext:..... loaded (optional)
[000000000][INF]:     > rmodels:... loaded (optional)
[000000000][INF]:     > raudio:.... not loaded (optional)
DRI3 not available
DRI3 not available
DRI3 not available

I am using proprietary drivers. How should I change the variables?

honest spade
#

what's the driver version?
I'm also running on pure Arch Linux, not a derivative

azure field
#

570.144

#

for the first two ones I guess it should be __GLX_VENDOR_LIBRARY_NAME=nvidia and __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json

#

MESA_LOADER_DRIVER_OVERRIDE and GALLIUM_DRIVER are mesa-specific, right?

#

should I include any other variables?

#

I mean, I tried

$ __GLX_VENDOR_LIBRARY_NAME=nvidia __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" ./100orange
#

But I got the SIGSEGV (Address boundary error)

honest spade
#

no, because that assumes you use nouveau

#

mesa itself is not supported on nvidia closed-source (they have their own implementation), that's why we let it run on Vulkan instead

azure field
#

So I need to get the game running on Vulkan, right?

honest spade
#

that's what zink does (using my full command line), but for you mesa reports DRI3 being unavailable

#

do you have an Intel CPU?

azure field
#

nope, it's an AMD CPU (pretty old)

#

Ryen 1600 AF

#

Did I not install something I should?

honest spade
#

packages nvidia-utils and vulkan-icd-loader

#

nvidia-utils provides the Vulkan driver, and vulkan-icd-loader is a client driver

#

I looked at the CachyOS wiki, and could not find any usable informations on how to install and configure NVIDIA drivers, unlike the Arch wiki, where I took those package informations from

azure field
#

I mostly use Arch wiki and CachyOS uses Arch packages. It only has additional repos with optimized builds for some packages.

azure field
#

also the 32-bit variants: lib32-nvidia-utils and lib32-vulkan-icd-loader

lavish moat
#

okay so by adding LIBGL_KOPPER_DRI2=true to the env variables it disables DRI3 to the launch but now it seems that vulkan cant find my GPU

honest spade
#

see above with nvidia-utils and vulkan-icd-loader

lavish moat
#

restart and its fixed

#

and working

#

# This is required for OJ to load
__GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" LIBGL_KOPPER_DRI2=true ./100orange ./100orange "$@"
honest spade
#

that's one ./100orange too much

lavish moat
#

Huh, just noticed that but hey it works xD

honest spade
#

pinging the OP to try out: @quick slate

quick slate
#

[Linux][Native] Segmentation fault during initial resource loading (Solved)

azure field