I was noticing that ct486 would segfault on exit with more than one screen (-numscreens 2). Runs fine, just blows up on quitting.

Using Ubuntu 20.04.3 and -video bgfx


coredumpctl debug

Stack trace of thread 1622130:
#0 0x000056178490eed8 _ZN4bgfx5resetEjjjNS_13TextureFormat4EnumE (mame + 0xe82eed8)
#1 0x000056177fa17d11 _ZN13renderer_bgfxD1Ev (mame + 0x9937d11)
#2 0x000056177fa1802d _ZN13renderer_bgfxD0Ev (mame + 0x993802d)
#3 0x000056177f9ede37 _ZN15sdl_window_infoD1Ev (mame + 0x990de37)
#4 0x000056177f9f75c8 _ZN17sdl_event_managerD1Ev (mame + 0x99175c8)
#5 0x00007fb77ee01a27 __run_exit_handlers (libc.so.6 + 0x49a27)
#6 0x00007fb77ee01be0 __GI_exit (libc.so.6 + 0x49be0)
#7 0x000056177acff002 main (mame + 0x4c1f002)
#8 0x00007fb77eddf0b3 __libc_start_main (libc.so.6 + 0x270b3)
#9 0x000056177adf831e _start (mame + 0x4d1831e)

Stack trace of thread 1622159:

[New LWP 1622162]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./mame ct486 -debugger_font DejaVu Sans Mono -debugger_font_size 12 -console -s'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000056178490eed8 in bgfx::reset(unsigned int, unsigned int, unsigned int, bgfx::TextureFormat::Enum) ()
[Current thread is 1 (Thread 0x7fb77be2b880 (LWP 1622130))]
(gdb) quit