Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mario Tennis (USA) crashes (segfault) randomly after 3-5 minutes of play #481

Open
elipp opened this issue Mar 2, 2023 · 3 comments
Open

Comments

@elipp
Copy link

elipp commented Mar 2, 2023

Using RetroArch 1.14.0 with libretro-mupen64plus-next 1:454, on Arch Linux.

I can provide a core dump / more system information, if that's useful to anyone :)

@elipp
Copy link
Author

elipp commented Mar 2, 2023

I compiled mupen64plus-libretro-nx with debug flags and ran it through gdb:

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x00007fffa69fee56 in rglBlitFramebuffer (srcX0=0, srcY0=0, srcX1=106, srcY1=108, dstX0=0, dstY0=0, dstX1=106, dstY1=108, mask=16384, filter=9728) at libretro-common/glsm/glsm.c:2680
2680	   const bool good_target = framebuffers[gl_state.framebuf[0].desired_location]->target == framebuffers[gl_state.framebuf[1].desired_location]->target;
(gdb) where
#0  0x00007fffa69fee56 in rglBlitFramebuffer (srcX0=0, srcY0=0, srcX1=106, srcY1=108, dstX0=0, dstY0=0, dstX1=106, dstY1=108, mask=16384, filter=9728) at libretro-common/glsm/glsm.c:2680
#1  0x00007fffa68a9628 in BlitFramebuffersImpl::blitFramebuffers(graphics::Context::BlitFramebuffersParams const&) (this=0x5555580a1e80, _params=...) at ./GLideN64/src/Graphics/Parameter.h:16
#2  0x00007fffa68494ac in FrameBuffer::_getSubTexture(unsigned int) (_t=<optimized out>, this=0x55555bf4e850) at GLideN64/src/FrameBuffer.cpp:417
#3  FrameBuffer::_getSubTexture(unsigned int) (this=0x55555bf4e850, _t=<optimized out>) at GLideN64/src/FrameBuffer.cpp:379
#4  0x00007fffa68496cf in FrameBuffer::getTexture(unsigned int) (this=0x55555bf4e850, _t=_t@entry=0) at GLideN64/src/FrameBuffer.cpp:497
#5  0x00007fffa684bd58 in FrameBuffer_ActivateBufferTexture(unsigned int, unsigned int) (t=0, _frameBufferAddress=871040) at GLideN64/src/FrameBuffer.cpp:1726
#6  0x00007fffa6865a2e in TextureCache::update(unsigned int) (this=<optimized out>, _t=_t@entry=0) at GLideN64/src/Textures.cpp:2047
#7  0x00007fffa686d9d0 in GraphicsDrawer::_updateTextures() const (this=this@entry=0x7fffa6b6c678 <DisplayWindow::get()::video+1112>) at GLideN64/src/GraphicsDrawer.cpp:633
#8  0x00007fffa686dae0 in GraphicsDrawer::_updateStates(DrawingState) const (this=this@entry=0x7fffa6b6c678 <DisplayWindow::get()::video+1112>, _drawingState=_drawingState@entry=DrawingState::Triangle)
    at GLideN64/src/GraphicsDrawer.cpp:665
#9  0x00007fffa686e0f5 in GraphicsDrawer::_prepareDrawTriangle(DrawingState) (this=this@entry=0x7fffa6b6c678 <DisplayWindow::get()::video+1112>, _drawingState=_drawingState@entry=DrawingState::Triangle)
    at GLideN64/src/GraphicsDrawer.cpp:829
#10 0x00007fffa686e242 in GraphicsDrawer::drawTriangles() (this=0x7fffa6b6c678 <DisplayWindow::get()::video+1112>) at GLideN64/src/GraphicsDrawer.cpp:856
#11 0x00007fffa68e8860 in F3DEX_Tri2(unsigned int, unsigned int) (w0=<optimized out>, w1=<optimized out>) at GLideN64/src/uCodes/F3DEX.cpp:34
#12 0x00007fffa685ad90 in _ProcessDList () at GLideN64/src/RSP.cpp:59
#13 RSP_ProcessDList() () at GLideN64/src/RSP.cpp:182
#14 0x00007fffa6a03eca in send_dlist_to_gfx_plugin (hle=0x7fffac431a80 <g_hle>) at mupen64plus-rsp-hle/src/hle.c:197
#15 0x00007fffa6a0ac3f in hleDoRspCycles (Cycles=4294967295) at mupen64plus-rsp-hle/src/plugin.c:182
#16 0x00007fffa697eb93 in do_SP_Task (sp=0x7fffafd398c8 <g_dev+59783368>) at mupen64plus-core/src/device/rcp/rsp/rsp_core.c:322
#17 0x00007fffa697ccb0 in mem_write32 (mask=4294967295, value=293, address=67371024, handler=<optimized out>) at ./mupen64plus-core/src/device/memory/memory.h:87
#18 r4300_write_aligned_word (r4300=r4300@entry=0x7fffac436000 <g_dev>, address=67371024, value=293, mask=mask@entry=4294967295) at mupen64plus-core/src/device/r4300/r4300_core.c:367
#19 0x00007fffa69c4c79 in write_word_new (pcaddr=<optimized out>, count=8) at mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c:2164
#20 0x00007fffacd81e82 in g_dev () at /usr/lib/libretro/mupen64plus_next_libretro.so
#21 0x00007fffaed37100 in g_dev () at /usr/lib/libretro/mupen64plus_next_libretro.so
#22 0x00007fffa6971645 in gen_interrupt (r4300=0xfffe0fec) at mupen64plus-core/src/device/r4300/interrupt.c:653
#23 0x00007fffa6a0af87 in cc_interrupt () at /usr/lib/libretro/mupen64plus_next_libretro.so
#24 0x00000000a430000c in  ()
#25 0x0000000000000000 in  ()
(gdb)

@elipp
Copy link
Author

elipp commented Mar 2, 2023

Some more info, variables etc.

(gdb) p gl_state
$10 = {bind_textures = {ids = {130069, 206, 227, 0, 210, 241, 0 <repeats 26 times>}, target = {3553 <repeats 32 times>}}, attrib_pointer = {used = {true, true, true, false, true, true, true, true}, size = {1, 4,
      2, 0, 4, 4, 2, 2}, type = {2, 5126, 5126, 0, 5120, 5126, 5126, 5126}, normalized = "\006\024\000\000\001\024\000", stride = {0, 52, 52, 0, 52, 40, 40, 40}, pointer = {0x34, 0x10, 0x20, 0x0, 0x30, 0x0,
      0x10, 0x18}, buffer = {40, 0, 19, 0, 19, 18, 18, 18}}, colorlogicop = 19, vertex_attrib_pointer = {enabled = {true, true, true, false, true, true, false, false}}, bindvertex = {array = 3}, pixelstore_i = {
    pname = 0, param = 0}, pixelstore = {pack = 4, unpack = 4}, clear_color = {r = 0, g = 0, b = 0, a = 0}, scissor = {used = true, x = 0, y = 0, w = 640, h = 373}, viewport = {x = 0, y = 0, w = 1067, h = 1067},
  blendfunc = {used = true, sfactor = 770, dfactor = 771}, blendfunc_separate = {used = true, srcRGB = 1, dstRGB = 35065, srcAlpha = 1, dstAlpha = 34185}, colormask = {used = false, red = 1 '\001',
    green = 1 '\001', blue = 1 '\001', alpha = 1 '\001'}, cleardepth = {used = false, depth = 0}, depthfunc = {used = true, func = 519}, depthrange = {used = false, zNear = 0, zFar = 0}, polygonoffset = {
    used = true, factor = -3, units = -3}, stencilfunc = {used = false, func = 0, ref = 0, mask = 0}, stencilop = {used = false, sfail = 0, dpfail = 0, dppass = 0}, frontface = {used = false, mode = 2305},
  cullface = {used = false, mode = 1028}, stencilmask = {used = false, mask = 0}, depthmask = {used = true, mask = 0 '\000'}, readbuffer = {mode = 0}, framebuf = {{location = 128002, desired_location = 128002}, {
      location = 0, desired_location = 128001}}, vao = 1, array_buffer = 0, index_buffer = 20, program = 53, active_texture = 0, cap_state = {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, cap_translate = {2929,
    3042, 32823, 2912, 2884, 3008, 3089, 2960, 34383, 12288, 3024, 32926, 32928, 3058}}
(gdb) p framebuffers[128001]
$27 = (struct gl_framebuffers *) 0x0
(gdb) p framebuffers[128002]
$28 = (struct gl_framebuffers *) 0x0
(gdb) p framebuffers[0]
$29 = (struct gl_framebuffers *) 0x0

@igorcafe
Copy link

igorcafe commented Mar 2, 2024

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants