Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08523 Crash/Freeze Critical (emulator) Always Dec 1, 2022, 02:18 Dec 6, 2022, 13:46
Tester Hydreigon View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Open OS Windows 10/11 (64-bit)
Status [?] Confirmed Driver
Version 0.250 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08523: gradius4, nbapbp: Crashes during POST if running at 15khz
Description Both crash in the exact same spot during the DSP check if running at 15khz low resolution.

nbapbp backtrace:
-----------------------------------------------------
Exception at EIP=00007ff7c658b7d1 (void voodoo::voodoo_renderer::rasterizer<5u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967295u>(int, poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::extent_t const&, voodoo::poly_data const&, int)+0x1321): ACCESS VIOLATION
While attempting to write memory at 0000025a7ba7fcd8
-----------------------------------------------------
RAX=0000025a7ba7fb00 RBX=0000000000000000 RCX=0000000000008f8f RDX=0000000000000000
RSI=0000000000000000 RDI=0000000000000000 RBP=00000000000000ec RSP=000000c2909ff830
 R8=00000000000000f3  R9=0000000000000780 R10=0000000000000000 R11=0000000000000000
R12=0000000000000000 R13=0000000000000000 R14=0000000000000000 R15=000002587a3deb80
-----------------------------------------------------
Stack crawl:
  000000c2909ffa50: 00007ff7c658b7d1 (void voodoo::voodoo_renderer::rasterizer<5u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967295u>(int, poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::extent_t const&, voodoo::poly_data const&, int)+0x1321)
  000000c2909ffaf0: 00007ff7c659a40f (poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::work_item_callback(void*, int)+0x008f)
  000000c2909ffb50: 00007ff7c1d5cda8 (worker_thread_process(osd_work_queue*, work_thread_info*) [clone .isra.0]+0x00a8)
  000000c2909ffbe0: 00007ff7c1d5cfcb (worker_thread_entry(void*)+0x009b)
  000000c2909ffc10: 00007ff7c1d5db4e (std::thread::_State_impl<std::thread::_Invoker<std::tuple<void* (*)(void*), work_thread_info*> > >::_M_run()+0x000e)
  000000c2909ffc50: 00007ff7c7f61151 (execute_native_thread_routine+0x0011)
  000000c2909ffc90: 00007ff7c4910c4b (pthread_create_wrapper+0x009b)
  000000c2909ffcc0: 00007ffdd5a4af5a (beginthreadex+0x012a)
  000000c2909ffcf0: 00007ffdd5a4b02c (endthreadex+0x00ac)
  000000c2909ffd20: 00007ffdd65274b4 (BaseThreadInitThunk+0x0014)
  000000c2909ffda0: 00007ffdd66e26a1 (RtlUserThreadStart+0x0021)
Steps To Reproduce Set DIP1 (Skip POST) to off and DIP 8 (Monitor Type) to 15khz/on
Boot the game with these settings
Crash during DSP check
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems gradius4, nbapbp
Attached Files
png file icon nbapbp.png (311,679 bytes) Dec 1, 2022, 02:18 Uploaded by Hydreigon
The spot before it crashes
Hydreigon
Relationships
There are no relationship linked to this issue.
Notes
3
User avatar
No.20883
Robbbert
Senior Tester
Dec 1, 2022, 12:00
Confirmed.

gradius4 simply quits to the command-line without a dump, however nbapbp produced the same dump as above.
User avatar
No.20903
Hydreigon
Tester
Dec 4, 2022, 02:48
edited on: Dec 4, 2022, 03:31
Getting a near identical error in gradius4
Thread 65 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10968.0x2134]
0x00000000026639b1 in void voodoo::voodoo_renderer::rasterizer<5u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967295u>(int, poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::extent_t const&, voodoo::poly_data const&, int) ()
(gdb) bt
#0  0x00000000026639b1 in void voodoo::voodoo_renderer::rasterizer<5u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967295u>(int, poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::extent_t const&, voodoo::poly_data const&, int) ()
#1  0x000000000113f5d3 in poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::work_item_callback(void*, int)
    ()
#2  0x0000000000bd2cc8 in worker_thread_process(osd_work_queue*, work_thread_info*) [clone .isra.0] ()
#3  0x0000000000bd2edb in worker_thread_entry(void*) ()
#4  0x0000000002a818c1 in execute_native_thread_routine ()
#5  0x000000000107e5f3 in pthread_create_wrapper ()
#6  0x00007ffdd5a4af5a in msvcrt!_beginthreadex () from /c/WINDOWS/System32/msvcrt.dll
#7  0x00007ffdd5a4b02c in msvcrt!_endthreadex () from /c/WINDOWS/System32/msvcrt.dll
#8  0x00007ffdd65274b4 in KERNEL32!BaseThreadInitThunk () from /c/WINDOWS/System32/KERNEL32.DLL
#9  0x00007ffdd66e26a1 in ntdll!RtlUserThreadStart () from /c/WINDOWS/SYSTEM32/ntdll.dll
#10 0x0000000000000000 in ?? ()
sscope and sscope2 crash in the second video board test with the exact same error (as the second video board runs at 15khz). Can't think of what else to say about this voodoo 15khz phenomenon.
User avatar
No.20923
Firewave
Senior Tester
Dec 6, 2022, 13:46
==4760==ERROR: AddressSanitizer: SEGV on unknown address 0x7f6e94a31d80 (pc 0x7f6d2b45168e bp 0x7f6c929afa40 sp 0x7f6c929af3e0 T24)
==4760==The signal is caused by a READ memory access.
    #0 0x7f6d2b45168e in write_pixel /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/voodoo_render.cpp:2123:15
    #1 0x7f6d2b45168e in void voodoo::voodoo_renderer::rasterizer<5u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967294u, 4294967295u>(int, poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::extent_t const&, voodoo::poly_data const&, int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/voodoo_render.cpp:2389:4
    #2 0x7f6d2b3b5107 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #3 0x7f6d2b3b5107 in poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::work_item_callback(void*, int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/poly.h:625:4
    #4 0x7f6d36f1696a in worker_thread_process(osd_work_queue*, work_thread_info*) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdsync.cpp:771:19
    #5 0x7f6d36f1539a in worker_thread_entry(void*) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdsync.cpp:699:4
    #6 0x7f6d36f192cb in __invoke_impl<void *, void *(*)(void *), work_thread_info *> /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14
    #7 0x7f6d36f192cb in std::__invoke_result<void* (*)(void*), work_thread_info*>::type std::__invoke<void* (*)(void*), work_thread_info*>(void* (*&&)(void*), work_thread_info*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14
    #8 0x7f6d36f19294 in void* std::thread::_Invoker<std::tuple<void* (*)(void*), work_thread_info*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:252:13
    #9 0x7f6d36f19213 in operator() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:259:11
    #10 0x7f6d36f19213 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void* (*)(void*), work_thread_info*> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:210:13
    #11 0x7f6ce67644a2  (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xd44a2) (BuildId: 98d8785afb57e401b67e01e87fa38311328c4656)
    #12 0x7f6ce64f8fd3 in start_thread nptl/./nptl/pthread_create.c:442:8
    #13 0x7f6ce657880f in clone misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:100

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/voodoo_render.cpp:2123:15 in write_pixel
Thread T24 created by T0 here:
    #0 0x7f6d0d410dcc in pthread_create (/mnt/s/GitHub/mame/mame+0x2508fdcc) (BuildId: 454ad2a67ab8776e)
    #1 0x7f6ce6764578 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xd4578) (BuildId: 98d8785afb57e401b67e01e87fa38311328c4656)
    #2 0x7f6d36f14d9a in osd_work_queue_alloc(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdsync.cpp:304:24
    #3 0x7f6d2b4188cb in poly_manager<float, voodoo::poly_data, 0, (unsigned char)2>::poly_manager(running_machine&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/poly.h:474:13
    #4 0x7f6d2b40f548 in voodoo::voodoo_renderer::voodoo_renderer(running_machine&, unsigned short, rgb_t const*, voodoo::voodoo_regs&, voodoo::voodoo_regs*, voodoo::voodoo_regs*) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/voodoo_render.cpp:1234:2
    #5 0x7f6d2b3a4b5f in std::__detail::_MakeUniq<voodoo::voodoo_renderer>::__single_object std::make_unique<voodoo::voodoo_renderer, running_machine&, unsigned short&, rgb_t (&) [65536], voodoo::voodoo_regs&, voodoo::voodoo_regs*, voodoo::voodoo_regs*>(running_machine&, unsigned short&, rgb_t (&) [65536], voodoo::voodoo_regs&, voodoo::voodoo_regs*&&, voodoo::voodoo_regs*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:1065:34
    #6 0x7f6d2b37f84d in voodoo_1_device::device_start() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/voodoo.cpp:1009:15
    #7 0x7f6d2cffdfd0 in device_t::start() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:562:2
    #8 0x7f6d33a0b6df in running_machine::start_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1013:13
    #9 0x7f6d33a096b4 in running_machine::start() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:211:2
    #10 0x7f6d33a0c4dc in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:281:3
    #11 0x7f6d2b8d30df in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #12 0x7f6d2cc8c2f6 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&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:275:22
    #13 0x7f6d2cc8fe3f 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> > > >&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:291:3
    #14 0x7f6d2b8d7ebf 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> > > >&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:454:18
    #15 0x7f6d33d0257b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #16 0x7f6ce6497189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16