Bug 82538

Summary: Super Maryo Chronicles fails with st/mesa assertion failure
Product: Mesa Reporter: Michel Dänzer <michel>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: laszlo.kertesz, maraeo
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Michel Dänzer 2014-08-13 00:56:48 UTC
Super Maryo Chronicles (smc) fails to start up on radeonsi with this assertion failure:

../../../src/mesa/state_tracker/st_atom_array.c:417:setup_interleaved_attribs: Assertion `array->_ElementSize == _mesa_bytes_per_vertex_attrib(array->Size, array->Type)' failed.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007fffe881bb86 in _debug_assert_fail (expr=expr@entry=0x7fffe8b605b0 "array->_ElementSize == _mesa_bytes_per_vertex_attrib(array->Size, array->Type)", 
    file=file@entry=0x7fffe8b604d8 "../../../src/mesa/state_tracker/st_atom_array.c", line=line@entry=417, function=function@entry=0x7fffe8b60710 <__func__.35322> "setup_interleaved_attribs")
    at ../../../../src/gallium/auxiliary/util/u_debug.c:309
309	   os_abort();
(gdb) bt
#0  0x00007fffe881bb86 in _debug_assert_fail (expr=expr@entry=0x7fffe8b605b0 "array->_ElementSize == _mesa_bytes_per_vertex_attrib(array->Size, array->Type)", 
    file=file@entry=0x7fffe8b604d8 "../../../src/mesa/state_tracker/st_atom_array.c", line=line@entry=417, function=function@entry=0x7fffe8b60710 <__func__.35322> "setup_interleaved_attribs")
    at ../../../../src/gallium/auxiliary/util/u_debug.c:309
#1  0x00007fffe866d8f6 in setup_interleaved_attribs (vpv=0xf97870, velements=0x7fffffffcf10, vbuffer=0x7fffffffd110, arrays=0x986de0, vp=0xf9b590)
    at ../../../src/mesa/state_tracker/st_atom_array.c:416
#2  update_array (st=0x9059c0) at ../../../src/mesa/state_tracker/st_atom_array.c:566
#3  0x00007fffe866cdb1 in st_validate_state (st=st@entry=0x9059c0) at ../../../src/mesa/state_tracker/st_atom.c:213
#4  0x00007fffe8677691 in st_Clear (ctx=0x9d74a0, mask=18) at ../../../src/mesa/state_tracker/st_cb_clear.c:449
[...]

This doesn't seem to happen with Mesa 10.2.4.
Comment 1 smoki 2014-08-14 23:42:01 UTC
 It works fine for me on Kabini :). Mesa git d7d8260f70326cd294715203dae8a8f0150680c1, llvm 3.5-rc2, smc as Debian package in Sid.
 
 Or maybe you think about these 2.0 beta or git version?

 http://www.secretmaryo.org/phpBB3/viewtopic.php?f=1&t=9975
 https://github.com/Secretchronicles/SMC
Comment 2 Michel Dänzer 2014-08-18 06:08:05 UTC
(In reply to comment #1)
>  It works fine for me on Kabini :). Mesa git
> d7d8260f70326cd294715203dae8a8f0150680c1, llvm 3.5-rc2,

I can still reproduce it with current Mesa Git. Does your Mesa build have assertions enabled?


> smc as Debian package in Sid.

Same here, currently version 1.9+git20121121-1.1.
Comment 3 Michel Dänzer 2014-08-18 06:53:58 UTC
Bisected it to:

commit 734e4946f50c1b83dafdb18ced652abc88e6a246
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Fri Jul 11 00:05:44 2014 +0200

    mesa: fix crash in st/mesa after deleting a VAO

    This happens when glGetMultisamplefv (or any other non-draw function) is
    called, which doesn't invoke the VBO module to update _DrawArrays and
    the pointer is invalid at that point.

    However st/mesa still dereferences it to setup vertex buffers ==> crash.
Comment 4 smoki 2014-08-18 13:15:45 UTC
(In reply to comment #2)
> (In reply to comment #1)
> I can still reproduce it with current Mesa Git. Does your Mesa build have
> assertions enabled?
> 

 Ah sorry did not have it that time, so yeah bug is there.
Comment 5 Michel Dänzer 2014-08-19 01:12:08 UTC
*** Bug 82046 has been marked as a duplicate of this bug. ***
Comment 6 Marek Olšák 2014-09-04 14:11:58 UTC
Fixed by 374f3e9e19f064007ea8a864fbd00f1ae7deafd1. Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.