mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

mupen64plus-video-arachnoid - Segfault after starting #678

Closed orbea closed 4 years ago

orbea commented 7 years ago

OS: Slackware64-current libdrm-2016.09.06_0659558_master-x86_64-1_git mesa-2016.09.27_8d8c440_master-x86_64-1_git xorg-server-1.18.4-x86_64-1 mupen64plus-2016.09.13_5fa30ab-x86_64-1_SBo mupen64plus-video-arachnoid-2a79d28

Since the mupen64plus-video-arachnoid repo does not have an issue tracker, I will post this here so that this issue is documented somewhere.

When starting a rom with mupen64plus --gfx mupen64plus-video-arachnoid /path/to/rom mupen64plus will render a flashing window with garbage for a few seconds before segfaulting. Does this plugin work anywhere?

Video Warning: F3DEX2_MoveMem - Light - Unimplemented
Segmentation fault
(gdb) bt
#0  0x00007ffff73215cf in raise () from /usr/lib64/debug/libc.so.6
#1  0x00007ffff73231ba in abort () from /usr/lib64/debug/libc.so.6
#2  0x00007ffff7319b67 in __assert_fail_base () from /usr/lib64/debug/libc.so.6
#3  0x00007ffff7319c12 in __assert_fail () from /usr/lib64/debug/libc.so.6
#4  0x00007fffeaf6141e in translate_source (src=1)
    at main/ff_fragment_shader.cpp:200
#5  0x00007fffeaf61c53 in make_state_key (ctx=0x7a4f10, key=0x7ffffffb5250)
    at main/ff_fragment_shader.cpp:453
#6  0x00007fffeaf656ac in _mesa_get_fixed_func_fragment_program (ctx=0x7a4f10)
    at main/ff_fragment_shader.cpp:1290
#7  0x00007fffeb05feeb in update_program (ctx=0x7a4f10) at main/state.c:169
#8  0x00007fffeb0607e2 in _mesa_update_state_locked (ctx=0x7a4f10)
    at main/state.c:468
#9  0x00007fffeb060891 in _mesa_update_state (ctx=0x7a4f10) at main/state.c:499
#10 0x00007fffeaf20fd3 in _mesa_valid_to_render (ctx=0x7a4f10, 
    where=0x7fffeb637d8c "glDrawArrays") at main/context.c:1950
#11 0x00007fffeaf01823 in check_valid_to_render (ctx=0x7a4f10, 
    function=0x7fffeb637d8c "glDrawArrays") at main/api_validate.c:44
#12 0x00007fffeaf02475 in validate_draw_arrays (ctx=0x7a4f10, 
    func=0x7fffeb637d8c "glDrawArrays", mode=4, count=6, numInstances=1)
    at main/api_validate.c:558
#13 0x00007fffeaf02581 in _mesa_validate_DrawArrays (ctx=0x7a4f10, mode=4, 
    count=6) at main/api_validate.c:614
#14 0x00007fffeb0e644d in vbo_exec_DrawArrays (mode=4, start=0, count=6)
    at vbo/vbo_exec_array.c:614
#15 0x00007fffefaa46c7 in render (this=<optimized out>)
    at ../../src/renderer/OpenGLRenderer.cpp:222
#16 processDisplayList (this=0x7deec0) at ../../src/DisplayListParser.cpp:148
#17 processDisplayList (this=<optimized out>) at ../../src/GraphicsPlugin.cpp:374
#18 ProcessDList () at ../../src/main.cpp:316
#19 0x00007fffeeefface in HleProcessDlistList (
    UNUSED_user_defined=<optimized out>) at ../../src/plugin.c:101
#20 forward_gfx_task () at ../../src/hle.c:172
#21 normal_task_dispatching (hle=<optimized out>) at ../../src/hle.c:297
#22 hle_execute (hle=<optimized out>) at ../../src/hle.c:125
#23 DoRspCycles (Cycles=4294967295) at ../../src/plugin.c:182
#24 0x00007ffff4e915d6 in do_SP_Task (sp=<optimized out>)
    at ../../src/rsp/rsp_core.c:281
#25 0x00007ffff4eb761a in update_sp_status (sp=0x7ffff6dd7aa0 <g_sp>, 
    w=<optimized out>) at ../../src/rsp/rsp_core.c:151
#26 write_rsp_regs.constprop.70 (address=<optimized out>, value=<optimized out>, 
    mask=<optimized out>, opaque=0x7ffff6dd7aa0 <g_sp>)
    at ../../src/rsp/rsp_core.c:218
#27 0x00007fffe2bde2df in ?? ()
#28 0x000000000085a660 in ?? ()
#29 0x00007ffff4e78576 in dyna_start (code=<optimized out>)
    at ../../src/r4300/x86_64/rjump.c:64
#30 r4300_execute () at ../../src/r4300/r4300.c:276
#31 main_run () at ../../src/main/main.c:1013
#32 0x0000000000000001 in ?? ()
#33 0x0000000000000000 in ?? ()

apitrace - http://ks392457.kimsufi.com/orbea/stuff/trace/mupen64plus/mupen64plus-video-arachnoid.trace.xz

gdb log - http://pastebin.com/QR49kvss apitrace log - http://pastebin.com/FwPUGD7r

orbea commented 7 years ago

The above crash only occurs with rsp-hle where both rsp-cxd4-sse2 and rsp-z64 will freeze on a black screen instead of crashing.

When started with mesa and libdrm which have deubugging symbols and without gdb it will also print.

mupen64plus: main/ff_fragment_shader.cpp:200: GLuint translate_source(GLenum): Assertion `0' failed.
richard42 commented 7 years ago

I don't support Arachnoid; it's not included with the official bundle releases, and no-one is currently working on it. We just host the repo here for sort of historical purposes, or in case somebody decided they want to start working on it. I just tested the latest code from the git repository and it does run (at least Mario Kart) on my gentoo linux PC.

From the stack trace, it looks like a glDrawArrays call is crashing. It could be a bug in mesa, or your video drivers, or in arachnoid. I'm running with the fglrx drivers with an AMD card.

orbea commented 7 years ago

I suspect it could be a combination of the above, I'm using nouveau here. I've updated mesa a few times since and now it will just black screen with rsp-cxd4 or rsp-z64. It will continue to segfault with rsp-hle.

I'm not fully expecting this to be fixed, just for the sake documentation I wanted this issue stored somewhere publicly.