libretro / vice-libretro

Versatile Commodore 8-bit Emulator
GNU General Public License v2.0
40 stars 70 forks source link

segfault when loading D64, G64 or NIB image #338

Closed TiBeN closed 3 years ago

TiBeN commented 3 years ago

Using current retroarch 1.9.0 with core "VICE x64 (3.3 e1e4bdd)" (from online updater) and bare configuration, launching the core with an image ends with a segfault. I tested with a G64, a NIB and a D64 image. Core without image is OK and with a cartridge too. I don't think my images are corrupted or so, they work well with anterior retroarch version (1.8.5 with core VICE x64 3.3 79292ad for example).

Logs: retroarch.log

[INFO] RetroArch 1.9.0 (Git 5e551dd92b) [INFO] === Build ======================================= [INFO] CPU Model Name: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz [INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 [INFO] Built: Aug 8 2020 [INFO] Version: 1.9.0 [INFO] Git: 5e551dd92b [INFO] ================================================= [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] [Overrides]: Redirecting save file to "/home/ben/.config/retroarch/saves/.srm". [INFO] [Overrides]: Redirecting save state to "/home/ben/.config/retroarch/states/.state". [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Video @ 960x720 [ERROR] [Wayland]: Failed to connect to Wayland server. [INFO] [GLX]: GLX_EXT_swap_control_tear supported. [INFO] [GL]: Found GL context: x [INFO] [GL]: Detecting screen resolution 2560x1440. [INFO] [GLX]: Window manager is GNOME Shell. [INFO] [GLX]: X = 0, Y = 0, W = 960, H = 720. [INFO] [GLX]: Found swap function: glXSwapIntervalEXT.

[INFO] [GL]: Vendor: AMD, Renderer: Radeon RX550/550 Series (POLARIS12, DRM 3.39.0, 5.9.14-arch1-1, LLVM 11.0.0). [INFO] [GL]: Version: 4.6 (Compatibility Profile) Mesa 20.3.0. [INFO] [GL]: Using resolution 960x720 [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] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [GL]: Using GL_RGB565 for texture uploads. [INFO] [udev]: Pad #0 (/dev/input/event7) supports force feedback. [INFO] [udev]: Pad #0 (/dev/input/event7) supports 16 force feedback effects. [INFO] [udev]: Pad #1 (/dev/input/event8) supports force feedback. [INFO] [udev]: Pad #1 (/dev/input/event8) supports 16 force feedback effects. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [DBus]: Suspended screensaver via DBus. [INFO] [Video]: Found display server: x11 [INFO] [PulseAudio]: Requested 24576 bytes buffer, got 35696. [INFO] [Display]: Found display driver: "gl". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Display]: Found display driver: "gl". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [MIDI]: Input disabled. [INFO] [MIDI]: Output disabled. [INFO] [MIDI]: Initialized "alsa" driver. [INFO] Disconnecting device from port 6. [INFO] Disconnecting device from port 7. [INFO] Disconnecting device from port 8. [INFO] Disconnecting device from port 9. [INFO] Disconnecting device from port 10. [INFO] Disconnecting device from port 11. [INFO] Disconnecting device from port 12. [INFO] Disconnecting device from port 13. [INFO] Disconnecting device from port 14. [INFO] Disconnecting device from port 15. [INFO] Disconnecting device from port 16. [INFO] [SRAM]: SRAM will not be saved. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_music_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_video_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_image_history.lpl]. [INFO] [Playlist]: Loading favorites file: [/home/ben/.config/retroarch/content_favorites.lpl]. [INFO] [GL]: VSync => on

[INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [GL]: VSync => on

[INFO] [CONTENT LOAD]: Updating firmware status for: /home/ben/.config/retroarch/cores/vice_x64_libretro.so on /home/ben/.config/retroarch/system [INFO] [CORE]: Using content: /home/ben/pkg/c64/no-intro/arka.g64. [INFO] Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [CORE]: Unloading core.. [INFO] [CORE]: Unloading core symbols.. [INFO] [XINERAMA]: Xinerama version: 1.1. [INFO] [XINERAMA]: Xinerama screens: 1. [INFO] [XINERAMA]: Saved monitor #0. [INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames. [INFO] RetroArch 1.9.0 (Git 5e551dd92b) [INFO] [Overrides]: Redirecting save file to "/home/ben/.config/retroarch/saves/arka.srm". [INFO] [Overrides]: Redirecting save state to "/home/ben/.config/retroarch/states/arka.state". [INFO] === Build ======================================= [INFO] CPU Model Name: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz [INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 [INFO] Built: Aug 8 2020 [INFO] Version: 1.9.0 [INFO] Git: 5e551dd92b [INFO] ================================================= [INFO] [CORE]: Loading dynamic libretro core from: "/home/ben/.config/retroarch/cores/vice_x64_libretro.so" [INFO] [Overrides]: No core-specific overrides found at /home/ben/.config/retroarch/config/VICE x64/VICE x64.cfg. [INFO] [Overrides]: No content-dir-specific overrides found at /home/ben/.config/retroarch/config/VICE x64/no-intro.cfg. [INFO] [Overrides]: No game-specific overrides found at /home/ben/.config/retroarch/config/VICE x64/arka.cfg.

[INFO] [Environ]: SET_SUPPORT_NO_GAME: yes. [INFO] [Remaps]: remap directory: /home/ben/.config/retroarch/config/remaps [INFO] [Overrides]: Redirecting save file to "/home/ben/.config/retroarch/saves/arka.srm". [INFO] [Overrides]: Redirecting save state to "/home/ben/.config/retroarch/states/arka.state".

[INFO] [Environ]: SYSTEM_DIRECTORY: "/home/ben/.config/retroarch/system". [INFO] [Environ]: CORE_ASSETS_DIRECTORY: "/home/ben/.config/retroarch/downloads".

[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] [Environ]: SET_SUPPORT_ACHIEVEMENTS: yes.

[INFO] [CONTENT LOAD]: Content loading skipped. Implementation will load it on its own. [libretro INFO] Arg0: x64 [libretro INFO] Arg1: /home/ben/pkg/c64/no-intro/arka.g64 [libretro INFO] -------------------------------------------------------------------------------- [libretro INFO] VICE 3.3 [libretro INFO] Git commit: e1e4bdd [libretro INFO] Build date: Nov 16 2020 18:55:50 [libretro INFO] [libretro INFO] Welcome to x64, the free portable C64 Emulator. [libretro INFO] [libretro INFO] This is free software with ABSOLUTELY NO WARRANTY. [libretro INFO] -------------------------------------------------------------------------------- [libretro ERROR] 2000 ROM image not found. Hardware-level 2000 emulation is not available. [libretro ERROR] 4000 ROM image not found. Hardware-level 4000 emulation is not available. [libretro INFO] Finished loading ROM images. [libretro INFO] Available sound devices: retro [libretro INFO] Resource Mouse = 1 [libretro INFO] Resource Printer4 = 1 [libretro INFO] Resource AutostartPrgMode = 1 [libretro INFO] Resource AutostartDelayRandom = 0 [libretro INFO] Resource SoundVolume = 0 [libretro INFO] Resource VICIIPaletteFile = "colodore" [libretro INFO] Resource VICIIExternalPalette = 1 [libretro INFO] Resource VICIIColorGamma = 2800 [libretro INFO] Resource VICIIColorTint = 1000 [libretro INFO] Resource VICIIColorSaturation = 1000 [libretro INFO] Resource VICIIColorContrast = 1000 [libretro INFO] Resource VICIIColorBrightness = 1000 [libretro INFO] Resource UserportJoy = 0 [libretro INFO] Resource AutostartWarp = 0 [libretro INFO] Resource DriveTrueEmulation = 1 [libretro INFO] Resource VirtualDevices = 1 [libretro INFO] Resource AttachDevice8Readonly = 0 [libretro INFO] Resource EasyFlashWriteCRT = 1 [libretro INFO] Resource KernalName = "kernal" [libretro INFO] Resource DosName1541 = "dos1541" [libretro INFO] Resource DosName1571 = "dos1571" [libretro INFO] Resource DosName1581 = "dos1581" [libretro INFO] Resource DriveSoundEmulationVolume = 400 [libretro INFO] Resource DriveSoundEmulation = 1 [libretro INFO] Resource VICIIAudioLeak = 0 [libretro INFO] Resource SFXSoundExpander = 0 [libretro INFO] Resource SidResidSampling = 2 [libretro INFO] Resource SidResidPassband = 90 [libretro INFO] Resource SidResidGain = 97 [libretro INFO] Resource SidResidFilterBias = 500 [libretro INFO] Resource SidResid8580Passband = 90 [libretro INFO] Resource SidResid8580Gain = 97 [libretro INFO] Resource SidResid8580FilterBias = 1500 [libretro INFO] Resource SidStereo = 0 [libretro INFO] Resource REU = 0 [libretro INFO] Autodetecting image type of /home/ben/pkg/c64/no-intro/arka.g64'. [libretro INFO] Attached file/home/ben/pkg/c64/no-intro/arka.g64' as a disk image. [libretro INFO] Autodetected image type 100. [libretro INFO] Resetting the machine to autostart '*' [libretro INFO] RESET. [libretro INFO] Opened device retro', speed 48000Hz, fragment size 0.7ms, buffer size 2ms [libretro INFO] reSID: MOS6581, filter on, sampling rate 48000Hz - resampling, pass to 21600Hz [libretro INFO]/home/ben/pkg/c64/no-intro/arka.g64' recognized as disk image. [libretro INFO] Main CPU: starting at ($FFFC). [libretro INFO] Main CPU: RESET. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Cheats]: Load game-specific cheatfile: /home/ben/.config/retroarch/cheats/VICE x64/arka.cht [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Timings deviate too much. Will not adjust. (Display = 60.00 Hz, Game = 50.12 Hz) [INFO] [Video]: Video @ 864x816 [ERROR] [Wayland]: Failed to connect to Wayland server. [INFO] [GLX]: GLX_EXT_swap_control_tear supported. [INFO] [GL]: Found GL context: x [INFO] [GL]: Detecting screen resolution 2560x1440. [INFO] [GLX]: Window manager is GNOME Shell. [INFO] [GLX]: X = 0, Y = 0, W = 864, H = 816. [INFO] [GLX]: Found swap function: glXSwapIntervalEXT.

[INFO] [GL]: Vendor: AMD, Renderer: Radeon RX550/550 Series (POLARIS12, DRM 3.39.0, 5.9.14-arch1-1, LLVM 11.0.0). [INFO] [GL]: Version: 4.6 (Compatibility Profile) Mesa 20.3.0. [INFO] [GL]: Using resolution 864x816 [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] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [GL]: Using GL_RGB565 for texture uploads. [INFO] [udev]: Pad #0 (/dev/input/event7) supports force feedback. [INFO] [udev]: Pad #0 (/dev/input/event7) supports 16 force feedback effects. [INFO] [udev]: Pad #1 (/dev/input/event8) supports force feedback. [INFO] [udev]: Pad #1 (/dev/input/event8) supports 16 force feedback effects. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [DBus]: Suspended screensaver via DBus. [INFO] [Video]: Found display server: x11 [INFO] [PulseAudio]: Requested 24576 bytes buffer, got 35696. [INFO] [Display]: Found display driver: "gl". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [libretro INFO] retro_set_environment: GET_CORE_OPTIONS_VERSION failed, not setting CORE_OPTIONS now. [libretro INFO] retro_set_environment: GET_CORE_OPTIONS_VERSION failed, not setting CORE_OPTIONS now. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [MIDI]: Input disabled. [INFO] [MIDI]: Output disabled. [INFO] [MIDI]: Initialized "alsa" driver. [INFO] Disconnecting device from port 6. [INFO] Disconnecting device from port 7. [INFO] Disconnecting device from port 8. [INFO] Disconnecting device from port 9. [INFO] Disconnecting device from port 10. [INFO] Disconnecting device from port 11. [INFO] Disconnecting device from port 12. [INFO] Disconnecting device from port 13. [INFO] Disconnecting device from port 14. [INFO] Disconnecting device from port 15. [INFO] Disconnecting device from port 16. [INFO] [SRAM]: SRAM will not be saved. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_music_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_video_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_image_history.lpl]. [INFO] [Playlist]: Loading favorites file: [/home/ben/.config/retroarch/content_favorites.lpl]. [INFO] [GL]: VSync => on

[INFO] [Playlist]: Written to playlist file: /home/ben/.config/retroarch/content_history.lpl [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] SET_GEOMETRY: 384x272, aspect: 1.322.

[libretro INFO] Resource Mouse = 1 [libretro INFO] Resource Printer4 = 1 [libretro INFO] Resource AutostartPrgMode = 1 [libretro INFO] Resource AutostartDelayRandom = 0 [libretro INFO] Resource SoundVolume = 0 [libretro INFO] Resource VICIIPaletteFile = "colodore" [libretro INFO] Resource VICIIExternalPalette = 1 [libretro INFO] Resource VICIIColorGamma = 2800 [libretro INFO] Resource VICIIColorTint = 1000 [libretro INFO] Resource VICIIColorSaturation = 1000 [libretro INFO] Resource VICIIColorContrast = 1000 [libretro INFO] Resource VICIIColorBrightness = 1000 [libretro INFO] Resource UserportJoy = 0 [libretro INFO] Resource AutostartWarp = 0 [libretro INFO] Resource DriveTrueEmulation = 1 [libretro INFO] Resource VirtualDevices = 1 [libretro INFO] Resource AttachDevice8Readonly = 0 [libretro INFO] Resource EasyFlashWriteCRT = 1 [libretro INFO] Resource KernalName = "kernal" [libretro INFO] Resource DosName1541 = "dos1541" [libretro INFO] Resource DosName1571 = "dos1571" [libretro INFO] Resource DosName1581 = "dos1581" [libretro INFO] Resource DriveSoundEmulationVolume = 400 [libretro INFO] Resource DriveSoundEmulation = 1 [libretro INFO] Resource VICIIAudioLeak = 0 [libretro INFO] Resource SFXSoundExpander = 0 [libretro INFO] Resource SidResidSampling = 2 [libretro INFO] Resource SidResidPassband = 90 [libretro INFO] Resource SidResidGain = 97 [libretro INFO] Resource SidResidFilterBias = 500 [libretro INFO] Resource SidResid8580Passband = 90 [libretro INFO] Resource SidResid8580Gain = 97 [libretro INFO] Resource SidResid8580FilterBias = 1500 [libretro INFO] Resource SidStereo = 0 [libretro INFO] Resource REU = 0 [libretro INFO] Arg0: x64 [libretro INFO] Arg1: /home/ben/pkg/c64/no-intro/arka.g64 [libretro INFO] Autodetecting image type of /home/ben/pkg/c64/no-intro/arka.g64'. [libretro INFO] Attached file/home/ben/pkg/c64/no-intro/arka.g64' as a disk image. [libretro INFO] Autodetected image type 100. [libretro INFO] Resetting the machine to autostart '*' [libretro INFO] `/home/ben/pkg/c64/no-intro/arka.g64' recognized as disk image. [libretro INFO] Image for autostart: '/home/ben/pkg/c64/no-intro/arka.g64' Segmentation fault (core dumped)

sonninnos commented 3 years ago

Please try the current version from: http://artifacts.libretro.com/minio/nightly/

I haven't been able to reproduce such thing on Windows at all no matter the version (I wouldn't commit if that happens). Maybe the old buildbot is to blame, who knows.

TiBeN commented 3 years ago

Same thing with the nightly build. I just also tried with the older core (79292ad) in my retroarch 1.9.0 and it core dump too. In retroarch 1.8.5 (i have it through lutris) this one (79292ad) works ok however. Maybe it is related to Retroarch ?

sonninnos commented 3 years ago

Hard to imagine how RA version could matter, because then it should crash on all content formats, not just disks..

Could you run the debug build of RA and get the crash dump?

TiBeN commented 3 years ago

Below are two full bt with GDB (retroarch and libretro-vice (e1e4bdd9b) have been compiled with make DEBUG=1). Tell me if you want the core dump as well, i'll upload it somewere (is pretty big)

Using a NIB image:

[libretro INFO] Image for autostart: '/home/ben/.config/retroarch/saves/TEMP/.g64'

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault. 0x00007ffff3d4039a in __strlen_sse2 () from /usr/lib/libc.so.6 (gdb) bt full

0 0x00007ffff3d4039a in __strlen_sse2 () from /usr/lib/libc.so.6

No symbol table info available.

1 0x00007ffff3d30b43 in strdup () from /usr/lib/libc.so.6

No symbol table info available.

2 0x00007fffd171abfb in dc_add_file (dc=0x555556850790, filename=0x7fffc8793a50 "/home/ben/.config/retroarch/saves/TEMP/.g64", label=0x0, disk_label=0x0,

program=0x0) at libretro/libretro-dc.c:404
    file_label = "\000 \340UUU\000\000@D\346\363\377\177\000\000Image for autostart: '/home/ben/.config/retroarch/saves/TEMP/.g64'\n\000\377\177\000\000S\255\204\321\377\177\000\000\020\342\377\377\b\000\000\000P\342\377\377\377\177\000\000Hc\220\321\377\177\000\000\000Z\220\321\001\000\000\000\060\342\377\377\377\177\000\000z\245\213\321H\000\000\000 \343\377\377\377\177\000\000\016\256\204\321\377\177\000\000Hc\220\321\377\177\000\000PCsV\000\000\000\000`\342\377\377\377\177\000\000÷\204\321H\000\000\000\030\000\000\000\060\000\000\000\060"...

3 0x00007fffd170db05 in update_from_vice () at libretro/libretro-core.c:1181

    unit = 8
    attachedImage = 0x7fffc8793a50 "/home/ben/.config/retroarch/saves/TEMP/.g64"

4 0x00007fffd170e414 in reload_restart () at libretro/libretro-core.c:1405

No locals.

5 0x00007fffd1714c41 in retro_run () at libretro/libretro-core.c:5819

    updated = false

6 0x000055555564ce81 in core_run () at retroarch.c:38220

    p_rarch = 0x55555645ebc0 <rarch_st>
    current_core = 0x55555647b608 <rarch_st+117320>
    core_poll_type_override = POLL_TYPE_OVERRIDE_DONTCARE
    new_poll_type = 2
    early_polling = false
    late_polling = true
    netplay_preframe = true

7 0x000055555564ba64 in runloop_iterate () at retroarch.c:37585

    run_ahead_num_frames = 1
    want_runahead = false
    i = 5
    p_rarch = 0x55555645ebc0 <rarch_st>
    settings = 0x5555565c72b0
    fastforward_ratio = 0
    video_frame_delay = 0
    vrr_runloop_enable = true
    max_users = 5
    current_time = 39798343645
    discord_st = 0x555556478d38 <rarch_st+106872>

8 0x0000555555618c18 in rarch_main (argc=1, argv=0x7fffffffe6f8, data=0x0) at retroarch.c:14943

    ret = 1
    app_exit = false
    p_rarch = 0x55555645ebc0 <rarch_st>

9 0x00005555557daacb in main (argc=1, argv=0x7fffffffe6f8) at ui/drivers/qt/ui_qt_application.cpp:151

No locals. (gdb)

Using a D64 image:

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault. 0x00007ffff3d4039a in __strlen_sse2 () from /usr/lib/libc.so.6 (gdb) bt full

0 0x00007ffff3d4039a in __strlen_sse2 () from /usr/lib/libc.so.6

No symbol table info available.

1 0x00007ffff3d30b43 in strdup () from /usr/lib/libc.so.6

No symbol table info available.

2 0x00007fffd171abfb in dc_add_file (dc=0x555556850790, filename=0x7fffc8797f30 "/home/ben/pkg/c64/Arkanoid (1987)(Imagine)/Arkanoid (1987)(Imagine).d64",

label=0x0, disk_label=0x0, program=0x0) at libretro/libretro-dc.c:404
    file_label = "Arkanoid (1987)(Imagine)\000 autostart: '/home/ben/pkg/c64/Arkanoid (1987)(Imagine)/Arkanoid (1987)(Imagine).d64'\n\000Hc\220\321\377\177\000\000\000Z\220\321\001\000\000\000\060\342\377\377\377\177\000\000z\245\213\321d\000\000\000 \343\377\377\377\177\000\000\016\256\204\321\377\177\000\000Hc\220\321\377\177\000\000\360;\254V\000\000\000\000`\342\377\377\377\177\000\000÷\204\321d\000\000\000\030\000\000\000\060\000\000\000\060"...

3 0x00007fffd170db05 in update_from_vice () at libretro/libretro-core.c:1181

    unit = 8
    attachedImage = 0x7fffc8797f30 "/home/ben/pkg/c64/Arkanoid (1987)(Imagine)/Arkanoid (1987)(Imagine).d64"

4 0x00007fffd170e414 in reload_restart () at libretro/libretro-core.c:1405

No locals.

5 0x00007fffd1714c41 in retro_run () at libretro/libretro-core.c:5819

    updated = false

6 0x000055555564ce81 in core_run () at retroarch.c:38220

    p_rarch = 0x55555645ebc0 <rarch_st>
    current_core = 0x55555647b608 <rarch_st+117320>
    core_poll_type_override = POLL_TYPE_OVERRIDE_DONTCARE
    new_poll_type = 2
    early_polling = false

--Type for more, q to quit, c to continue without paging-- late_polling = true netplay_preframe = true

7 0x000055555564ba64 in runloop_iterate () at retroarch.c:37585

    run_ahead_num_frames = 1
    want_runahead = false
    i = 5
    p_rarch = 0x55555645ebc0 <rarch_st>
    settings = 0x5555565c72b0
    fastforward_ratio = 0
    video_frame_delay = 0
    vrr_runloop_enable = true
    max_users = 5
    current_time = 40807244263
    discord_st = 0x555556478d38 <rarch_st+106872>

8 0x0000555555618c18 in rarch_main (argc=1, argv=0x7fffffffe6f8, data=0x0) at retroarch.c:14943

    ret = 1
    app_exit = false
    p_rarch = 0x55555645ebc0 <rarch_st>

9 0x00005555557daacb in main (argc=1, argv=0x7fffffffe6f8) at ui/drivers/qt/ui_qt_application.cpp:151

No locals. (gdb)

sonninnos commented 3 years ago

Ok, I managed to recreate and fix both in a VM. Fix incoming shortly.

TiBeN commented 3 years ago

Thank you for your quick fix!

sonninnos commented 3 years ago

No problem. Please let me know how it goes.

TiBeN commented 3 years ago

Ok, so i compiled the core with your latest fix. The disk loading issue seems to be fixed (i can hear floppy spinning sound). But there is now another issue. The retroarch window stay black and make X11 really unstable or even crash totally (need to reboot the system the hard way). All other cores in my retroarch installation work correctly. Tell me if you want me to create another issue for this one. I don't know the state of the master branch, maybe it is in the middle of a rework in this area..

Here are the system logs:

Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: IH ring buffer overflow (0x00080980, 0x000076C0, 0x00000990) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x06004802 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x0011107D Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08008002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1118333, read from 'TC2' (0x54433200) (8) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x06104802 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00111939 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08008002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1120569, read from 'TC2' (0x54433200) (8) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x09280402 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00111B29 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08008002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1121065, read from 'TC2' (0x54433200) (8) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 146 0x0920480c for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00111D24 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08048002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1121572, read from 'TC0' (0x54433000) (72) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x09484802 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00111F14 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08044002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1122068, read from 'TC1' (0x54433100) (68) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x09200402 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x001118E0 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08004002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1120480, read from 'TC3' (0x54433300) (4) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x09400802 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00111AED Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08044002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1121005, read from 'TC1' (0x54433100) (68) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 146 0x0918480c for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x001118B5 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08048002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1120437, read from 'TC0' (0x54433000) (72) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x08d00802 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00111AA9 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08048002 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x02, vmid 4, pasid 32769) at page 1120937, read from 'TC0' (0x54433000) (72) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: GPU fault detected: 147 0x09580802 for process retroarch pid 1458 thread retroarch pid 1490 Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00101EBB Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0800400C Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: VM fault (0x0c, vmid 4, pasid 32769) at page 1056443, read from 'TC3' (0x54433300) (4) Dec 24 12:47:57 ben-fix kernel: amdgpu 0000:01:00.0: amdgpu: IH ring buffer overflow (0x00080980, 0x00000B80, 0x00000990)

sonninnos commented 3 years ago

Hmm, I have no idea how a software rendering core could trigger any GPU fault detected stuff. Nothing of that sort happened with a virtual Ubuntu, so I can't do much more I'm afraid..

TiBeN commented 3 years ago

Seems to be Vulkan driver related as it works correctly with gl drivers. Maybe there is something wrong with my compilation process (libraries ..), i'm not expert in this field. Anyway, i'll wait the official build through the online updater and fill a issue if it remains.

sonninnos commented 3 years ago

I use Vulkan on Windows, but can't get it to work in VM, so have to use GL only.. Still odd that the core can be doing something that goes against it.

TiBeN commented 3 years ago

I made some tests. This something related to shaders. It is a bit strange: The issue occurs when shader system is set to off (no shaders applied). If i apply a shader (global retroarch conf), Crt-royale for example, the core starts correctly. The issue occurs as well with current vice core from online updater. (i'm a fan of crt-royale so it is always activated normally, it were not during my tests as i tested with a bare configuration). The issue occurs with vice core only though. Others cores without shaders works well.

The logs stuck here when it occurs:

[INFO] [Vulkan]: Swapchain supports present mode: 0. [INFO] [Vulkan]: Swapchain supports present mode: 1. [INFO] [Vulkan]: Swapchain supports present mode: 2. [INFO] [Vulkan]: Swapchain supports present mode: 3. [INFO] [Vulkan]: Creating swapchain with present mode: 2 [INFO] [Vulkan]: Using swapchain size 1080 x 816.

Anyway, i normally use shaders so this is really no big deal.