mamedev / mame

MAME
https://www.mamedev.org/
Other
7.79k stars 1.96k forks source link

Vuklan/GLES issues for most Konami GX titles #10815

Open future-figs opened 1 year ago

future-figs commented 1 year ago

MAME version

0.251 8df400b6b9d05fc12644e2314bceb86aaf5792ce

System information

Fedora 36, x86-64, 16GB RAM, RTX 2080Ti, nvidia proprietary driver 525.60.11

Built with all symbols for debug purposes: make VERBOSE=1 REGENIE=1 SYMBOLS=1 SYMLEVEL=3 OPTIMIZE=0 SOURCES=src/mame/konami/konamigx.cpp,src/mame/sony/taitogn.cpp -j16

But issue also presents with a standard build, i.e. make -j16. Issue observed in GroovyMAME 0.251 as well.

INI configuration details

#
# CORE CONFIGURATION OPTIONS
#
readconfig                1
writeconfig               0

#
# CORE SEARCH PATH OPTIONS
#
homepath                  .
rompath                   roms
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 ctrlr
inipath                   .;ini
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair
pluginspath               plugins
languagepath              language
swpath                    software

#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory             cfg
nvram_directory           nvram
input_directory           inp
state_directory           sta
snapshot_directory        snap
diff_directory            diff
comment_directory         comments
share_directory           share

#
# CORE STATE/PLAYBACK OPTIONS
#
state                     
autosave                  0
rewind                    0
rewind_capacity           100
playback                  
record                    
exit_after_playback       0
mngwrite                  
aviwrite                  
wavwrite                  
snapname                  %g/%i
snapsize                  auto
snapview                  auto
snapbilinear              1
statename                 %g
burnin                    0

#
# CORE PERFORMANCE OPTIONS
#
autoframeskip             0
frameskip                 0
seconds_to_run            0
throttle                  1
sleep                     1
speed                     1.0
refreshspeed              0
lowlatency                0

#
# CORE RENDER OPTIONS
#
keepaspect                1
unevenstretch             1
unevenstretchx            0
unevenstretchy            0
autostretchxy             0
intoverscan               0
intscalex                 0
intscaley                 0

#
# CORE ROTATION OPTIONS
#
rotate                    1
ror                       0
rol                       0
autoror                   0
autorol                   0
flipx                     0
flipy                     0

#
# CORE ARTWORK OPTIONS
#
artwork_crop              0
fallback_artwork          
override_artwork          

#
# CORE SCREEN OPTIONS
#
brightness                1.0
contrast                  1.0
gamma                     1.0
pause_brightness          0.65
effect                    none

#
# CORE VECTOR OPTIONS
#
beam_width_min            1.0
beam_width_max            1.0
beam_dot_size             1.0
beam_intensity_weight     0
flicker                   0

#
# CORE SOUND OPTIONS
#
samplerate                48000
samples                   1
volume                    0
compressor                1
speaker_report            0

#
# CORE INPUT OPTIONS
#
coin_lockout              1
ctrlr                     
mouse                     0
joystick                  1
lightgun                  0
multikeyboard             0
multimouse                0
steadykey                 0
ui_active                 0
offscreen_reload          0
joystick_map              auto
joystick_deadzone         0.3
joystick_saturation       0.85
natural                   0
joystick_contradictory    0
coin_impulse              0

#
# CORE INPUT AUTOMATIC ENABLE OPTIONS
#
paddle_device             keyboard
adstick_device            keyboard
pedal_device              keyboard
dial_device               keyboard
trackball_device          keyboard
lightgun_device           keyboard
positional_device         keyboard
mouse_device              mouse

#
# CORE DEBUGGING OPTIONS
#
verbose                   0
log                       0
oslog                     0
debug                     0
update_in_pause           0
debugscript               
debuglog                  0

#
# CORE COMM OPTIONS
#
comm_localhost            0.0.0.0
comm_localport            15112
comm_remotehost           127.0.0.1
comm_remoteport           15112
comm_framesync            0

#
# CORE MISC OPTIONS
#
drc                       1
drc_use_c                 0
drc_log_uml               0
drc_log_native            0
bios                      
cheat                     0
skip_gameinfo             0
uifont                    default
ui                        cabinet
ramsize                   
confirm_quit              0
ui_mouse                  1
language                  
nvram_save                1

#
# SCRIPTING OPTIONS
#
autoboot_command          
autoboot_delay            0
autoboot_script           
console                   0
plugins                   1
plugin                    
noplugin                  

#
# HTTP SERVER OPTIONS
#
http                      0
http_port                 8080
http_root                 web

#
# OSD KEYBOARD MAPPING OPTIONS
#
uimodekey                 auto

#
# OSD FONT OPTIONS
#
uifontprovider            auto

#
# OSD OUTPUT OPTIONS
#
output                    auto

#
# OSD INPUT OPTIONS
#
keyboardprovider          auto
mouseprovider             auto
lightgunprovider          auto
joystickprovider          auto

#
# OSD DEBUGGING OPTIONS
#
debugger                  auto
debugger_port             23946
debugger_font             auto
debugger_font_size        0
watchdog                  0

#
# OSD PERFORMANCE OPTIONS
#
numprocessors             auto
bench                     0

#
# OSD VIDEO OPTIONS
#
video                     auto
numscreens                1
window                    0
maximize                  1
waitvsync                 0
syncrefresh               0
monitorprovider           auto

#
# OSD PER-WINDOW VIDEO OPTIONS
#
screen                    auto
aspect                    auto
resolution                auto
view                      auto
screen0                   auto
aspect0                   auto
resolution0               auto
view0                     auto
screen1                   auto
aspect1                   auto
resolution1               auto
view1                     auto
screen2                   auto
aspect2                   auto
resolution2               auto
view2                     auto
screen3                   auto
aspect3                   auto
resolution3               auto
view3                     auto

#
# OSD FULL SCREEN OPTIONS
#
switchres                 0

#
# OSD ACCELERATED VIDEO OPTIONS
#
filter                    1
prescale                  1

#
# OpenGL-SPECIFIC OPTIONS
#
gl_forcepow2texture       0
gl_notexturerect          0
gl_vbo                    1
gl_pbo                    1
gl_glsl                   0
gl_glsl_filter            1
glsl_shader_mame0         none
glsl_shader_mame1         none
glsl_shader_mame2         none
glsl_shader_mame3         none
glsl_shader_mame4         none
glsl_shader_mame5         none
glsl_shader_mame6         none
glsl_shader_mame7         none
glsl_shader_mame8         none
glsl_shader_mame9         none
glsl_shader_screen0       none
glsl_shader_screen1       none
glsl_shader_screen2       none
glsl_shader_screen3       none
glsl_shader_screen4       none
glsl_shader_screen5       none
glsl_shader_screen6       none
glsl_shader_screen7       none
glsl_shader_screen8       none
glsl_shader_screen9       none

#
# OSD SOUND OPTIONS
#
sound                     auto
audio_latency             2

#
# PORTAUDIO OPTIONS
#
pa_api                    none
pa_device                 none
pa_latency                0

#
# BGFX POST-PROCESSING OPTIONS
#
bgfx_path                 bgfx
bgfx_backend              auto
bgfx_debug                0
bgfx_screen_chains        default
bgfx_shadow_mask          slot-mask.png
bgfx_lut                  lut-default.png
bgfx_avi_name             auto

#
# SDL PERFORMANCE OPTIONS
#
sdlvideofps               0

#
# SDL VIDEO OPTIONS
#
centerh                   1
centerv                   1
scalemode                 none

#
# SDL FULL SCREEN OPTIONS
#
useallheads               0
attach_window             

#
# SDL KEYBOARD MAPPING
#
keymap                    0
keymap_file               keymap.dat

#
# SDL JOYSTICK MAPPING
#
sixaxis                   0

#
# SDL LIGHTGUN MAPPING
#
lightgun_index1           auto
lightgun_index2           auto
lightgun_index3           auto
lightgun_index4           auto
lightgun_index5           auto
lightgun_index6           auto
lightgun_index7           auto
lightgun_index8           auto

#
# SDL LOW-LEVEL DRIVER OPTIONS
#
videodriver               auto
renderdriver              auto
audiodriver               auto
gl_lib                    auto

#
# FRONTEND COMMAND OPTIONS
#
dtd                       1

Emulated system/software

crzcross daiskiss le2 salmndr2 sexyparo soccerss tbyahhoo tkmmpzdm vsnetscr

Incorrect behaviour

The default video backend settings work fine for all systems I've tried, except the Konami GX system. After the "imperfect emulation" warning, there is a black screen for a couple seconds followed by a segfault on about half of the software titles.

More than half the software titles for the Konami GX system do not work. After the "imperfect emulation" popup, there is a black screen for a couple seconds followed by a segfault on about half of the software titles.

Affected:

Not affected:

The following video backend settings reproduce this issue on my machine:

And the following settings resolve the issue:

I haven't seen issues like this outside of the konamigx system.

Expected behaviour

Segfaults should not occur. Vulkan and GLES should work normally, given that they are supported on my machine.

Steps to reproduce

Fresh install of MAME from git. mame.ini is completely default from ./mame -createconfig, except for the removal of $HOME/.mame/ from inipath.

Either load software from commandline or select from UI.

Additional details

Backtraces:

$ gdb mame
(gdb) run sexyparo -video bgfx -bgfx_backend gles
Starting program: /home/lorenzo/src/mame/mame sexyparo -video bgfx -bgfx_backend gles

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/ 
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe16a1640 (LWP 200807)]
[New Thread 0x7fffcfdff640 (LWP 200808)]
[New Thread 0x7fffcf5fe640 (LWP 200809)]
[New Thread 0x7fffcedfd640 (LWP 200810)]
[New Thread 0x7fffce3fc640 (LWP 200811)]
[New Thread 0x7fffcc2bb640 (LWP 200812)]
[New Thread 0x7fffbe7fa640 (LWP 200813)]
[New Thread 0x7fffbdff9640 (LWP 200832)]
[Thread 0x7fffbdff9640 (LWP 200832) exited]

Thread 2 "mame" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe16a1640 (LWP 200807)]
0x00007fffd3255834 in ?? () from /lib64/libnvidia-glcore.so.525.60.11
(gdb) bt
#0  0x00007fffd3255834 in ?? () from /lib64/libnvidia-glcore.so.525.60.11
#1  0x00007fffd3224d23 in ?? () from /lib64/libnvidia-glcore.so.525.60.11
#2  0x000000000285f847 in bgfx::vk::BufferVK::update (this=0x7fffe0c98498, _commandBuffer=0x7fffdc33ab50, _offset=0, _size=864, 
    _data=0x7fffbf3fe040, _discard=false) at ../../../../../3rdparty/bgfx/src/renderer_vk.cpp:4726
#3  0x0000000002868820 in bgfx::vk::RendererContextVK::submit (this=0x7fffe0c77010, _render=0x7fffe26b2440, _clearQuad=..., 
    _textVideoMemBlitter=...) at ../../../../../3rdparty/bgfx/src/renderer_vk.cpp:8122
#4  0x00000000027e66da in bgfx::Context::renderFrame (this=0x7fffe26b2040, _msecs=5000) at ../../../../../3rdparty/bgfx/src/bgfx.cpp:2455
#5  0x00000000027e4a08 in bgfx::renderFrame (_msecs=-1) at ../../../../../3rdparty/bgfx/src/bgfx.cpp:1489
#6  0x00000000027f83c7 in bgfx::Context::renderThread () at ../../../../../3rdparty/bgfx/src/bgfx_p.h:3148
#7  0x000000000293963f in bx::Thread::entry (this=0x7fffe26b2240) at ../../../../../3rdparty/bx/src/thread.cpp:328
#8  0x0000000002939294 in bx::ThreadInternal::threadFunc (_arg=0x7fffe26b2240) at ../../../../../3rdparty/bx/src/thread.cpp:95
#9  0x00007ffff5e8cded in start_thread (arg=<optimized out>) at pthread_create.c:442
#10 0x00007ffff5f12370 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
$ gdb mame
(gdb) run sexyparo -video bgfx -bgfx_backend vulkan
Starting program: /home/lorenzo/src/mame/mame sexyparo -video bgfx -bgfx_backend vulkan

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/ 
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe16a1640 (LWP 202299)]
[New Thread 0x7fffcfdff640 (LWP 202313)]
[New Thread 0x7fffcf5fe640 (LWP 202314)]
[New Thread 0x7fffcedfd640 (LWP 202315)]
[New Thread 0x7fffce3fc640 (LWP 202316)]
[New Thread 0x7fffcc2bb640 (LWP 202317)]
[New Thread 0x7fffbe7fa640 (LWP 202318)]
[New Thread 0x7fffbdff9640 (LWP 202323)]
[Thread 0x7fffbdff9640 (LWP 202323) exited]

Thread 2 "mame" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe16a1640 (LWP 202299)]
0x00007fffd3255834 in ?? () from /lib64/libnvidia-glcore.so.525.60.11
(gdb) bt
#0  0x00007fffd3255834 in ?? () from /lib64/libnvidia-glcore.so.525.60.11
#1  0x00007fffd3224d23 in ?? () from /lib64/libnvidia-glcore.so.525.60.11
#2  0x000000000285f847 in bgfx::vk::BufferVK::update (this=0x7fffe0c98478, _commandBuffer=0x7fffdc3390c0, _offset=0, _size=864, 
    _data=0x7fffbf9ff040, _discard=false) at ../../../../../3rdparty/bgfx/src/renderer_vk.cpp:4726
#3  0x0000000002868820 in bgfx::vk::RendererContextVK::submit (this=0x7fffe0c77010, _render=0x7fffe3f92b00, _clearQuad=..., 
    _textVideoMemBlitter=...) at ../../../../../3rdparty/bgfx/src/renderer_vk.cpp:8122
#4  0x00000000027e66da in bgfx::Context::renderFrame (this=0x7fffe26b2040, _msecs=5000) at ../../../../../3rdparty/bgfx/src/bgfx.cpp:2455
#5  0x00000000027e4a08 in bgfx::renderFrame (_msecs=-1) at ../../../../../3rdparty/bgfx/src/bgfx.cpp:1489
#6  0x00000000027f83c7 in bgfx::Context::renderThread () at ../../../../../3rdparty/bgfx/src/bgfx_p.h:3148
#7  0x000000000293963f in bx::Thread::entry (this=0x7fffe26b2240) at ../../../../../3rdparty/bx/src/thread.cpp:328
#8  0x0000000002939294 in bx::ThreadInternal::threadFunc (_arg=0x7fffe26b2240) at ../../../../../3rdparty/bx/src/thread.cpp:95
#9  0x00007ffff5e8cded in start_thread (arg=<optimized out>) at pthread_create.c:442
#10 0x00007ffff5f12370 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
future-figs commented 1 year ago

Somehow forgot about logs...

bgfx + opengl: ``` $ ./mame -v -video bgfx -bgfx_backend opengl sexyparo Attempting load of mame.ini Parsing mame.ini Attempting load of mame.ini Parsing mame.ini Attempting load of horizont.ini Attempting load of arcade.ini Attempting load of raster.ini Attempting load of source/konamigx.ini Attempting load of konamigx.ini Attempting load of sexyparo.ini Starting plugin data... Attempting load of mame.ini Parsing mame.ini Attempting load of mame.ini Parsing mame.ini Attempting load of horizont.ini Attempting load of arcade.ini Attempting load of raster.ini Attempting load of source/konamigx.ini Attempting load of konamigx.ini Attempting load of sexyparo.ini Available videodrivers: wayland x11 KMSDRM offscreen dummy evdev Current Videodriver: x11 Display #0 Renderdrivers: opengl (0x0) opengles2 (0x0) opengles (0x0) software (0x0) Display #1 Renderdrivers: opengl (0x0) opengles2 (0x0) opengles (0x0) software (0x0) Display #2 Renderdrivers: opengl (0x0) opengles2 (0x0) opengles (0x0) software (0x0) Available audio drivers: pulseaudio alsa jack pipewire dsp disk dummy Build version: 0.251 (mame0251-138-g8df400b6b9d-dirty) Build architecure: Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 Build defines 1: LSB_FIRST=1 PTR64=1 SDL/OpenGL defines: SDL_COMPILEDVERSION=4600 USE_OPENGL=1 Compiler defines A: __GNUC__=12 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="12.2.1 20221121 (Red Hat 12.2.1-4)" Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1 Compiler defines C: __USE_FORTIFY_LEVEL=0 Enter init_monitors Adding monitor screen0 (2560 x 1440) Adding monitor screen1 (1024 x 768) Adding monitor screen2 (1080 x 1920) Leave init_monitors Enter sdlwindow_init Hints: SDL_FRAMEBUFFER_ACCELERATION (NULL) SDL_RENDER_DRIVER (NULL) SDL_RENDER_OPENGL_SHADERS (NULL) SDL_RENDER_SCALE_QUALITY (NULL) SDL_RENDER_VSYNC (NULL) SDL_VIDEO_X11_XVIDMODE (NULL) SDL_VIDEO_X11_XINERAMA (NULL) SDL_VIDEO_X11_XRANDR (NULL) SDL_GRAB_KEYBOARD (NULL) SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS (NULL) SDL_IOS_IDLE_TIMER_DISABLED (NULL) SDL_IOS_ORIENTATIONS (NULL) SDL_XINPUT_ENABLED (NULL) SDL_GAMECONTROLLERCONFIG (NULL) SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS (NULL) SDL_ALLOW_TOPMOST (NULL) SDL_TIMER_RESOLUTION (NULL) SDL_RENDER_DIRECT3D_THREADSAFE (NULL) SDL_VIDEO_ALLOW_SCREENSAVER (NULL) SDL_ACCELEROMETER_AS_JOYSTICK (NULL) SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK (NULL) SDL_VIDEO_WIN_D3DCOMPILER (NULL) SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT (NULL) SDL_VIDEO_MAC_FULLSCREEN_SPACES (NULL) SDL_MOUSE_RELATIVE_MODE_WARP (NULL) SDL_RENDER_DIRECT3D11_DEBUG (NULL) SDL_VIDEO_HIGHDPI_DISABLED (NULL) SDL_WINRT_PRIVACY_POLICY_URL (NULL) SDL_WINRT_PRIVACY_POLICY_LABEL (NULL) SDL_WINRT_HANDLE_BACK_BUTTON (NULL) Leave sdlwindow_init Enter sdl_info::create Audio: Start initialization Audio: Driver is pulseaudio Audio: frequency: 48000, channels: 2, samples: 512 sdl_create_buffers: creating stream buffer of 25600 bytes Audio: End initialization Keyboard: Start initialization Input: Adding keyboard #1: System keyboard (device id: System keyboard) Keyboard: Registered System keyboard Keyboard: End initialization Mouse: Start initialization Input: Adding mouse #1: System mouse (device id: System mouse) Mouse: Registered System mouse Mouse: End initialization Lightgun: Begin initialization Lightgun: End initialization Joystick: Start initialization Input: Adding joystick #1: Xbox Series X Controller (device id: 0300509d5e040000120b000007050000) Joystick: Xbox Series X Controller [GUID 0300509d5e040000120b000007050000] Vendor ID 045E, Product ID 0B12, Revision 0507, Serial Joystick: ... 6 axes, 12 buttons 1 hats 0 balls Joystick: ... Has haptic capability Joystick: End initialization Searching font Liberation Sans in -. path/s Matching font: 0x5f21b20 unzip: opened archive file roms/sexyparo.zip unzip: found roms/sexyparo.zip ECD unzip: roms/sexyparo.zip has no ZIP64 ECD locator unzip: read roms/sexyparo.zip central directory unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: opened archive file roms/konamigx.zip unzip: found roms/konamigx.zip ECD unzip: roms/konamigx.zip has no ZIP64 ECD locator unzip: read roms/konamigx.zip central directory unzip: closing archive file roms/konamigx.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache Optional I/O port ':LIGHT1_Y' not found Optional I/O port ':LIGHT1_X' not found Optional I/O port ':LIGHT0_Y' not found Optional I/O port ':LIGHT0_X' not found Optional I/O port ':AN1' not found Optional I/O port ':AN0' not found Optional shared pointer ':paletteram' not found Optional shared pointer ':k053936_0_li16' not found Optional shared pointer ':k053936_0_ct16' not found Optional shared pointer ':k053936_0_line' not found Optional shared pointer ':k053936_0_ctrl' not found Optional shared pointer ':subpaletteram' not found Optional shared pointer ':psacram' not found Optional device ':gfxdecode' not found Optional device ':k053250_2' not found Optional device ':k053250_1' not found Optional memory region ':eeprom' not found Optional memory region ':screen' not found Starting Sexy Parodius (ver JAA) ':' (missing dependencies; rescheduling) Starting Motorola MC68EC020 ':maincpu' Starting Motorola MC68000 ':soundcpu' Starting Texas Instruments TMS57002 "DASP" ':dasp' (missing dependencies; rescheduling) Starting K053252 Timing/Interrupt Controller ':k053252' (missing dependencies; rescheduling) Starting Serial EEPROM 93C46 (64x16) ':eeprom' Starting Video Screen ':screen' Starting palette ':palette' Starting K056832 Tilemap Generator ':k056832' Starting K055555 Priority Encoder ':k055555' Starting K054338 Mixer ':k054338' Starting K055673 Sprite Generator ':k055673' Starting Speaker ':lspeaker' (missing dependencies; rescheduling) Starting Speaker ':rspeaker' (missing dependencies; rescheduling) Starting K056800 MIRAC ':k056800' Starting K054539 ADPCM ':k054539_1' Starting K054539 ADPCM ':k054539_2' Starting Sexy Parodius (ver JAA) ':' (missing dependencies; rescheduling) Starting Texas Instruments TMS57002 "DASP" ':dasp' Starting K053252 Timing/Interrupt Controller ':k053252' Starting Speaker ':lspeaker' Starting Speaker ':rspeaker' Starting Sexy Parodius (ver JAA) ':' Attempting to parse: default.cfg Attempting to parse: sexyparo.cfg sdl_kill: closing audio Enter sdlwindow_exit Leave sdlwindow_exit ```
bgfx & gles ``` $ ./mame -v -video bgfx -bgfx_backend gles sexyparo Attempting load of mame.ini Parsing mame.ini Attempting load of mame.ini Parsing mame.ini Attempting load of horizont.ini Attempting load of arcade.ini Attempting load of raster.ini Attempting load of source/konamigx.ini Attempting load of konamigx.ini Attempting load of sexyparo.ini Starting plugin data... Attempting load of mame.ini Parsing mame.ini Attempting load of mame.ini Parsing mame.ini Attempting load of horizont.ini Attempting load of arcade.ini Attempting load of raster.ini Attempting load of source/konamigx.ini Attempting load of konamigx.ini Attempting load of sexyparo.ini Available videodrivers: wayland x11 KMSDRM offscreen dummy evdev Current Videodriver: x11 Display #0 Renderdrivers: opengl (0x0) opengles2 (0x0) opengles (0x0) software (0x0) Display #1 Renderdrivers: opengl (0x0) opengles2 (0x0) opengles (0x0) software (0x0) Display #2 Renderdrivers: opengl (0x0) opengles2 (0x0) opengles (0x0) software (0x0) Available audio drivers: pulseaudio alsa jack pipewire dsp disk dummy Build version: 0.251 (mame0251-138-g8df400b6b9d-dirty) Build architecure: Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 Build defines 1: LSB_FIRST=1 PTR64=1 SDL/OpenGL defines: SDL_COMPILEDVERSION=4600 USE_OPENGL=1 Compiler defines A: __GNUC__=12 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="12.2.1 20221121 (Red Hat 12.2.1-4)" Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1 Compiler defines C: __USE_FORTIFY_LEVEL=0 Enter init_monitors Adding monitor screen0 (2560 x 1440) Adding monitor screen1 (1024 x 768) Adding monitor screen2 (1080 x 1920) Leave init_monitors Enter sdlwindow_init Hints: SDL_FRAMEBUFFER_ACCELERATION (NULL) SDL_RENDER_DRIVER (NULL) SDL_RENDER_OPENGL_SHADERS (NULL) SDL_RENDER_SCALE_QUALITY (NULL) SDL_RENDER_VSYNC (NULL) SDL_VIDEO_X11_XVIDMODE (NULL) SDL_VIDEO_X11_XINERAMA (NULL) SDL_VIDEO_X11_XRANDR (NULL) SDL_GRAB_KEYBOARD (NULL) SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS (NULL) SDL_IOS_IDLE_TIMER_DISABLED (NULL) SDL_IOS_ORIENTATIONS (NULL) SDL_XINPUT_ENABLED (NULL) SDL_GAMECONTROLLERCONFIG (NULL) SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS (NULL) SDL_ALLOW_TOPMOST (NULL) SDL_TIMER_RESOLUTION (NULL) SDL_RENDER_DIRECT3D_THREADSAFE (NULL) SDL_VIDEO_ALLOW_SCREENSAVER (NULL) SDL_ACCELEROMETER_AS_JOYSTICK (NULL) SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK (NULL) SDL_VIDEO_WIN_D3DCOMPILER (NULL) SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT (NULL) SDL_VIDEO_MAC_FULLSCREEN_SPACES (NULL) SDL_MOUSE_RELATIVE_MODE_WARP (NULL) SDL_RENDER_DIRECT3D11_DEBUG (NULL) SDL_VIDEO_HIGHDPI_DISABLED (NULL) SDL_WINRT_PRIVACY_POLICY_URL (NULL) SDL_WINRT_PRIVACY_POLICY_LABEL (NULL) SDL_WINRT_HANDLE_BACK_BUTTON (NULL) Leave sdlwindow_init Enter sdl_info::create Audio: Start initialization Audio: Driver is pulseaudio Audio: frequency: 48000, channels: 2, samples: 512 sdl_create_buffers: creating stream buffer of 25600 bytes Audio: End initialization Keyboard: Start initialization Input: Adding keyboard #1: System keyboard (device id: System keyboard) Keyboard: Registered System keyboard Keyboard: End initialization Mouse: Start initialization Input: Adding mouse #1: System mouse (device id: System mouse) Mouse: Registered System mouse Mouse: End initialization Lightgun: Begin initialization Lightgun: End initialization Joystick: Start initialization Input: Adding joystick #1: Xbox Series X Controller (device id: 0300509d5e040000120b000007050000) Joystick: Xbox Series X Controller [GUID 0300509d5e040000120b000007050000] Vendor ID 045E, Product ID 0B12, Revision 0507, Serial Joystick: ... 6 axes, 12 buttons 1 hats 0 balls Joystick: ... Has haptic capability Joystick: End initialization Searching font Liberation Sans in -. path/s Matching font: 0x7b78730 unzip: opened archive file roms/sexyparo.zip unzip: found roms/sexyparo.zip ECD unzip: roms/sexyparo.zip has no ZIP64 ECD locator unzip: read roms/sexyparo.zip central directory unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: opened archive file roms/konamigx.zip unzip: found roms/konamigx.zip ECD unzip: roms/konamigx.zip has no ZIP64 ECD locator unzip: read roms/konamigx.zip central directory unzip: closing archive file roms/konamigx.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache unzip: found roms/sexyparo.zip in cache unzip: opened archive file roms/sexyparo.zip unzip: closing archive file roms/sexyparo.zip and sending to cache Optional I/O port ':LIGHT1_Y' not found Optional I/O port ':LIGHT1_X' not found Optional I/O port ':LIGHT0_Y' not found Optional I/O port ':LIGHT0_X' not found Optional I/O port ':AN1' not found Optional I/O port ':AN0' not found Optional shared pointer ':paletteram' not found Optional shared pointer ':k053936_0_li16' not found Optional shared pointer ':k053936_0_ct16' not found Optional shared pointer ':k053936_0_line' not found Optional shared pointer ':k053936_0_ctrl' not found Optional shared pointer ':subpaletteram' not found Optional shared pointer ':psacram' not found Optional device ':gfxdecode' not found Optional device ':k053250_2' not found Optional device ':k053250_1' not found Optional memory region ':eeprom' not found Optional memory region ':screen' not found Starting Sexy Parodius (ver JAA) ':' (missing dependencies; rescheduling) Starting Motorola MC68EC020 ':maincpu' Starting Motorola MC68000 ':soundcpu' Starting Texas Instruments TMS57002 "DASP" ':dasp' (missing dependencies; rescheduling) Starting K053252 Timing/Interrupt Controller ':k053252' (missing dependencies; rescheduling) Starting Serial EEPROM 93C46 (64x16) ':eeprom' Starting Video Screen ':screen' Starting palette ':palette' Starting K056832 Tilemap Generator ':k056832' Starting K055555 Priority Encoder ':k055555' Starting K054338 Mixer ':k054338' Starting K055673 Sprite Generator ':k055673' Starting Speaker ':lspeaker' (missing dependencies; rescheduling) Starting Speaker ':rspeaker' (missing dependencies; rescheduling) Starting K056800 MIRAC ':k056800' Starting K054539 ADPCM ':k054539_1' Starting K054539 ADPCM ':k054539_2' Starting Sexy Parodius (ver JAA) ':' (missing dependencies; rescheduling) Starting Texas Instruments TMS57002 "DASP" ':dasp' Starting K053252 Timing/Interrupt Controller ':k053252' Starting Speaker ':lspeaker' Starting Speaker ':rspeaker' Starting Sexy Parodius (ver JAA) ':' Attempting to parse: default.cfg Attempting to parse: sexyparo.cfg zsh: segmentation fault (core dumped) ```

Not too interesting:

$ diff opengl.log gles.log 
120c120
< Matching font: 0x7695320
---
> Matching font: 0x7b78730
213,216d212
< sdl_kill: closing audio
< Sound buffer: overflows=0 underflows=23
< Enter sdlwindow_exit
< Leave sdlwindow_exit

One more interesting detail is that, on the blue info screen and "imperfect emulation" screen, I can hear some horrible sound coming from my PC case. Pretty sure it's GPU coil whine. This only happens in the problem cases, when a segfault is incoming.

cuavas commented 1 year ago

I can confirm something is going wrong, even after the latest updates (as of 0b67aa20c703ae7602ade2c0c12790d2eafe167c). It’s reproducible on Windows as well, although it doesn’t manifest as a crash, just a black screen. This is a blocker for making BGFX default. I’ll mention it on #10859.

cuavas commented 1 year ago

For some reason, GLES works with these games on Windows, but not Vulkan.

cuavas commented 1 year ago

For completeness, I’m testing on Windows 10 Pro 20H2 with consumer GeForce driver version 517.66.

MistyDreams commented 1 year ago

I can confirm I hit an assert on linux with the asan build.

mamed: ../../../../../src/mame/konami/k053246_k053247_k055673.cpp:903: virtual void k055673_device::device_start(): Assertion `!(m_gfxrom.length() & (m_gfxrom.length() - 1))' failed.
zsh: IOT instruction (core dumped)  ./mamed sexyparo -video bgfx -bgfx_backend vulkan

I can commented out the assert here is the output. It happens on the opengl and vulkan backend look very simular to the lethaj issue

=================================================================
==73533==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f0695b09810 at pc 0x563c3df9dccc bp 0x7f06abd191f0 sp 0x7f06abd189b0
READ of size 4096 at 0x7f0695b09810 thread T1
    #0 0x563c3df9dccb in __interceptor_memcpy.part.0 asan_interceptors.cpp.o
    #1 0x7f06a84bb696  (/usr/lib/dri/radeonsi_dri.so+0x174696) (BuildId: 15828f698bc436620bdee5aafafbb8dd3bf93555)
    #2 0x7f06a847cd01  (/usr/lib/dri/radeonsi_dri.so+0x135d01) (BuildId: 15828f698bc436620bdee5aafafbb8dd3bf93555)
    #3 0x7f06a8481023  (/usr/lib/dri/radeonsi_dri.so+0x13a023) (BuildId: 15828f698bc436620bdee5aafafbb8dd3bf93555)
    #4 0x7f06a848951b  (/usr/lib/dri/radeonsi_dri.so+0x14251b) (BuildId: 15828f698bc436620bdee5aafafbb8dd3bf93555)
    #5 0x563c55c43261 in texSubImage /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/renderer_gl.cpp:1404:4
    #6 0x563c55c43261 in bgfx::gl::TextureGL::update(unsigned char, unsigned char, bgfx::Rect const&, unsigned short, unsigned short, unsigned short, bgfx::Memory const*) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/renderer_gl.cpp:6042:4
    #7 0x563c55c6b2f3 in bgfx::gl::RendererContextGL::updateTexture(bgfx::TextureHandle, unsigned char, unsigned char, bgfx::Rect const&, unsigned short, unsigned short, unsigned short, bgfx::Memory const*) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/renderer_gl.cpp:3376:28
    #8 0x563c55b164be in bgfx::Context::flushTextureUpdateBatch(bgfx::CommandBuffer&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:2578:18
    #9 0x563c55b144a3 in bgfx::Context::rendererExecCommands(bgfx::CommandBuffer&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:3365:3
    #10 0x563c55b06e30 in bgfx::Context::renderFrame(int) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:2448:5
    #11 0x563c55b06b1f in bgfx::renderFrame(int) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:1489:38
    #12 0x563c55b3ff69 in bgfx::Context::renderThread(bx::Thread*, void*) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx_p.h:3148:35
    #13 0x563c55dd68cb in entry /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bx/src/thread.cpp:328:20
    #14 0x563c55dd68cb in bx::ThreadInternal::threadFunc(void*) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bx/src/thread.cpp:95:20
    #15 0x7f06b79eb8fc  (/usr/lib/libc.so.6+0x868fc) (BuildId: 768945cdf5e5796c2ab39f38ed160748fd94d12e)
    #16 0x7f06b7a6dd1f  (/usr/lib/libc.so.6+0x108d1f) (BuildId: 768945cdf5e5796c2ab39f38ed160748fd94d12e)

0x7f0695b09810 is located 0 bytes to the right of 344080-byte region [0x7f0695ab5800,0x7f0695b09810)
allocated by thread T0 here:
    #0 0x563c3dfb6a79 in __interceptor_malloc (/home/misty/Source/mame/mamed+0xc15aa79) (BuildId: 88412cc1020e2904572125e0ce81f9d84c188bf4)
    #1 0x563c55b64f2d in bgfx::AllocatorStub::realloc(void*, unsigned long, unsigned long, char const*, unsigned int) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:220:13
    #2 0x563c55b1cd36 in alloc /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bx/include/bx/inline/allocator.inl:37:22
    #3 0x563c55b1cd36 in alloc /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:4068:26
    #4 0x563c55b1cd36 in bgfx::copy(void const*, unsigned int) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:4077:23
    #5 0x563c53d1f385 in bgfx_util::mame_texture_data_to_bgfx_texture_data(bgfx::TextureFormat::Enum&, unsigned int, int, int, int, rgb_t const*, void*, unsigned short&, int&, int&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/render/bgfxutil.cpp
    #6 0x563c53cb2d1a in chain_manager::update_screen_textures(unsigned int, render_primitive*, osd_window&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/render/bgfx/chainmanager.cpp:560:29
    #7 0x563c53b602cc in renderer_bgfx::draw(int) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/render/drawbgfx.cpp:1154:35
    #8 0x563c53c1e1e0 in sdl_window_info::update() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/window.cpp:538:17
    #9 0x563c53c181c3 in sdl_osd_interface::update(bool) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/video.cpp:104:12
    #10 0x563c53a1638b in video_manager::frame_update(bool) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/video.cpp:242:18
    #11 0x563c5393f8da in screen_device::vblank_end(int) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/screen.cpp:1679:21
    #12 0x563c5392e62a in operator() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #13 0x563c5392e62a in device_scheduler::execute_timers() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/schedule.cpp:951:5
    #14 0x563c53928836 in device_scheduler::timeslice() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/schedule.cpp:505:2
    #15 0x563c537e839b in running_machine::run(bool) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:330:17
    #16 0x563c55deaf0b in mame_machine_manager::execute() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:287:19
    #17 0x563c55faa355 in cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:277:22
    #18 0x563c55fadbf9 in cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:293:3
    #19 0x563c55dee590 in emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:454:18
    #20 0x563c53b1a7f5 in main /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:100:9
    #21 0x7f06b798828f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 768945cdf5e5796c2ab39f38ed160748fd94d12e)

Thread T1 created by T0 here:
    #0 0x563c3df283f8 in __interceptor_pthread_create (/home/misty/Source/mame/mamed+0xc0cc3f8) (BuildId: 88412cc1020e2904572125e0ce81f9d84c188bf4)
    #1 0x563c55dd733e in bx::Thread::init(int (*)(bx::Thread*, void*), void*, unsigned int, char const*) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bx/src/thread.cpp:184:12
    #2 0x563c55b0806d in bgfx::Context::init(bgfx::Init const&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:1934:13
    #3 0x563c55b178c7 in bgfx::init(bgfx::Init const&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../3rdparty/bgfx/src/bgfx.cpp:3554:14
    #4 0x563c53b689f4 in init_bgfx_library /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/render/drawbgfx.cpp:364:7
    #5 0x563c53b689f4 in osd::(anonymous namespace)::video_bgfx::create(osd_window&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/render/drawbgfx.cpp:272:8
    #6 0x563c53b69471 in non-virtual thunk to osd::(anonymous namespace)::video_bgfx::create(osd_window&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/render/drawbgfx.cpp
    #7 0x563c53ca14e6 in osd_window::renderer_create() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/osdwindow.cpp:119:32
    #8 0x563c53c1b48f in sdl_window_info::complete_create() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/window.cpp:704:2
    #9 0x563c53c1cab4 in sdl_window_info::window_init() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/window.cpp:356:15
    #10 0x563c53c17125 in sdl_osd_interface::video_init() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/video.cpp:70:12
    #11 0x563c53b1f462 in osd_common_t::init_subsystems() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/modules/lib/osdobj_common.cpp:625:7
    #12 0x563c53c0f226 in sdl_osd_interface::init(running_machine&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/osdsdl.cpp:279:16
    #13 0x563c537e3d54 in running_machine::start() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:152:18
    #14 0x563c537e7b1a in running_machine::run(bool) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:282:3
    #15 0x563c55deaf0b in mame_machine_manager::execute() /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:287:19
    #16 0x563c55faa355 in cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:277:22
    #17 0x563c55fadbf9 in cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:293:3
    #18 0x563c55dee590 in emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:454:18
    #19 0x563c53b1a7f5 in main /home/misty/Source/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:100:9
    #20 0x7f06b798828f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 768945cdf5e5796c2ab39f38ed160748fd94d12e)

SUMMARY: AddressSanitizer: heap-buffer-overflow asan_interceptors.cpp.o in __interceptor_memcpy.part.0
Shadow bytes around the buggy address:
  0x0fe152b592b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe152b592c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe152b592d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe152b592e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe152b592f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0fe152b59300: 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe152b59310: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe152b59320: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe152b59330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe152b59340: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe152b59350: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==73533==ABORTING
    ~/Source/mame    master *1 !2                                                                                                                                                              1 ✘  8s  
MooglyGuy commented 1 year ago

Thanks for the ASAN report, that should make it easy enough for me to track down on Windows.

MistyDreams commented 1 year ago

I do find it odd that it might be nothing but i started this with backend vulkan and its referencing gl calls

MooglyGuy commented 1 year ago

It's almost as if both Vulkan and OpenGL are both managed by Khronos Group. Just let me handle it.

future-figs commented 1 year ago

Testing again with MAME 0.254, these titles now all work by default. Using -video bgfx -bgfx_backend vulkan or -video bgfx -bgfx_backend gles still cause a crash as originally described. Maybe -video bgfx -bgfx_backend opengl is being automatically selected now?