Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RetroArch 1.6.1 crash on startup when GL driver used, SDL2 segfaults on load ROM #5188

Closed
eugene-s-nesdev opened this issue Jul 20, 2017 · 13 comments

Comments

@eugene-s-nesdev
Copy link

eugene-s-nesdev commented Jul 20, 2017

RetroArch 1.6.1 crash on startup when GL driver used.
Need to KILL RetroArch via LXTask.

OS: lubuntu 14.04.1 x86
Hardware: Asus eeePC 1015PEM
Temporary solve: change videodriver to SDL2 in retroarch.cfg
note: old RetroArch 1.3.6 works stable on this machine.

evgs@ASUS-1015PEM:~$ glxinfo | grep "OpenGL version"
OpenGL version string: 1.4 Mesa 11.2.0

evgs@ASUS-1015PEM:~$ retroarch --verbose
RetroArch [INFO] :: This is RetroArch version 1.6.1 (Git 681351c)
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jun 30 2017
RetroArch [INFO] :: Version: 1.6.1
RetroArch [INFO] :: Git: 681351c
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: [Config]: Loading default config.
RetroArch [INFO] :: [Config]: loading config from: (null).
RetroArch [INFO] :: Looking for config in: "/home/evgs/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Looking for config in: "/home/evgs/.retroarch.cfg".
RetroArch [WARN] :: Config: using skeleton config "/etc/retroarch.cfg" as base for a new config file.
RetroArch [WARN] :: Config: Created new config file in: "/home/evgs/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [INFO] :: Version of libretro API: 1
RetroArch [INFO] :: Compiled against API: 1
RetroArch [INFO] :: [Audio]: Set audio input rate to: 29970.03 Hz.
RetroArch [INFO] :: [Video]: Video @ 960x720
RetroArch [ERROR] :: [Wayland]: Failed to connect to Wayland server.
RetroArch [INFO] :: [GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...
RetroArch [INFO] :: [GL]: Found GL context: x
RetroArch [INFO] :: [GL]: Detecting screen resolution 1024x600.
RetroArch [INFO] :: [GLX]: X = 0, Y = 0, W = 960, H = 720.
RetroArch [INFO] :: [GLX]: Found swap function: glXSwapIntervalMESA.
RetroArch [INFO] :: [GLX]: glXSwapInterval(1)
RetroArch [INFO] :: [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) Pineview M x86/MMX/SSE2.
RetroArch [INFO] :: [GL]: Version: 1.4 Mesa 11.2.0.
RetroArch [INFO] :: [GL]: Using resolution 960x549
RetroArch [INFO] :: [GL]: Default shader backend found: glsl.
RetroArch [INFO] :: [Shader driver]: Using GLSL shader backend.
RetroArch [INFO] :: [GLSL]: Checking GLSL shader support ...
RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: Linker log: warning: Couldn't flatten if-statement.  This will likely result in software rasterization.

RetroArch [INFO] :: [GL]: Using 4 textures.
RetroArch [INFO] :: [GL]: Loaded 1 program(s).
RetroArch [INFO] :: [GL]: Using GL_RGB565 for texture uploads.
RetroArch [INFO] :: [Joypad]: Found joypad driver: "udev".
RetroArch [INFO] :: [Font]: Using font rendering backend: freetype.
RetroArch [ERROR] :: [DBus]: Failed to suspend screensaver via DBus.
RetroArch [INFO] :: [X11]: Suspending screensaver (X11, xdg-screensaver).
RetroArch [INFO] :: [PulseAudio]: Requested 24576 bytes buffer, got 18432.
RetroArch [INFO] :: [Menu]: Found menu display driver: "menu_display_gl".
RetroArch [INFO] :: [Config]: Saved new config to "/home/evgs/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: [Font]: Using font rendering backend: freetype.
RetroArch [INFO] :: [Font]: Using font rendering backend: freetype.
RetroArch [INFO] :: SRAM will not be saved.
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_history.lpl].
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_music_history.lpl].
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_image_history.lpl].
RetroArch [INFO] :: [GL]: VSync => on
RetroArch [INFO] :: [GLX]: glXSwapInterval(1)
RetroArch [INFO] :: [PulseAudio]: Unpausing.
RetroArch [INFO] :: [GL]: VSync => on
RetroArch [INFO] :: [GLX]: glXSwapInterval(1)
RetroArch [INFO] :: [PulseAudio]: Pausing.
@eugene-s-nesdev
Copy link
Author

eugene-s-nesdev commented Jul 20, 2017

Tried to switch to SDL2, there are segfault on load ROM:

fceumm:

evgs@ASUS-1015PEM:~$ retroarch --verbose
RetroArch [INFO] :: This is RetroArch version 1.6.1 (Git 681351c)
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jun 30 2017
RetroArch [INFO] :: Version: 1.6.1
RetroArch [INFO] :: Git: 681351c
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: [Config]: Loading default config.
RetroArch [INFO] :: [Config]: loading config from: (null).
RetroArch [INFO] :: Looking for config in: "/home/evgs/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [INFO] :: Version of libretro API: 1
RetroArch [INFO] :: Compiled against API: 1
RetroArch [INFO] :: [Audio]: Set audio input rate to: 29970.03 Hz.
RetroArch [INFO] :: [Video]: Video @ 640x480
RetroArch [INFO] :: [SDL2]: Available renderers (change with $SDL_RENDER_DRIVER):
RetroArch [INFO] :: 	opengl
RetroArch [INFO] :: 	opengles2
RetroArch [INFO] :: 	software
RetroArch [INFO] :: [SDL2]: Available displays:
RetroArch [INFO] :: 	Display #0 mode: 1024x600@60hz.
RetroArch [INFO] :: [SDL]: Creating window @ 640x480
RetroArch [INFO] :: [Font]: Using font rendering backend: freetype.
RetroArch [INFO] :: [X11]: Suspending screensaver (X11, xdg-screensaver).
RetroArch [INFO] :: [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
RetroArch [INFO] :: [Joypad]: Found joypad driver: "sdl2".
RetroArch [INFO] :: [SDL]: Input driver initialized.
RetroArch [INFO] :: [ALSA]: Using signed 16-bit format.
RetroArch [INFO] :: [ALSA]: Period size: 768 frames
RetroArch [INFO] :: [ALSA]: Buffer size: 3072 frames
RetroArch [INFO] :: [ALSA]: Can pause: yes.
RetroArch [INFO] :: SRAM will not be saved.
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_history.lpl].
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_music_history.lpl].
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_image_history.lpl].
RetroArch [INFO] :: Updating firmware status for: /home/evgs/Emulation/Retroarch/cores/fceumm_libretro.so on /home/evgs/Emulation/Retroarch/system
RetroArch [WARN] :: Firmware missing: disksys.rom
RetroArch [INFO] :: Using content: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes.
RetroArch [INFO] :: arg #0: retroarch
RetroArch [INFO] :: arg #1: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes
RetroArch [INFO] :: arg #2: -c
RetroArch [INFO] :: arg #3: /home/evgs/.config/retroarch/retroarch.cfg
RetroArch [INFO] :: arg #4: -L
RetroArch [INFO] :: arg #5: /home/evgs/Emulation/Retroarch/cores/fceumm_libretro.so
RetroArch [INFO] :: [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
RetroArch [INFO] :: Set config file to : /home/evgs/.config/retroarch/retroarch.cfg
RetroArch [INFO] :: This is RetroArch version 1.6.1 (Git 681351c)
RetroArch [INFO] :: Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].srm".
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jun 30 2017
RetroArch [INFO] :: Version: 1.6.1
RetroArch [INFO] :: Git: 681351c
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: Loading dynamic libretro core from: "/home/evgs/Emulation/Retroarch/cores/fceumm_libretro.so"
RetroArch [INFO] :: [overrides] no core-specific overrides found at /home/evgs/.config/retroarch/config/FCEUmm/FCEUmm.cfg.
RetroArch [INFO] :: [overrides] no game-specific overrides found at /home/evgs/.config/retroarch/config/FCEUmm/Alien 3 (U) [!].cfg.
RetroArch [INFO] :: Shaders: preset directory: /home/evgs/.config/retroarch/shaders/presets
RetroArch [INFO] :: Environ SET_VARIABLES.
RetroArch [INFO] :: Remaps: remap directory: /home/evgs/.config/retroarch/config/remaps
RetroArch [INFO] :: Remaps: no game-specific remap found at /home/evgs/.config/retroarch/config/remaps/FCEUmm/Alien 3 (U) [!].rmp.
RetroArch [INFO] :: Remaps: no core-specific remap found at /home/evgs/.config/retroarch/config/remaps/FCEUmm/FCEUmm.rmp.
RetroArch [INFO] :: Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].srm".
RetroArch [INFO] :: Environ GET_LOG_INTERFACE.
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [libretro INFO] :: Frontend supports RGB565 - will use that instead of XRGB1555.
RetroArch [INFO] :: Environ PERFORMANCE_LEVEL: 5.
RetroArch [INFO] :: Content loading skipped. Implementation will load it on its own.
RetroArch [INFO] :: Environ SET_INPUT_DESCRIPTORS:
RetroArch [INFO] :: 	RetroPad, User 1, Button "B (bottom)" => "B"
RetroArch [INFO] :: 	RetroPad, User 1, Button "Y (left)" => "Turbo B"
RetroArch [INFO] :: 	RetroPad, User 1, Button "Select" => "Select"
RetroArch [INFO] :: 	RetroPad, User 1, Button "Start" => "Start"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Up" => "D-Pad Up"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Down" => "D-Pad Down"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Left" => "D-Pad Left"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Right" => "D-Pad Right"
RetroArch [INFO] :: 	RetroPad, User 1, Button "A (right)" => "A"
RetroArch [INFO] :: 	RetroPad, User 1, Button "X (up)" => "Turbo A"
RetroArch [INFO] :: 	RetroPad, User 1, Button "L" => "(FDS) Disk Side Change"
RetroArch [INFO] :: 	RetroPad, User 1, Button "R" => "(FDS) Insert/Eject Disk"
RetroArch [INFO] :: 	RetroPad, User 1, Button "R2" => "(VSSystem) Insert Coin"
RetroArch [INFO] :: Environ SYSTEM_DIRECTORY: "/home/evgs/Emulation/Retroarch/system".
RetroArch [libretro INFO] :: Loading /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes...

RetroArch [libretro INFO] ::  PRG ROM:    8 x 16KiB
RetroArch [libretro INFO] ::  CHR ROM:   16 x  8KiB
RetroArch [libretro INFO] ::  ROM CRC32:  0xc527c297
RetroArch [libretro INFO] ::  ROM MD5:  0x76e7bc449ae572c68a9fc4f397901924
RetroArch [libretro INFO] ::  Mapper #:  4
RetroArch [libretro INFO] ::  Mapper name: MMC3
RetroArch [libretro INFO] ::  Mirroring: Horizontal
RetroArch [libretro INFO] ::  Battery-backed: No
RetroArch [libretro INFO] ::  Trained: No
RetroArch [libretro INFO] :: 
RetroArch [INFO] :: Environ GET_VARIABLE fceumm_palette:
RetroArch [INFO] :: 	asqrealc
RetroArch [INFO] :: Environ GET_VARIABLE fceumm_nospritelimit:
RetroArch [INFO] :: 	disabled
RetroArch [INFO] :: Environ GET_VARIABLE fceumm_overclocking:
RetroArch [INFO] :: 	disabled
RetroArch [INFO] :: Environ GET_VARIABLE fceumm_overscan:
RetroArch [INFO] :: 	enabled
RetroArch [INFO] :: Environ GET_VARIABLE fceumm_aspect:
RetroArch [INFO] :: 	8:7 PAR
RetroArch [INFO] :: Environ SET_GEOMETRY.
RetroArch [INFO] :: SET_GEOMETRY: 240x224, aspect: 1.224.
Segmentation fault
evgs@ASUS-1015PEM:~$ 

nestopia:

evgs@ASUS-1015PEM:~$ retroarch --verbose
RetroArch [INFO] :: This is RetroArch version 1.6.1 (Git 681351c)
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jun 30 2017
RetroArch [INFO] :: Version: 1.6.1
RetroArch [INFO] :: Git: 681351c
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: [Config]: Loading default config.
RetroArch [INFO] :: [Config]: loading config from: (null).
RetroArch [INFO] :: Looking for config in: "/home/evgs/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [INFO] :: Version of libretro API: 1
RetroArch [INFO] :: Compiled against API: 1
RetroArch [INFO] :: [Audio]: Set audio input rate to: 29970.03 Hz.
RetroArch [INFO] :: [Video]: Video @ 640x480
RetroArch [INFO] :: [SDL2]: Available renderers (change with $SDL_RENDER_DRIVER):
RetroArch [INFO] :: 	opengl
RetroArch [INFO] :: 	opengles2
RetroArch [INFO] :: 	software
RetroArch [INFO] :: [SDL2]: Available displays:
RetroArch [INFO] :: 	Display #0 mode: 1024x600@60hz.
RetroArch [INFO] :: [SDL]: Creating window @ 640x480
RetroArch [INFO] :: [Font]: Using font rendering backend: freetype.
RetroArch [INFO] :: [X11]: Suspending screensaver (X11, xdg-screensaver).
RetroArch [INFO] :: [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
RetroArch [INFO] :: [Joypad]: Found joypad driver: "sdl2".
RetroArch [INFO] :: [SDL]: Input driver initialized.
RetroArch [INFO] :: [ALSA]: Using signed 16-bit format.
RetroArch [INFO] :: [ALSA]: Period size: 768 frames
RetroArch [INFO] :: [ALSA]: Buffer size: 3072 frames
RetroArch [INFO] :: [ALSA]: Can pause: yes.
RetroArch [INFO] :: SRAM will not be saved.
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_history.lpl].
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_music_history.lpl].
RetroArch [INFO] :: Loading history file: [/home/evgs/.config/retroarch/content_image_history.lpl].
RetroArch [INFO] :: Updating firmware status for: /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so on /home/evgs/Emulation/Retroarch/system
RetroArch [WARN] :: Firmware missing: disksys.rom
RetroArch [INFO] :: Using content: /home/evgs/Emulation/ROMs/nes_roms/Castlevania (U) (PRG0) [t1].nes.
RetroArch [INFO] :: arg #0: retroarch
RetroArch [INFO] :: arg #1: /home/evgs/Emulation/ROMs/nes_roms/Castlevania (U) (PRG0) [t1].nes
RetroArch [INFO] :: arg #2: -c
RetroArch [INFO] :: arg #3: /home/evgs/.config/retroarch/retroarch.cfg
RetroArch [INFO] :: arg #4: -L
RetroArch [INFO] :: arg #5: /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
RetroArch [INFO] :: [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
RetroArch [INFO] :: Set config file to : /home/evgs/.config/retroarch/retroarch.cfg
RetroArch [INFO] :: This is RetroArch version 1.6.1 (Git 681351c)
RetroArch [INFO] :: Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Castlevania (U) (PRG0) [t1].srm".
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jun 30 2017
RetroArch [INFO] :: Version: 1.6.1
RetroArch [INFO] :: Git: 681351c
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: Loading dynamic libretro core from: "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so"
RetroArch [INFO] :: [overrides] no core-specific overrides found at /home/evgs/.config/retroarch/config/Nestopia/Nestopia.cfg.
RetroArch [INFO] :: [overrides] no game-specific overrides found at /home/evgs/.config/retroarch/config/Nestopia/Castlevania (U) (PRG0) [t1].cfg.
RetroArch [INFO] :: Shaders: preset directory: /home/evgs/.config/retroarch/shaders/presets
RetroArch [INFO] :: Environ SET_VARIABLES.
RetroArch [INFO] :: Remaps: remap directory: /home/evgs/.config/retroarch/config/remaps
RetroArch [INFO] :: Remaps: no game-specific remap found at /home/evgs/.config/retroarch/config/remaps/Nestopia/Castlevania (U) (PRG0) [t1].rmp.
RetroArch [INFO] :: Remaps: no core-specific remap found at /home/evgs/.config/retroarch/config/remaps/Nestopia/Nestopia.rmp.
RetroArch [INFO] :: Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Castlevania (U) (PRG0) [t1].srm".
RetroArch [INFO] :: Environ GET_LOG_INTERFACE.
RetroArch [INFO] :: Environ PERFORMANCE_LEVEL: 6.
RetroArch [INFO] :: Loading content file: /home/evgs/Emulation/ROMs/nes_roms/Castlevania (U) (PRG0) [t1].nes.
RetroArch [INFO] :: Did not find a valid content patch.
RetroArch [INFO] :: CRC32: 0x7e765ee2 .
RetroArch [INFO] :: Environ SET_INPUT_DESCRIPTORS:
RetroArch [INFO] :: 	RetroPad, User 1, Button "B (bottom)" => "B"
RetroArch [INFO] :: 	RetroPad, User 1, Button "Y (left)" => "Turbo B"
RetroArch [INFO] :: 	RetroPad, User 1, Button "Select" => "Select"
RetroArch [INFO] :: 	RetroPad, User 1, Button "Start" => "Start"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Up" => "D-Pad Up"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Down" => "D-Pad Down"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Left" => "D-Pad Left"
RetroArch [INFO] :: 	RetroPad, User 1, Button "D-Pad Right" => "D-Pad Right"
RetroArch [INFO] :: 	RetroPad, User 1, Button "A (right)" => "A"
RetroArch [INFO] :: 	RetroPad, User 1, Button "X (up)" => "Turbo A"
RetroArch [INFO] :: 	RetroPad, User 1, Button "L" => "(FDS) Disk Side Change"
RetroArch [INFO] :: 	RetroPad, User 1, Button "R" => "(FDS) Eject Disk"
RetroArch [INFO] :: 	RetroPad, User 1, Button "L2" => "(VSSystem) Coin 1"
RetroArch [INFO] :: 	RetroPad, User 1, Button "R2" => "(VSSystem) Coin 2"
RetroArch [INFO] :: Environ SYSTEM_DIRECTORY: "/home/evgs/Emulation/Retroarch/system".
RetroArch [libretro INFO] :: Custom palette path: /home/evgs/Emulation/Retroarch/system/custom.pal
RetroArch [libretro WARN] :: custom.pal not found in system directory.
RetroArch [libretro INFO] :: NstDatabase.xml path: /home/evgs/Emulation/Retroarch/system/NstDatabase.xml
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: XRGB8888.
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_favored_system:
RetroArch [INFO] :: 	auto
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_genie_distortion:
RetroArch [INFO] :: 	disabled
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_ram_power_state:
RetroArch [INFO] :: 	0x00
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_nospritelimit:
RetroArch [INFO] :: 	disabled
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_fds_auto_insert:
RetroArch [INFO] :: 	enabled
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_blargg_ntsc_filter:
RetroArch [INFO] :: 	disabled
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_palette:
RetroArch [INFO] :: 	consumer
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_overscan_v:
RetroArch [INFO] :: 	enabled
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_overscan_h:
RetroArch [INFO] :: 	disabled
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_aspect:
RetroArch [INFO] :: 	auto
RetroArch [INFO] :: Environ GET_VARIABLE nestopia_turbo_pulse:
RetroArch [INFO] :: 	2
RetroArch [INFO] :: Environ SET_GEOMETRY.
RetroArch [INFO] :: SET_GEOMETRY: 256x224, aspect: 1.306.
Segmentation fault
evgs@ASUS-1015PEM:~$ 

@eugene-s-nesdev eugene-s-nesdev changed the title RetroArch 1.6.1 crash on startup (lubuntu 14.04) when GL driver used RetroArch 1.6.1 crash on startup when GL driver used, SDL2 segfaults on load ROM Jul 20, 2017
@ghost
Copy link

ghost commented Jul 20, 2017

This is expected, as your hardware and/or video driver's supported GL version is too old (1.4). Shaders were not introduced until 2.0, which our gl driver requires.

For sdl2 you'd need to make sure it uses the software driver, the log output tells you how. If you do get that to work (you may need to force the menu driver to rgui also), you still won't be able to run any cores that use OpenGL.

@inactive123
Copy link
Contributor

It'd be nice to still support GL 1.4 backwards compat. though , but even the most prehistoric PowerPC Mac I have has GL 2.0 drivers, so somebody with drivers as limited as GL 1.4 would need to have a look at this.

@eugene-s-nesdev
Copy link
Author

eugene-s-nesdev commented Jul 20, 2017

FAIL again (this temporary solution works here:
0ldsk00l/nestopia#226)
And i can't find repo with 1.3.6 "trusty" anymore.

evgs@ASUS-1015PEM:~$ MESA_GL_VERSION_OVERRIDE=4.0 MESA_GLSL_VERSION_OVERRIDE=400 retroarch --verbose
RetroArch [INFO] :: This is RetroArch version 1.6.1 (Git 681351c)
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jun 30 2017
RetroArch [INFO] :: Version: 1.6.1
RetroArch [INFO] :: Git: 681351c
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: [Config]: Loading default config.
RetroArch [INFO] :: [Config]: loading config from: (null).
RetroArch [INFO] :: Looking for config in: "/home/evgs/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [INFO] :: Version of libretro API: 1
RetroArch [INFO] :: Compiled against API: 1
RetroArch [INFO] :: [Audio]: Set audio input rate to: 29970.03 Hz.
RetroArch [INFO] :: [Video]: Video @ 640x480
RetroArch [ERROR] :: [Wayland]: Failed to connect to Wayland server.
RetroArch [INFO] :: [GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...
RetroArch [INFO] :: [GL]: Found GL context: x
RetroArch [INFO] :: [GL]: Detecting screen resolution 1024x600.
RetroArch [INFO] :: [GLX]: X = 0, Y = 0, W = 640, H = 480.
RetroArch [INFO] :: [GLX]: Found swap function: glXSwapIntervalMESA.
RetroArch [INFO] :: [GLX]: glXSwapInterval(1)
RetroArch [INFO] :: [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) Pineview M x86/MMX/SSE2.
RetroArch [INFO] :: [GL]: Version: 4.0 (Core Profile) Mesa 11.2.0.
RetroArch [INFO] :: [GL]: Using resolution 640x480
RetroArch [INFO] :: [GL]: Default shader backend found: glsl.
RetroArch [INFO] :: [Shader driver]: Using GLSL shader backend.
RetroArch [INFO] :: [GLSL]: Checking GLSL shader support ...
RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: [GLSL]: Found GLSL vertex shader.
RetroArch [INFO] :: [GLSL]: Found GLSL fragment shader.
RetroArch [INFO] :: [GLSL]: Linking GLSL program.
RetroArch [INFO] :: Linker log: warning: Couldn't flatten if-statement.  This will likely result in software rasterization.

RetroArch [INFO] :: [GL]: Using 4 textures.
RetroArch [INFO] :: [GL]: Loaded 1 program(s).
RetroArch [INFO] :: [Joypad]: Found joypad driver: "sdl2".
RetroArch [INFO] :: [Font]: Using font rendering backend: freetype.
RetroArch [ERROR] :: GL: Invalid enum.
RetroArch [ERROR] :: [Video]: Cannot open video driver ... Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video()"
RetroArch [ERROR] :: This core requires a content file.
evgs@ASUS-1015PEM:~$ 

@inactive123
Copy link
Contributor

Can you try logging at which GL function call this happens, and also, the line in specific could help.

@eugene-s-nesdev
Copy link
Author

How can i change SDL2 render to "software"?

RetroArch [INFO] :: [SDL2]: Available renderers (change with $SDL_RENDER_DRIVER):
RetroArch [INFO] :: 	opengl
RetroArch [INFO] :: 	opengles2
RetroArch [INFO] :: 	software

@gouchi
Copy link
Member

gouchi commented Jul 26, 2017

Try to run RA with

SDL_RENDER_DRIVER=software retroarch

Also is it possible to recompile RA with debug symbol and provide backtrace ?

./configure && DEBUG=1 make
gdb ./retroarch
r
bt

Thank you.

@eugene-s-nesdev
Copy link
Author

eugene-s-nesdev commented Jul 27, 2017

SDL2-default:

evgs@ASUS-1015PEM:~/Emulation/SOURCES/RetroArch-master$ gdb ./retroarch
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./retroarch...done.
(gdb) r
Starting program: /home/evgs/Emulation/SOURCES/RetroArch-master/retroarch 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb6726b40 (LWP 7540)]
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 640x480
[INFO] [SDL2]: Available renderers (change with $SDL_RENDER_DRIVER):
[INFO] 	opengl
[INFO] 	opengles2
[INFO] 	software
[INFO] [SDL2]: Available displays:
[INFO] 	Display #0 mode: 1024x600@60hz.
[INFO] [SDL]: Creating window @ 640x480
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [SDL]: Input driver initialized.
[New Thread 0xb0113b40 (LWP 7569)]
[Thread 0xb0113b40 (LWP 7569) exited]
[New Thread 0xb0113b40 (LWP 7570)]
[INFO] [SDL audio]: Requested 64 ms latency, got 42 ms
[WARN] Audio rate control was desired, but driver does not support needed features.
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_image_history.lpl].
[INFO] Updating firmware status for: /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so on /home/evgs/Emulation/Retroarch/system
[WARN] Firmware missing: disksys.rom
[INFO] Using content: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes.
[INFO] arg #0: retroarch
[INFO] arg #1: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes
[INFO] arg #2: -c
[INFO] arg #3: /home/evgs/.config/retroarch/retroarch.cfg
[INFO] arg #4: -L
[INFO] arg #5: /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
[INFO] arg #6: -v
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] Set config file to : /home/evgs/.config/retroarch/retroarch.cfg
[Thread 0xb0113b40 (LWP 7570) exited]
[INFO] Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].srm".
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jul 27 2017
[INFO] Version: 1.6.1
[INFO] =================================================
[Thread 0xb6726b40 (LWP 7540) exited]
[New Thread 0xb6726b40 (LWP 7579)]
[INFO] Loading dynamic libretro core from: "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so"
[INFO] [overrides] no core-specific overrides found at /home/evgs/.config/retroarch/config/Nestopia/Nestopia.cfg.
[INFO] [overrides] no game-specific overrides found at /home/evgs/.config/retroarch/config/Nestopia/Alien 3 (U) [!].cfg.
[INFO] Shaders: preset directory: /home/evgs/.config/retroarch/shaders/presets
[INFO] Environ SET_VARIABLES.
[INFO] Remaps: remap directory: /home/evgs/.config/retroarch/config/remaps
[INFO] Remaps: no game-specific remap found at /home/evgs/.config/retroarch/config/remaps/Nestopia/Alien 3 (U) [!].rmp.
[INFO] Remaps: no core-specific remap found at /home/evgs/.config/retroarch/config/remaps/Nestopia/Nestopia.rmp.
[INFO] Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].srm".
[INFO] Environ GET_LOG_INTERFACE.
[INFO] Environ PERFORMANCE_LEVEL: 6.
[INFO] Loading content file: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes.
[INFO] Did not find a valid content patch.
[INFO] CRC32: 0xefb4ca05 .
[INFO] Environ SET_INPUT_DESCRIPTORS:
[INFO] 	RetroPad, User 1, Button "B (bottom)" => "B"
[INFO] 	RetroPad, User 1, Button "Y (left)" => "Turbo B"
[INFO] 	RetroPad, User 1, Button "Select" => "Select"
[INFO] 	RetroPad, User 1, Button "Start" => "Start"
[INFO] 	RetroPad, User 1, Button "D-Pad Up" => "D-Pad Up"
[INFO] 	RetroPad, User 1, Button "D-Pad Down" => "D-Pad Down"
[INFO] 	RetroPad, User 1, Button "D-Pad Left" => "D-Pad Left"
[INFO] 	RetroPad, User 1, Button "D-Pad Right" => "D-Pad Right"
[INFO] 	RetroPad, User 1, Button "A (right)" => "A"
[INFO] 	RetroPad, User 1, Button "X (up)" => "Turbo A"
[INFO] 	RetroPad, User 1, Button "L" => "(FDS) Disk Side Change"
[INFO] 	RetroPad, User 1, Button "R" => "(FDS) Eject Disk"
[INFO] 	RetroPad, User 1, Button "L2" => "(VSSystem) Coin 1"
[INFO] 	RetroPad, User 1, Button "R2" => "(VSSystem) Coin 2"
[INFO] Environ SYSTEM_DIRECTORY: "/home/evgs/Emulation/Retroarch/system".
[libretro INFO] Custom palette path: /home/evgs/Emulation/Retroarch/system/custom.pal
[libretro WARN] custom.pal not found in system directory.
[libretro INFO] NstDatabase.xml path: /home/evgs/Emulation/Retroarch/system/NstDatabase.xml
[INFO] Environ SET_PIXEL_FORMAT: XRGB8888.
[INFO] Environ GET_VARIABLE nestopia_favored_system:
[INFO] 	auto
[INFO] Environ GET_VARIABLE nestopia_genie_distortion:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_ram_power_state:
[INFO] 	0x00
[INFO] Environ GET_VARIABLE nestopia_nospritelimit:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_fds_auto_insert:
[INFO] 	enabled
[INFO] Environ GET_VARIABLE nestopia_blargg_ntsc_filter:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_palette:
[INFO] 	consumer
[INFO] Environ GET_VARIABLE nestopia_overscan_v:
[INFO] 	enabled
[INFO] Environ GET_VARIABLE nestopia_overscan_h:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_aspect:
[INFO] 	auto
[INFO] Environ GET_VARIABLE nestopia_turbo_pulse:
[INFO] 	2
[INFO] Environ SET_GEOMETRY.
[INFO] SET_GEOMETRY: 256x224, aspect: 1.306.

Program received signal SIGSEGV, Segmentation fault.
0x081a4975 in sdl2_poke_set_aspect_ratio (data=0x0, aspect_ratio_idx=20) at gfx/drivers/sdl2_gfx.c:665
665	   vid->video.force_aspect = true;
(gdb) bt
#0  0x081a4975 in sdl2_poke_set_aspect_ratio (data=0x0, aspect_ratio_idx=20) at gfx/drivers/sdl2_gfx.c:665
#1  0x0809091e in video_driver_set_aspect_ratio () at gfx/video_driver.c:1771
#2  0x08061083 in command_event (cmd=CMD_EVENT_VIDEO_SET_ASPECT_RATIO, data=0x0) at command.c:2092
#3  0x080a61c1 in rarch_environment_cb (cmd=37, data=0xbfffbf40) at dynamic.c:1595
#4  0xb56f5314 in check_variables() () from /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
#5  0xb56f7b06 in retro_load_game () from /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
#6  0x08055bac in core_load_game (load_info=0xbfffce60) at core_impl.c:289
#7  0x0806cb2c in content_file_load (info=0x858e488, content=0x8598f58, content_ctx=0xbfffd300, error_string=0xbfffd2ec, 
    special=0x0, additional_path_allocs=0x858eaa8) at tasks/task_content.c:581
#8  0x0806d11a in content_file_init (content_ctx=0xbfffd300, content=0x8598f58, error_string=0xbfffd2ec)
    at tasks/task_content.c:750
#9  0x0806ebe1 in content_init () at tasks/task_content.c:1741
#10 0x0805f697 in event_init_content () at command.c:1192
#11 0x0805f7ec in command_event_init_core (data=0x83a4880 <explicit_current_core_type>) at command.c:1250
#12 0x08061040 in command_event (cmd=CMD_EVENT_CORE_INIT, data=0x83a4880 <explicit_current_core_type>) at command.c:2080
#13 0x08058059 in retroarch_main_init (argc=7, argv=0xbfffd610) at retroarch.c:1249
#14 0x0806c083 in content_load (info=0xbfffea40) at tasks/task_content.c:276
#15 0x0806d33e in task_load_content (content_info=0xbfffea40, content_ctx=0xbfffe9c0, launched_from_menu=true, 
    launched_from_cli=false, error_string=0xbfffe9b4) at tasks/task_content.c:821
#16 0x0806e5e2 in task_load_content_callback (content_info=0xbfffea40, loading_from_menu=true, loading_from_cli=false)
    at tasks/task_content.c:1473
#17 0x0806e845 in task_push_load_content_with_core_from_menu (
    fullpath=0x83e7cc0 <detect_content_path> "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes", 
    content_info=0xbfffea40, type=CORE_TYPE_PLAIN, cb=0x0, user_data=0x0) at tasks/task_content.c:1605
#18 0x0814687b in action_ok_file_load_current_core (
    path=0xbfffeb7c "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so", 
    label=0xbfffec7b "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so", type=6, idx=0, entry_idx=0)
    at menu/cbs/menu_cbs_ok.c:2403
#19 0x08140b31 in menu_entry_action (entry=0xbfffeb7c, i=0, action=MENU_ACTION_OK) at menu/widgets/menu_entry.c:518
#20 0x08175fbc in generic_menu_iterate (data=0x8a68290, userdata=0x8a6c6a0, action=MENU_ACTION_OK)
    at menu/drivers/menu_generic.c:230
#21 0x08127eab in menu_driver_iterate (iterate=0xbffff278) at menu/menu_driver.c:1568
#22 0x0805a3f8 in runloop_check_state (settings=0xb6727008, input_nonblock_state=false, sleep_ms=0xbffff410)
    at retroarch.c:2494
#23 0x0805b7e2 in runloop_iterate (sleep_ms=0xbffff410) at retroarch.c:3001
#24 0x08054d21 in rarch_main (argc=1, argv=0xbffff4e4, data=0x0) at frontend/frontend.c:131
---Type <return> to continue, or q <return> to quit---

SDL2-Software:

evgs@ASUS-1015PEM:~/Emulation/SOURCES/RetroArch-master$ SDL_RENDER_DRIVER=software gdb ./retroarch
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./retroarch...done.
(gdb) r
Starting program: /home/evgs/Emulation/SOURCES/RetroArch-master/retroarch 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb6726b40 (LWP 7661)]
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 640x480
[INFO] [SDL2]: Available renderers (change with $SDL_RENDER_DRIVER):
[INFO] 	opengl
[INFO] 	opengles2
[INFO] 	software
[INFO] [SDL2]: Available displays:
[INFO] 	Display #0 mode: 1024x600@60hz.
[INFO] [SDL]: Creating window @ 640x480
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [SDL]: Input driver initialized.
[New Thread 0xb1c74b40 (LWP 7690)]
[Thread 0xb1c74b40 (LWP 7690) exited]
[New Thread 0xb1c74b40 (LWP 7691)]
[INFO] [SDL audio]: Requested 64 ms latency, got 42 ms
[WARN] Audio rate control was desired, but driver does not support needed features.
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_image_history.lpl].
[INFO] Updating firmware status for: /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so on /home/evgs/Emulation/Retroarch/system
[WARN] Firmware missing: disksys.rom
[INFO] Using content: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes.
[INFO] arg #0: retroarch
[INFO] arg #1: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes
[INFO] arg #2: -c
[INFO] arg #3: /home/evgs/.config/retroarch/retroarch.cfg
[INFO] arg #4: -L
[INFO] arg #5: /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
[INFO] arg #6: -v
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[Thread 0xb1c74b40 (LWP 7691) exited]
[INFO] Set config file to : /home/evgs/.config/retroarch/retroarch.cfg
[INFO] Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].srm".
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
Built: Jul 27 2017
[INFO] Version: 1.6.1
[INFO] =================================================
[Thread 0xb6726b40 (LWP 7661) exited]
[New Thread 0xb6726b40 (LWP 7700)]
[INFO] Loading dynamic libretro core from: "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so"
[INFO] [overrides] no core-specific overrides found at /home/evgs/.config/retroarch/config/Nestopia/Nestopia.cfg.
[INFO] [overrides] no game-specific overrides found at /home/evgs/.config/retroarch/config/Nestopia/Alien 3 (U) [!].cfg.
[INFO] Shaders: preset directory: /home/evgs/.config/retroarch/shaders/presets
[INFO] Environ SET_VARIABLES.
[INFO] Remaps: remap directory: /home/evgs/.config/retroarch/config/remaps
[INFO] Remaps: no game-specific remap found at /home/evgs/.config/retroarch/config/remaps/Nestopia/Alien 3 (U) [!].rmp.
[INFO] Remaps: no core-specific remap found at /home/evgs/.config/retroarch/config/remaps/Nestopia/Nestopia.rmp.
[INFO] Redirecting save file to "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].srm".
[INFO] Environ GET_LOG_INTERFACE.
[INFO] Environ PERFORMANCE_LEVEL: 6.
[INFO] Loading content file: /home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes.
[INFO] Did not find a valid content patch.
[INFO] CRC32: 0xefb4ca05 .
[INFO] Environ SET_INPUT_DESCRIPTORS:
[INFO] 	RetroPad, User 1, Button "B (bottom)" => "B"
[INFO] 	RetroPad, User 1, Button "Y (left)" => "Turbo B"
[INFO] 	RetroPad, User 1, Button "Select" => "Select"
[INFO] 	RetroPad, User 1, Button "Start" => "Start"
[INFO] 	RetroPad, User 1, Button "D-Pad Up" => "D-Pad Up"
[INFO] 	RetroPad, User 1, Button "D-Pad Down" => "D-Pad Down"
[INFO] 	RetroPad, User 1, Button "D-Pad Left" => "D-Pad Left"
[INFO] 	RetroPad, User 1, Button "D-Pad Right" => "D-Pad Right"
[INFO] 	RetroPad, User 1, Button "A (right)" => "A"
[INFO] 	RetroPad, User 1, Button "X (up)" => "Turbo A"
[INFO] 	RetroPad, User 1, Button "L" => "(FDS) Disk Side Change"
[INFO] 	RetroPad, User 1, Button "R" => "(FDS) Eject Disk"
[INFO] 	RetroPad, User 1, Button "L2" => "(VSSystem) Coin 1"
[INFO] 	RetroPad, User 1, Button "R2" => "(VSSystem) Coin 2"
[INFO] Environ SYSTEM_DIRECTORY: "/home/evgs/Emulation/Retroarch/system".
[libretro INFO] Custom palette path: /home/evgs/Emulation/Retroarch/system/custom.pal
[libretro WARN] custom.pal not found in system directory.
[libretro INFO] NstDatabase.xml path: /home/evgs/Emulation/Retroarch/system/NstDatabase.xml
[INFO] Environ SET_PIXEL_FORMAT: XRGB8888.
[INFO] Environ GET_VARIABLE nestopia_favored_system:
[INFO] 	auto
[INFO] Environ GET_VARIABLE nestopia_genie_distortion:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_ram_power_state:
[INFO] 	0x00
[INFO] Environ GET_VARIABLE nestopia_nospritelimit:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_fds_auto_insert:
[INFO] 	enabled
[INFO] Environ GET_VARIABLE nestopia_blargg_ntsc_filter:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_palette:
[INFO] 	consumer
[INFO] Environ GET_VARIABLE nestopia_overscan_v:
[INFO] 	enabled
[INFO] Environ GET_VARIABLE nestopia_overscan_h:
[INFO] 	disabled
[INFO] Environ GET_VARIABLE nestopia_aspect:
[INFO] 	auto
[INFO] Environ GET_VARIABLE nestopia_turbo_pulse:
[INFO] 	2
[INFO] Environ SET_GEOMETRY.
[INFO] SET_GEOMETRY: 256x224, aspect: 1.306.

Program received signal SIGSEGV, Segmentation fault.
0x081a4975 in sdl2_poke_set_aspect_ratio (data=0x0, aspect_ratio_idx=20) at gfx/drivers/sdl2_gfx.c:665
665	   vid->video.force_aspect = true;
(gdb) bt
#0  0x081a4975 in sdl2_poke_set_aspect_ratio (data=0x0, aspect_ratio_idx=20) at gfx/drivers/sdl2_gfx.c:665
#1  0x0809091e in video_driver_set_aspect_ratio () at gfx/video_driver.c:1771
#2  0x08061083 in command_event (cmd=CMD_EVENT_VIDEO_SET_ASPECT_RATIO, data=0x0) at command.c:2092
#3  0x080a61c1 in rarch_environment_cb (cmd=37, data=0xbfffbf20) at dynamic.c:1595
#4  0xb5ecc314 in check_variables() () from /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
#5  0xb5eceb06 in retro_load_game () from /home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so
#6  0x08055bac in core_load_game (load_info=0xbfffce40) at core_impl.c:289
#7  0x0806cb2c in content_file_load (info=0x85423e8, content=0x8667390, content_ctx=0xbfffd2e0, error_string=0xbfffd2cc, 
    special=0x0, additional_path_allocs=0x86673a0) at tasks/task_content.c:581
#8  0x0806d11a in content_file_init (content_ctx=0xbfffd2e0, content=0x8667390, error_string=0xbfffd2cc)
    at tasks/task_content.c:750
#9  0x0806ebe1 in content_init () at tasks/task_content.c:1741
#10 0x0805f697 in event_init_content () at command.c:1192
#11 0x0805f7ec in command_event_init_core (data=0x83a4880 <explicit_current_core_type>) at command.c:1250
#12 0x08061040 in command_event (cmd=CMD_EVENT_CORE_INIT, data=0x83a4880 <explicit_current_core_type>) at command.c:2080
#13 0x08058059 in retroarch_main_init (argc=7, argv=0xbfffd5f0) at retroarch.c:1249
#14 0x0806c083 in content_load (info=0xbfffea20) at tasks/task_content.c:276
#15 0x0806d33e in task_load_content (content_info=0xbfffea20, content_ctx=0xbfffe9a0, launched_from_menu=true, 
    launched_from_cli=false, error_string=0xbfffe994) at tasks/task_content.c:821
#16 0x0806e5e2 in task_load_content_callback (content_info=0xbfffea20, loading_from_menu=true, loading_from_cli=false)
    at tasks/task_content.c:1473
#17 0x0806e845 in task_push_load_content_with_core_from_menu (
    fullpath=0x83e7cc0 <detect_content_path> "/home/evgs/Emulation/ROMs/nes_roms/Alien 3 (U) [!].nes", 
    content_info=0xbfffea20, type=CORE_TYPE_PLAIN, cb=0x0, user_data=0x0) at tasks/task_content.c:1605
#18 0x0814687b in action_ok_file_load_current_core (
    path=0xbfffeb5c "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so", 
    label=0xbfffec5b "/home/evgs/Emulation/Retroarch/cores/nestopia_libretro.so", type=6, idx=0, entry_idx=0)
    at menu/cbs/menu_cbs_ok.c:2403
#19 0x08140b31 in menu_entry_action (entry=0xbfffeb5c, i=0, action=MENU_ACTION_OK) at menu/widgets/menu_entry.c:518
#20 0x08175fbc in generic_menu_iterate (data=0x862cf10, userdata=0x8631320, action=MENU_ACTION_OK)
    at menu/drivers/menu_generic.c:230
#21 0x08127eab in menu_driver_iterate (iterate=0xbffff258) at menu/menu_driver.c:1568
#22 0x0805a3f8 in runloop_check_state (settings=0xb6727008, input_nonblock_state=false, sleep_ms=0xbffff3f0)
    at retroarch.c:2494
#23 0x0805b7e2 in runloop_iterate (sleep_ms=0xbffff3f0) at retroarch.c:3001
#24 0x08054d21 in rarch_main (argc=1, argv=0xbffff4c4, data=0x0) at frontend/frontend.c:131
---Type <return> to continue, or q <return> to quit---

video_driver = "gl":

evgs@ASUS-1015PEM:~/Emulation/SOURCES/RetroArch-master$ gdb ./retroarch
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./retroarch...done.
(gdb) r
Starting program: /home/evgs/Emulation/SOURCES/RetroArch-master/retroarch 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb6726b40 (LWP 1856)]
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 640x480
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 1024x600.
[INFO] [GLX]: X = 0, Y = 0, W = 640, H = 480.
[INFO] [GLX]: Found swap function: glXSwapIntervalMESA.
[INFO] [GLX]: glXSwapInterval(0)
[INFO] [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) Pineview M x86/MMX/SSE2.
[INFO] [GL]: Version: 1.4 Mesa 11.2.0.
[INFO] [GL]: Using resolution 640x480
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[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] [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] Linker log: warning: Couldn't flatten if-statement.  This will likely result in software rasterization.

[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [Font]: Using font rendering backend: freetype.
[ERROR] [DBus]: Failed to suspend screensaver via DBus.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[New Thread 0xafec2b40 (LWP 1881)]
[Thread 0xafec2b40 (LWP 1881) exited]
[New Thread 0xafec2b40 (LWP 1886)]
[INFO] [SDL audio]: Requested 64 ms latency, got 42 ms
[WARN] Audio rate control was desired, but driver does not support needed features.
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/home/evgs/.config/retroarch/content_image_history.lpl].
[INFO] [GL]: VSync => off
[INFO] [GLX]: glXSwapInterval(0)
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapInterval(1)

(hanging)

@gouchi
Copy link
Member

gouchi commented Jul 27, 2017

Thank you.

Is it possible to make a test with Lubuntu 17.04 if you get some improvement ? As you are using Mesa 11.2.0 from Lubuntu 14.04.

@eugene-s-nesdev
Copy link
Author

eugene-s-nesdev commented Oct 2, 2017

Sorry for late answer.
I tested lastest-master under VirtualBox on Xubuntu 16.04.3 x64, with vbox-guest-additions installed.
(host machine has modern intel HD graphics 530 running under win10)

VirtualBox reported OpenGL version is 2.1 (as you can see on video).
Still segfaults, even on SDL2-software

https://youtu.be/G4R42m54wfA

If need i'll try on 17.04, but i doubt it'll help

@wyatt8740
Copy link

I just want to add that this is happening to me as well on my powerbook with 1.7.3 built from the current git. Same stack trace.

@orbea
Copy link
Contributor

orbea commented Jan 1, 2019

SDL_RENDER_DRIVER=software retroarch with the SDL2 video driver doesn't crash here, is this still a problem?

@LibretroAdmin
Copy link
Contributor

Looks like one of the shaders wouldn't compile properly for your GPU driver, so it resorted itself to software rasterization (making it either extremely slow or not working at all).

OpenGL version string: 1.4 Mesa 11.2.0

Also the GL version string here kinda indicates that GL 1.4 is the cutoff point for this GPU and that later versions of GL are properly not 100% implemented.

Suggested solutions:

  • Use gl1 video driver on this hardware

Short of owning your specific device and trying some backwards compat. things with the GLSL shaders that's about the best we can do for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants