Segmentation fault in glDeleteTextures XXX/nvidia/lib/libGL.so.1


#1

Hi, i have a problem when i try to start retroarch with the xmb menu driver. It crashes every time. Thread 1 “retroarch” received signal SIGSEGV, Segmentation fault. 0x00007ffff3ad5989 in glDeleteTextures () from /usr/lib64/opengl/nvidia/lib/libGL.so.1 I use Gentoo as operating system and retroarch compiled from git. any help would be appreciated

thank you christian

Starting program: /usr/local/bin/retroarch
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[INFO] RetroArch 1.7.3 (Git a4144dfe9b)
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4
Built: Jun  9 2018
[INFO] Version: 1.7.3
[INFO] Git: a4144dfe9b
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Redirecting save file to "/mnt/data/public/emu/retroarch/savefile/.srm".
[INFO] Redirecting savestate to "/mnt/data/public/emu/retroarch/savestate/.state".
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 30000.01 Hz.
[INFO] [Video]: Video @ 1920x1080
[INFO] [Video]: Starting threaded video driver ...
[New Thread 0x7fffe701c700 (LWP 3445)]
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 1920x1080.
[INFO] [GLX]: Window manager is Xfwm4.
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [GLX]: Using Xinerama on screen #0.
[INFO] [GLX]: X = 0, Y = 0, W = 1920, H = 1080.
[INFO] [GLX]: Using windowed fullscreen.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GLX]: glXSwapIntervalEXT(1)
[INFO] [GL]: Vendor: NVIDIA Corporation, Renderer: GeForce GT 610/PCIe/SSE2.
[INFO] [GL]: Version: 4.6.0 NVIDIA 390.42.
[INFO] [GL]: Using resolution 1920x1080
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[INFO] Watching file for changes: /home/vdr/.config/retroarch/shaders/retroarch.glslp
[INFO] Watching file for changes: /home/vdr/.config/retroarch/shaders/shaders_glsl/anti-aliasing/shaders/advanced-aa.glsl
[INFO] Watching file for changes: /home/vdr/.config/retroarch/shaders/shaders_glsl/stock.glsl
[INFO] Found #pragma parameter AA Input Res X (AA_RESOLUTION_X) 0.000000 0.000000 1920.000000 1.000000
[INFO] Found #pragma parameter AA Input Res Y (AA_RESOLUTION_Y) 0.000000 0.000000 1920.000000 1.000000
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Setting up menu pipeline shaders for XMB ...
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Resetting shader to defaults ...
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 2 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [GL]: Creating FBO 0 @ 1024x1024
[INFO] [udev]: Keyboard #0 (/dev/input/event8).
[INFO] [udev]: Keyboard #1 (/dev/input/event11).
[INFO] [udev]: Mouse #0 (/dev/input/event9).
[INFO] [udev]: Mouse #1 (/dev/input/mouse0).
[INFO] [udev]: Mouse #2 (/dev/input/event12).
[INFO] [udev]: Mouse #3 (/dev/input/mouse1).
[INFO] [udev]: Plugged pad: AliTV Remote V1 Airmouse (3141:13393) on port #0.
[INFO] [udev]: Pad #0 (/dev/input/event10) supports 0 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Font]: Using font rendering backend: bitmap.
[INFO] [Video]: Found display server: x11
[INFO] Found shader "/home/vdr/.config/retroarch/shaders/retroarch.glslp"
[New Thread 0x7fffdffff700 (LWP 3446)]
[New Thread 0x7fffdf7fe700 (LWP 3447)]
[INFO] [SDL audio]: Requested 85 ms latency, got 92 ms
[WARN] Audio rate control was desired, but driver does not support needed features.
[INFO] [Menu]: Found menu display driver: "menu_display_gl".
[INFO] Watching file for changes: /home/vdr/.config/retroarch/shaders/retroarch.glslp
[INFO] Watching file for changes: /home/vdr/.config/retroarch/shaders/shaders_glsl/anti-aliasing/shaders/advanced-aa.glsl
[INFO] Watching file for changes: /home/vdr/.config/retroarch/shaders/shaders_glsl/stock.glsl
[INFO] Found #pragma parameter AA Input Res X (AA_RESOLUTION_X) 0.000000 0.000000 1920.000000 1.000000
[INFO] Found #pragma parameter AA Input Res Y (AA_RESOLUTION_Y) 0.000000 0.000000 1920.000000 1.000000
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x00007ffff3ad5989 in glDeleteTextures () from /usr/lib64/opengl/nvidia/lib/libGL.so.1
(gdb) bt
#0  0x00007ffff3ad5989 in glDeleteTextures () from /usr/lib64/opengl/nvidia/lib/libGL.so.1
#1  0x000055555572ae93 in gl_unload_texture ()
#2  0x00005555555ee457 in video_driver_texture_unload ()
#3  0x00005555556bbbf9 in menu_display_allocate_white_texture ()
#4  0x00005555556b40a4 in xmb_context_reset.part ()
#5  0x00005555556bcc56 in menu_driver_init ()
#6  0x00005555555f2632 in drivers_init ()
#7  0x000055555559ca63 in retroarch_main_init ()
#8  0x00005555555aeed4 in content_load ()
#9  0x00005555555af2a9 in task_load_content ()
#10 0x00005555555afdaa in task_load_content_callback.constprop ()
#11 0x0000555555596edb in rarch_main ()
#12 0x00007ffff0281f0a in __libc_start_main () from /lib64/libc.so.6
#13 0x0000555555593c1a in _start ()

ps.: sorry for my bad english…


#2

It’s never happened to me, but bparker06 said he’s seen it before and it’s just caused by some settings conflict. Can you try moving your ~/.config/retroarch/retroarch.cfg to another directory temporarily to see if that fixes it?


#3

Hi, the problem is: video_threaded = “true” if i set this, it crashes but i have to set it for better sound quality however, the main problem is that i have to use sdl2 as sound driver, alsa and tinyalsa are also not working

Is there any chance to solve any of this problems?

thank you

christian


#4

Yeah, non-threaded video with alsa should work. Can you get a log of an alsa crash?


#5

Hello, alsa does not crash, i simply have no sound. Actually, the main application tells me that the default device is in use but starts and have sound: vdr[3083]: audio/alsa: playback open ‘default’ error: Das Gerät oder die Ressource ist belegt I am using sound by my nvidia graphics card. my /etc/asound.conf:

defaults.pcm.card 1
defaults.ctl.card 1
pcm.!default {
        type hw
        card NVidia
        device 7
}

vdr ~ # aplay -L

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=Intel
    HDA Intel, ALC887-VD Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    Front speakers
surround21:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output

Thank you in advance

Christian


#6

There should also be a pulse audio driver (though you may not have compiled it in, if it’s not showing). Have you tried it?


#7

Hi, pulseaudio is surprisingly working… but it still sounds bad…

Jun 15 20:25:57 vdr rtkit-daemon[3878]: Supervising 0 threads of 0 processes of 1 users. Jun 15 22:25:57 vdr dbus-daemon[2844]: [system] Rejected send message, 2 matched rules; type=“method_call”, sender=":1.99" (uid=1001 pid=4780 comm=“pulseaudio --start “) interface=“org.freedesktop.DBus.ObjectManager” member=“GetManagedObjects” error name=”(unset)” requested_reply=“0” destination=“org.bluez” (uid=0 pid=2875 comm="/usr/libexec/bluetooth/bluetoothd “) Jun 15 22:25:57 vdr pulseaudio[4780]: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type=“method_call”, sender=”:1.99" (uid=1001 pid=4780 comm=“pulseaudio --start “) interface=“org.freedesktop.DBus.ObjectManager” member=“GetManagedObjects” error name=”(unset)” requested_reply=“0” destination=“org.bluez” (uid=0 pid=2875 comm="/usr/libexec/bluetooth/bluetoothd ") Jun 15 22:26:09 vdr kernel: sony 0005:054C:0268.0009: unknown main item tag 0x0 Jun 15 22:26:09 vdr kernel: input: Sony PLAYSTATION®3 Controller Motion Sensors as /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/bluetooth/hci0/hci0:69/0005:054C:0268.0009/input/input21 Jun 15 22:26:09 vdr kernel: input: Sony PLAYSTATION®3 Controller as /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/bluetooth/hci0/hci0:69/0005:054C:0268.0009/input/input20 Jun 15 22:26:09 vdr kernel: sony 0005:054C:0268.0009: input,hidraw6: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION®3 Controller] on 00:1a:7d:da:71:11 Jun 15 22:26:25 vdr pulseaudio[4780]: [alsa-sink-HDMI 1] alsa-sink.c: ALSA weckte uns auf, um neue Daten auf das Gerät zu schreiben, doch es gab nichts zum Schreiben! Jun 15 22:26:25 vdr pulseaudio[4780]: [alsa-sink-HDMI 1] alsa-sink.c: Dies ist höchstwahrscheinlich ein Fehler im ALSA-Treiber »snd_hda_intel«. Bitte melden Sie diesen Fehler den ALSA-Entwicklern. Jun 15 22:26:25 vdr pulseaudio[4780]: [alsa-sink-HDMI 1] alsa-sink.c: Wir wurden durch das POLLOUT-Set geweckt, allerdings lieferte ein anschließender snd_pcm_avail() den Wert 0 oder einen anderen Wert < min_avail.

Are there any suggestions on how to configure pulseaudio for retroarch?

Thank you :slight_smile: Christian


#8

Can you elaborate on “sounds bad”? Is it crackling a lot? If so, which cores have you tried?

I ask because crackling audio can be indicative of sync issues or simply not being able to maintain full speed (i.e., ~60 fps).


#9

Yes, it´s like synchronization Problem. CPU Load is about 30% by retroarch and 13 % by X on Mame running Ninja Worriers for example.

Christian


#10

Hi, just a short update i think the sound is now better, but not perfect. Not sure where the problem is. Nvidia Drivers? Pulseaudio? Libretro?

Many thanks for your help

christian


#11

Hello, i think it´s time to close this thread and open a new one for the cracking sound…

However, the segfault happens with video_threaded = “true” and menu_driver = “xmb”


#12

This is cover by this issue.