If I load Naomi/AtomisWave roms from the terminal will fail with:
SIGSEGV @ 0x7fc196021105 (signal_handler + 0x0x1da02715) ... 0x7fc176d4aa08 -> was not in vram
[libretro INFO] Fatal error : segfault
in signal_handler -> core/libretro/common.cpp : 394
DEBUGBREAK!
SIGSEGV @ 0x7fc17861e907 (signal_handler + 0x0xffffffffffffff17) ... 0x7fc17861e907 -> was not in vram
[libretro INFO] Fatal error : segfault
in signal_handler -> core/libretro/common.cpp : 394
DEBUGBREAK!
Illegal instruction (core dumped)
Loading is done like:
retroarch -L "/Games/retroarch/cores/reicast_libretro.so" /Games/Romz/naomi/sortuit/spawn.zip
When I run it from inside RA it works but not loading it from terminal
Yeah! I have the same issue too with Lubuntu 16.04 64 bits. My error message:
retrocon-os@ubuntu:/media/BACKUP3/Sega Naomi$ retroarch -f -L /usr/lib/x86_64-linux-gnu/libretro/reicast_libretro.so "Street Fighter Zero 3 Upper.lst"
Creating dir: /home/retrocon-os/Roms/Bios/dc/data
Linux paging: 00001000 00001000 00000FFF
MAP 00800000 w/ 50331648
MAP 20000000 w/ 50331648
MAP 04000000 w/ 33554432
MAP 06000000 w/ 33554432
MAP 0C000000 w/ 0
A8
vmem reserve: base: F9370000, aram: 19370000, vram: FD370000, ram: 05370000
Resetting mem
SIGSEGV @ 0x7fc436bb7105 (signal_handler + 0x0x1bf7e715) ... 0x7fc41936ee08 -> was not in vram
DEBUGBREAK!
SIGSEGV @ 0x7fc41ac38907 (signal_handler + 0x0xffffffffffffff17) ... 0x7fc41ac38907 -> was not in vram
DEBUGBREAK!
Instru莽茫o ilegal (imagem do n煤cleo gravada)
Note: "Instru莽茫o ilegal (imagem do n煤cleo gravada)" means in english "Illegal instruction (segmentation fault)" because my system is in portuguese.
The error persists with Dreamcast games too. If the game is select from user interface of Retroarch, there is no error and the game starts normally.
I always launch retroarch using a command line and it works fine on my ubuntu 16.
I haven't updated my retroarch for a while so something might have changed there.
What retroarch version/commit are you running?
Also if you can run retroarch under gdb and give me the stacktrace when it crashes, it would be very helpful
Running Retroarch 1.7.5 GIT 978b581
output of gdb and bt
[New Thread 0x7fff877fe700 (LWP 13477)]
Thread 5 "retroarch" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff877fe700 (LWP 13477)]
0x00007fffd4c6fef4 in ?? () from /Games/retroarch/cores/reicast_libretro.so
(gdb) bt
#0 0x00007fffd4c6fef4 in () at /Games/retroarch/cores/reicast_libretro.so
#1 0x00007fffd5c804f6 in () at /Games/retroarch/cores/reicast_libretro.so
#2 0x00007fffd5cde29f in () at /Games/retroarch/cores/reicast_libretro.so
#3 0x00007ffff523e6db in start_thread (arg=0x7fff877fe700) at pthread_create.c:463
#4 0x00007fffee2c488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Can you guys try
retroarch < /dev/null -L /path/to/reicast_libretro.so /path/to/game.zip
This added < /dev/null and report back.
@6alileo still crashing: https://pastebin.com/hP1ANNw1
I still can't reproduce this on Ubuntu 16 with retroarch git 978b581 and latest core.
Are you sure you are running the same core and same content when running from the command line and when loading from within RA?
@flyinghead sorry that I only answering now, Busy time at work.
Yes the same core is used, I have my cores living under /Games/retroarch/cores and have setup retroarch to use it. I'm using RetroArch 1.7.5 (Git bd2fb04) (cloned & self-compiled this morning) and reicast is Git-37da602 also cloned & compiled this morning
Linux paging: 00001000 00001000 00000FFF
MAP 00800000 w/ 25165824
MAP 20000000 w/ 25165824
MAP 04000000 w/ 16777216
MAP 06000000 w/ 16777216
MAP 0C000000 w/ 0
A8
vmem reserve: base: 30150000, aram: 50150000, vram: 34150000, ram: 3C150000
Resetting mem
SIGSEGV @ 0x7f3d6ec04105 (signal_handler + 0x0x1e828045) ... 0x7f3d5014aa08 -> was not in vram
[libretro INFO] Fatal error : segfault
in signal_handler -> core/libretro/common.cpp : 394
DEBUGBREAK!
SIGSEGV @ 0x7f3d503dbfa7 (signal_handler + 0x0xfffffffffffffee7) ... 0x7f3d503dbfa7 -> was not in vram
[libretro INFO] Fatal error : segfault
in signal_handler -> core/libretro/common.cpp : 394
DEBUGBREAK!
Illegal instruction (core dumped)
Unfortanelly the error persists and I cann't test the MAME versions of Atomiswave and Naomi. :(
I still have no idea what's going on here. Can you build the core with symbols (-g) so we get a stack Trace?
Hi @flyinghead compiled a debug version (make complained -g doesn't exist, I used DEBUG:= 1) and got this when using gdb
0x00007fffd608d89b in bm_GetCode (addr=2684354560) at core/hw/sh4/dyna/blockmanager.cpp:47
47 DynarecCodeEntryPtr rv=(DynarecCodeEntryPtr)FPCA(addr);
(gdb) bt
#0 0x00007fffd608d89b in bm_GetCode(u32) (addr=2684354560) at core/hw/sh4/dyna/blockmanager.cpp:47
#1 0x00007fffd505b02d in ngen_mainloop(void*) (v_cntx=0x7fffd505b02d <ngen_mainloop(void*)+64>)
at core/rec-x64/rec_x64.cpp:147
#2 0x00007fffffffdb00 in ()
#3 0x00007fffffffdb00 in ()
#4 0x000055555ababf80 in ()
#5 0x0000000000000000 in ()
Here is a paste of everything from the run command: https://pastebin.com/PPrmSGQX
@telanus What's your cpu ? I think we had a similar issue in the past and it was related to cpu instruction set
@barbudreadmon It's a Dual-Core E5300.
Ok, this SIGSEGV is normal.
You need to run this gdb command before running RA:
handle SIGSEGV nostop noprint
OK, weird.
@flyinghead using that command it'll load up to this screen:

this is the output I get on the terminal:
[New Thread 0x7fff9ccb2700 (LWP 23343)]
Sh4: i-cache invalidation A0000016
Error in core/hw/sh4/sh4_mmr.cpp:WriteMem_area7:833: Write to Area7 not implemented , addr=1f940190,data=90
Error in core/hw/sh4/sh4_mmr.cpp:WriteMem_area7:833: Write to Area7 not implemented , addr=1f940190,data=90
@@ ngen_ResetBlocks()
Freeing fpcb
recSh4:Dynarec Cache clear at 8C0000DE
[INFO] [discord] updating (2)
Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
[1553606915.553] MODEM Modem reset start ...
MODEM Reset
VREG = 02 ARMRST 00
VREG = 02 ARMRST 01
[1553606915.612] MODEM DSPTestStart
[1553606915.657] MODEM DSPTestEnd
VREG = 02 ARMRST 00
SPI : unknown ? [0x70]
SPI : unknown ? [0x71]
Sh4: i-cache invalidation 8C00DD78
DIV32S matched 1% @ 0x8C00CF78
DIV32S matched 100% @ 0x8C00CF7E
div32s 1/0/3
Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
Sh4: i-cache invalidation 8C09E6A6
Sh4: i-cache invalidation AC09D990
VREG = 02 ARMRST 00
[INFO] [discord] connected to user: te_lanus#5874
[INFO] [discord] user avatar id: 171126697251438592
[INFO] [discord] downloading avatar from: https://cdn.discordapp.com/avatars/171126697251438592/5ca9b9842d648da7ad834fb5cb43e298.png
new tactx
new tactx
DIV32S matched 1% @ 0x8C091086
DIV32S matched 100% @ 0x8C09108C
div32s 1/0/3
DIV32S matched 1% @ 0x8C0911E4
DIV32S matched 100% @ 0x8C0911EC
div32s 1/0/3
DIV32S matched 1% @ 0x8C09126E
DIV32S matched 1% @ 0x8C091278
VREG = 02 ARMRST 01
VREG = 02 ARMRST 01
VREG = 02 ARMRST 00
Creating per-triangle/strip renderer
new tactx
SPI : unknown ? [0x70]
SPI : unknown ? [0x71]
Sh4: i-cache invalidation AC09EC6E
DIV32S matched 1% @ 0x8C00D0D6
DIV32S matched 100% @ 0x8C00D0DE
div32s 1/0/3
DIV32S matched 1% @ 0x8C00D160
DIV32S matched 1% @ 0x8C00D16A
Sh4: i-cache invalidation 8C00DD78
Sh4: i-cache invalidation 8C09E6A6
Sh4: i-cache invalidation AC09D990
VREG = 02 ARMRST 00
VREG = 02 ARMRST 01
VREG = 02 ARMRST 01
VREG = 02 ARMRST 00
DIV32S matched 1% @ 0x8C0294A6
DIV32S matched 100% @ 0x8C0294AC
div32s 1/0/3
SPI : unknown ? [0x70]
SPI : unknown ? [0x71]
SPI : unknown ? [0x70]
SPI : unknown ? [0x71]
DIV32S matched 1% @ 0x8C029604
DIV32S matched 100% @ 0x8C02960C
div32s 1/0/3
DIV32S matched 1% @ 0x8C02968E
DIV32S matched 1% @ 0x8C029698
param_type=4
cdda.StartAddr=0
cdda.EndAddr=0
cdda.repeats=0
cdda.playing=0
cdda.CurrAddr=0
Sh4: i-cache invalidation AC09EC6E
Which game are you trying to load? Which type (cdi, gdi, chd)?
If you run the exact same command without gdb do you get a crash?
@flyinghead I tried loading a mix of games (Crazi Taxi, Virtua Tennis, Dead or Alive 2, Ikaruga, Marvel Vs Capcom 2) mostly in the cdi format, but Ikaruga is gdi.
And yes it crashes when loading via terminal (without gdb)
Haven't tried chd so far
OK Just tried a chd, and it throws the same error
I suppose this is a random issue that doesn't crash when run in the debugger... bummer
I'm experiencing an issue that could be the same one but it happens once every 100 runs or so, and never with gdb.
I guess you can try multiple games and hope that one will crash...
Actually, there's something to try;
In the Makefile, replace the line OPTFLAGS := -O0 with OPTFLAGS := -O3 and do a full rebuild.
@flyinghead I tried that and it didn't work :'(. Same error
The error persist buts in the line 398 of core/libretro/common.cpp
emula-os@emulaos-Vostro-3500:/media/emula-os/emerson_backup/backup/programas/jogos_e_emuladores/Roms2/Sega Dreamcast$ retroarch -f -L /usr/lib/x86_64-linux-gnu/libretro/reicast_libretro.so 'Soul Calibur.cdi'
[INFO] [recording] twitch streaming key empty
[INFO] RetroArch 1.7.6 (Git 9750719)
[INFO] Redirecting save file to "./Soul Calibur.srm".
[INFO] Redirecting savestate to "./Soul Calibur.state".
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2
Built: Feb 6 2019
[INFO] Version: 1.7.6
[INFO] Git: 9750719
[INFO] =================================================
[INFO] Loading dynamic libretro core from: "/usr/lib/x86_64-linux-gnu/libretro/reicast_libretro.so"
[INFO] [overrides] no core-specific overrides found at /home/emula-os/.config/retroarch/config/Reicast/Reicast.cfg.
[INFO] [overrides] no content-dir-specific overrides found at /home/emula-os/.config/retroarch/config/Reicast/.cfg.
[INFO] [overrides] no game-specific overrides found at /home/emula-os/.config/retroarch/config/Reicast/Soul Calibur.cfg.
[INFO] Shaders: preset directory: /home/emula-os/.config/retroarch/shaders/presets
[INFO] Shaders: no game-specific preset found at /home/emula-os/.config/retroarch/shaders/presets/Reicast/Soul Calibur.cgp.
[INFO] Shaders: no game-specific preset found at /home/emula-os/.config/retroarch/shaders/presets/Reicast/Soul Calibur.glslp.
[INFO] Shaders: no content-dir-specific preset found at /home/emula-os/.config/retroarch/shaders/presets/Reicast/.cgp.
[INFO] Shaders: no content-dir-specific preset found at /home/emula-os/.config/retroarch/shaders/presets/Reicast/.glslp.
[INFO] Shaders: no core-specific preset found at /home/emula-os/.config/retroarch/shaders/presets/Reicast/Reicast.cgp.
[INFO] Shaders: no core-specific preset found at /home/emula-os/.config/retroarch/shaders/presets/Reicast/Reicast.glslp.
[INFO] Environ SET_VARIABLES.
[INFO] Environ SET_CONTROLLER_INFO.
[INFO] Controller port: 1
[INFO] Gamepad (ID: 1)
[INFO] Keyboard (ID: 3)
[INFO] Mouse (ID: 2)
[INFO] Light Gun (ID: 4)
[INFO] Twin Stick (ID: 513)
[INFO] Saturn Twin-Stick (ID: 769)
[INFO] Controller port: 2
[INFO] Gamepad (ID: 1)
[INFO] Keyboard (ID: 3)
[INFO] Mouse (ID: 2)
[INFO] Light Gun (ID: 4)
[INFO] Twin Stick (ID: 513)
[INFO] Saturn Twin-Stick (ID: 769)
[INFO] Controller port: 3
[INFO] Gamepad (ID: 1)
[INFO] Keyboard (ID: 3)
[INFO] Mouse (ID: 2)
[INFO] Light Gun (ID: 4)
[INFO] Twin Stick (ID: 513)
[INFO] Saturn Twin-Stick (ID: 769)
[INFO] Controller port: 4
[INFO] Gamepad (ID: 1)
[INFO] Keyboard (ID: 3)
[INFO] Mouse (ID: 2)
[INFO] Light Gun (ID: 4)
[INFO] Twin Stick (ID: 513)
[INFO] Saturn Twin-Stick (ID: 769)
[INFO] Remaps: remap directory: /home/emula-os/.config/retroarch/config/remaps
[INFO] Remaps: no game-specific remap found at /home/emula-os/.config/retroarch/config/remaps/Reicast/Soul Calibur.rmp.
[INFO] Remaps: content-dir-specific remap found at /home/emula-os/.config/retroarch/config/remaps/Reicast/.rmp.
[INFO] Redirecting save file to "./Soul Calibur.srm".
[INFO] Redirecting savestate to "./Soul Calibur.state".
[INFO] Environ GET_LOG_INTERFACE.
[INFO] Environ GET_PERF_INTERFACE.
[INFO] Environ SET_PIXEL_FORMAT: XRGB8888.
[INFO] Environ SET_KEYBOARD_CALLBACK.
[INFO] Content loading skipped. Implementation will load it on its own.
[INFO] CRC32: 0x5cd78df4 .
[INFO] Environ GET_RUMBLE_INTERFACE.
[libretro INFO] Rumble interface supported!
[INFO] Environ SYSTEM_DIRECTORY: "/Roms/Bios".
[INFO] Environ GET_VARIABLE reicast_widescreen_hack:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_screen_rotation:
[INFO] horizontal
[INFO] Environ GET_VARIABLE reicast_internal_resolution:
[INFO] 640x480
[INFO] Environ GET_VARIABLE reicast_cpu_mode:
[INFO] dynamic_recompiler
[INFO] Environ GET_VARIABLE reicast_boot_to_bios:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_gdrom_fast_loading:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_alpha_sorting:
[INFO] per-triangle (normal)
[INFO] Environ GET_VARIABLE reicast_mipmapping:
[INFO] enabled
[INFO] Environ GET_VARIABLE reicast_system:
[INFO] auto
[INFO] Environ GET_VARIABLE reicast_oit_abuffer_size:
[INFO] 512MB
[INFO] Environ GET_VARIABLE reicast_volume_modifier_enable:
[INFO] enabled
[INFO] Environ GET_VARIABLE reicast_audio_buffer_size:
[INFO] 1024
[INFO] Environ GET_VARIABLE reicast_cable_type:
[INFO] TV (RGB)
[INFO] Environ GET_VARIABLE reicast_broadcast:
[INFO] Default
[INFO] Environ GET_VARIABLE reicast_framerate:
[INFO] fullspeed
[INFO] Environ GET_VARIABLE reicast_region:
[INFO] Default
[INFO] Environ GET_VARIABLE reicast_language:
[INFO] Default
[INFO] Environ GET_VARIABLE reicast_div_matching:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_texupscale:
[INFO] off
[INFO] Environ GET_VARIABLE reicast_texupscale_max_filtered_texture_size:
[INFO] 256
[INFO] Environ GET_VARIABLE reicast_enable_rtt:
[INFO] enabled
[INFO] Environ GET_VARIABLE reicast_enable_rttb:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_render_to_texture_upscaling:
[INFO] 1x
[INFO] Environ GET_VARIABLE reicast_threaded_rendering:
[INFO] enabled
[INFO] Environ SET_SAVE_STATE_IN_BACKGROUND: yes.
[INFO] Environ GET_VARIABLE reicast_synchronous_rendering:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_frame_skipping:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_enable_purupuru:
[INFO] enabled
[INFO] Environ GET_VARIABLE reicast_analog_stick_deadzone:
[INFO] 15%
[INFO] Environ GET_VARIABLE reicast_trigger_deadzone:
[INFO] 0%
[INFO] Environ GET_VARIABLE reicast_enable_dsp:
[INFO] enabled
[INFO] Environ GET_VARIABLE reicast_digital_triggers:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_allow_service_buttons:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_custom_textures:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_dump_textures:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_lightgun1_crosshair:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu1_screen_display:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu1_screen_position:
[INFO] Upper Left
[INFO] Environ GET_VARIABLE reicast_vmu1_screen_size_mult:
[INFO] 1x
[INFO] Environ GET_VARIABLE reicast_vmu1_screen_opacity:
[INFO] 100%
[INFO] Environ GET_VARIABLE reicast_vmu1_pixel_on_color:
[INFO] DEFAULT_ON 00
[INFO] Environ GET_VARIABLE reicast_vmu1_pixel_off_color:
[INFO] DEFAULT_OFF 01
[INFO] Environ GET_VARIABLE reicast_lightgun2_crosshair:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu2_screen_display:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu2_screen_position:
[INFO] Upper Left
[INFO] Environ GET_VARIABLE reicast_vmu2_screen_size_mult:
[INFO] 1x
[INFO] Environ GET_VARIABLE reicast_vmu2_screen_opacity:
[INFO] 100%
[INFO] Environ GET_VARIABLE reicast_vmu2_pixel_on_color:
[INFO] DEFAULT_ON 00
[INFO] Environ GET_VARIABLE reicast_vmu2_pixel_off_color:
[INFO] DEFAULT_OFF 01
[INFO] Environ GET_VARIABLE reicast_lightgun3_crosshair:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu3_screen_display:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu3_screen_position:
[INFO] Upper Left
[INFO] Environ GET_VARIABLE reicast_vmu3_screen_size_mult:
[INFO] 1x
[INFO] Environ GET_VARIABLE reicast_vmu3_screen_opacity:
[INFO] 100%
[INFO] Environ GET_VARIABLE reicast_vmu3_pixel_on_color:
[INFO] DEFAULT_ON 00
[INFO] Environ GET_VARIABLE reicast_vmu3_pixel_off_color:
[INFO] DEFAULT_OFF 01
[INFO] Environ GET_VARIABLE reicast_lightgun4_crosshair:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu4_screen_display:
[INFO] disabled
[INFO] Environ GET_VARIABLE reicast_vmu4_screen_position:
[INFO] Upper Left
[INFO] Environ GET_VARIABLE reicast_vmu4_screen_size_mult:
[INFO] 1x
[INFO] Environ GET_VARIABLE reicast_vmu4_screen_opacity:
[INFO] 100%
[INFO] Environ GET_VARIABLE reicast_vmu4_pixel_on_color:
[INFO] DEFAULT_ON 00
[INFO] Environ GET_VARIABLE reicast_vmu4_pixel_off_color:
[INFO] DEFAULT_OFF 01
[libretro INFO] File extension is: .cdi
Creating dir: /Roms/Bios/dc/data
[INFO] Environ SET_HW_RENDER.
[INFO] Requesting core OpenGL context (3.0).
Linux paging: 00001000 00001000 00000FFF
MAP 00800000 w/ 25165824
MAP 20000000 w/ 25165824
MAP 04000000 w/ 16777216
MAP 06000000 w/ 16777216
MAP 0C000000 w/ 0
A8
vmem reserve: base: 0x7fe23f070000, aram: 0x7fe25f070000, vram: 0x7fe243070000, ram: 0x7fe24b070000
Resetting mem
SIGSEGV @ 0x7fe27dcc5105 ... 0x7fe25f068e08 -> was not in vram (dyna code 0)
[libretro INFO] Fatal error : segfault
in signal_handler -> core/libretro/common.cpp : 398
DEBUGBREAK!
SIGSEGV @ 0x7fe26038ea27 ... 0x7fe26038ea27 -> was not in vram (dyna code 0)
[libretro INFO] Fatal error : segfault
in signal_handler -> core/libretro/common.cpp : 398
DEBUGBREAK!
Instru莽茫o ilegal (imagem do n煤cleo gravada)
Try to run this under gdb to get a stack trace.
I have what I think is the same problem on my machine. But it happens only once every 100 runs and never when debugging. I've spent another couple of hours on this problem to no avail.
So I'm going to need some help to make progress.
@flyinghead hope this is OK:
@flyinghead, if I clean up my settings folder and the configurations files the error will end or will persists? Thanks.
@emersonnovais I doubt this problem is related to your settings but trying with fresh/default settings isn't going to hurt either and will give us the confirmation.
@emersonnovais I tried removing ./config/retroarch and still have the same problem
@telanus the log you posted is showing a different problem than the initial one, and not the bug I'm chasing.
This is what I'm looking at:
vmem reserve: base: F9370000, aram: 19370000, vram: FD370000, ram: 05370000
Resetting mem
SIGSEGV @ 0x7fc436bb7105 (signal_handler + 0x0x1bf7e715) ... 0x7fc41936ee08 -> was not in vram
DEBUGBREAK!
A crash that happens very early right after "Resetting mem"
Try rebuilding with DEBUG=1 so we'll have symbol names in the stack trace.
@telanus, have you removed the flash files in
Thanks.
I made a test removing the flash and vmu files and the errors persists.
This seems to have disappeared with the merger of the two cores.
The random crash I was sometimes having at startup seems to have disappeared as well.
Feel free to close the issue.
Most helpful comment
Running Retroarch 1.7.5 GIT 978b581
output of gdb and bt