Bug 23859 - Assertion failure in SGIS_genereate_mipmaps path
Summary: Assertion failure in SGIS_genereate_mipmaps path
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
: 23230 23422 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-11 02:17 UTC by Mateusz Kaduk
Modified: 2009-09-24 12:50 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mateusz Kaduk 2009-09-11 02:17:52 UTC
Game error.log shows

[11/09/2009 11:08:23] [RenderizerGL][gl_ext_loader_arb.cpp(1631)] glBindVertexArrayARB function not found
[11/09/2009 11:08:23] [RenderizerGL][gl_ext_loader_arb.cpp(1632)] Error loading ARB_vertex_array_object

While game crash dump shows

libs/libcore_client.so(_ZN10ClientBase14save_backtraceEv+0x5c) [0x7f9c1158266c]
libs/libcore_client.so(_ZN10ClientBase12client_crashEi+0x8) [0x7f9c11582858]
/lib/libc.so.6 [0x7f9c0db48db0]
/lib/libc.so.6(gsignal+0x35) [0x7f9c0db48d25]
/lib/libc.so.6(abort+0x181) [0x7f9c0db4bde1]
/lib/libc.so.6(__assert_fail+0xe9) [0x7f9c0db41f99]
/usr/lib/dri/i965_dri.so [0x7f9c0aea925a]
/usr/lib/dri/i965_dri.so(brw_validate_state+0x17e) [0x7f9c0aeb56ce]
/usr/lib/dri/i965_dri.so(brw_draw_prims+0x305) [0x7f9c0aea8165]
/usr/lib/dri/i965_dri.so [0x7f9c0af61e4d]
/usr/lib/dri/i965_dri.so(intel_generate_mipmap+0x49c) [0x7f9c0ae77f6c]
/usr/lib/dri/i965_dri.so [0x7f9c0ae9a94f]
/usr/lib/dri/i965_dri.so [0x7f9c0ae9b5ad]
/usr/lib/dri/i965_dri.so(_mesa_TexImage2D+0x29a) [0x7f9c0af4384a]
libs/libopengl_api.so(_ZN8Engine3D12RenderizerGL17gl_upload_textureE13CSmartPointerI7TextureEPNS_9TextureGLEi+0xa57) [0x7f9c0fdadb37]
libs/libopengl_api.so(_ZN8Engine3D12RenderizerGL16register_textureE13CSmartPointerI7TextureE+0x21e) [0x7f9c0fdb096e]
libs/libopengl_api.so(_ZN8Engine3D12RenderizerGL20init_graphics_systemEiiibb+0x1c70) [0x7f9c0fdbe580]
libs/libcommon_entities.so(_ZN13DisplayEntity15creation_notifyEP7Message+0x43b) [0x7f9c10ddd2eb]
libs/libentity_system.so(_ZN13EntityManager32initialize_entity_as_custom_typeEPKciS1_P7MessageP6Entity+0x3b4) [0x7f9c0f62b374]
libs/libregnum_client.so(_ZN10GameClient19initialize_entitiesEv+0x219) [0x7f9c11c9f7c9]
libs/libregnum_client.so(_ZN10GameClient4initEiPPc+0x6f7) [0x7f9c11ca23f7]
libs/libregnum_client.so(_ZN10GameClientC1EiPPc+0x919) [0x7f9c11ca38a9]
./game(main+0x27e) [0x40126e]
/lib/libc.so.6(__libc_start_main+0xe6) [0x7f9c0db355c6]
./game(__gxx_personality_v0+0x62) [0x400efa]

OpenGL renderer string: Mesa DRI Intel(R) 965GM GEM 20090712 2009Q2 RC3 
OpenGL version string: 2.1 Mesa 7.7-devel
OpenGL shading language version string: 1.20

kernel 2.6.31-vanilla AMD64
libdrm2 2.4.13-1 

mesa (master) 7c0152fbaeb21ab423a9de339b85c54d1713432b
Comment 1 Mateusz Kaduk 2009-09-11 02:22:59 UTC
Also launching game in safe mode which disables most of fancy OpenGL stuff but game should start, cause OS freez and hard reboot is needed.

This happened 3 out of 3 times I tested it so 100% reproducible.

Game is RegnumOnline(http://www.regnumonline.com.ar/)
Comment 2 Ian Romanick 2009-09-13 15:22:14 UTC
(In reply to comment #0)
> Game error.log shows
> 
> [11/09/2009 11:08:23] [RenderizerGL][gl_ext_loader_arb.cpp(1631)]
> glBindVertexArrayARB function not found

There is obviously a bug in the driver.  However, you should also submit a bug for this game.  There is no glBindVertexArrayARB function.  The functions added by that extension DO NOT have the ARB suffix.  glBindVertexArray is the correct name.

> [11/09/2009 11:08:23] [RenderizerGL][gl_ext_loader_arb.cpp(1632)] Error loading
> ARB_vertex_array_object
> 
> While game crash dump shows
> 
> libs/libcore_client.so(_ZN10ClientBase14save_backtraceEv+0x5c) [0x7f9c1158266c]
> libs/libcore_client.so(_ZN10ClientBase12client_crashEi+0x8) [0x7f9c11582858]
> /lib/libc.so.6 [0x7f9c0db48db0]
> /lib/libc.so.6(gsignal+0x35) [0x7f9c0db48d25]
> /lib/libc.so.6(abort+0x181) [0x7f9c0db4bde1]
> /lib/libc.so.6(__assert_fail+0xe9) [0x7f9c0db41f99]
> /usr/lib/dri/i965_dri.so [0x7f9c0aea925a]
> /usr/lib/dri/i965_dri.so(brw_validate_state+0x17e) [0x7f9c0aeb56ce]
> /usr/lib/dri/i965_dri.so(brw_draw_prims+0x305) [0x7f9c0aea8165]
> /usr/lib/dri/i965_dri.so [0x7f9c0af61e4d]
> /usr/lib/dri/i965_dri.so(intel_generate_mipmap+0x49c) [0x7f9c0ae77f6c]
> /usr/lib/dri/i965_dri.so [0x7f9c0ae9a94f]
> /usr/lib/dri/i965_dri.so [0x7f9c0ae9b5ad]
> /usr/lib/dri/i965_dri.so(_mesa_TexImage2D+0x29a) [0x7f9c0af4384a]

Can you run this game in GDB (perhaps via SSH)?  It would be helpful to know the line numbers in the stack track.

I suspect this may be triggered by the new metaops code.
Comment 3 Mateusz Kaduk 2009-09-14 05:19:52 UTC
(In reply to comment #2)
> Can you run this game in GDB (perhaps via SSH)?  It would be helpful to know
> the line numbers in the stack track.
> 
> I suspect this may be triggered by the new metaops code.
> 

I am not sure if this is correct, since this game spawns child process and reported some not loaded libraries when I try to run it from gdb, but here it goes

[Thread debugging using libthread_db enabled]
game: brw_draw_upload.c:412: brw_prepare_vertices: Assertion `input->offset < input->bo->size' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff7e2c720 (LWP 7701)]
0x00007ffff3d38d25 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff3d38d25 in raise () from /lib/libc.so.6
#1  0x00007ffff3d3bde1 in abort () from /lib/libc.so.6
#2  0x00007ffff3d31f99 in __assert_fail () from /lib/libc.so.6
#3  0x00007ffff109828a in brw_prepare_vertices (brw=0x5ab870)
    at brw_draw_upload.c:412
#4  0x00007ffff10a46fe in brw_validate_state (brw=0x5ab870)
    at brw_state_upload.c:321
#5  0x00007ffff1097195 in brw_try_draw_prims (ctx=0x5ab870, arrays=0x5f6f58, 
    prim=0x7fffffffc1c0, nr_prims=1, ib=0x0, 
    index_bounds_valid=<value optimized out>, min_index=0, max_index=3)
    at brw_draw.c:371
#6  brw_draw_prims (ctx=0x5ab870, arrays=0x5f6f58, prim=0x7fffffffc1c0, 
    nr_prims=1, ib=0x0, index_bounds_valid=<value optimized out>, min_index=0, 
    max_index=3) at brw_draw.c:454
#7  0x00007ffff115112d in vbo_exec_DrawArrays (mode=6, start=0, count=4)
    at vbo/vbo_exec_array.c:523
#8  0x00007ffff1066f9c in intel_generate_mipmap_level (ctx=0x5ab870, 
    target=3553, texObj=0x919b10) at intel_generatemipmap.c:109
#9  intel_generate_mipmap_2d (ctx=0x5ab870, target=3553, texObj=0x919b10)
    at intel_generatemipmap.c:197
#10 intel_generate_mipmap (ctx=0x5ab870, target=3553, texObj=0x919b10)
    at intel_generatemipmap.c:252
#11 0x00007ffff108997f in intelTexImage (ctx=0x5ab870, dims=2, target=3553, 
---Type <return> to continue, or q <return> to quit---
    level=0, internalFormat=6408, width=64, height=64, depth=1, border=0, 
    format=6408, type=5121, pixels=0x915ae0, unpack=0x5b92f0, texObj=0x919b10, 
    texImage=0x91a090, imageSize=0, compressed=0 '\0') at intel_tex_image.c:552
#12 0x00007ffff108a5dd in intelTexImage2D (ctx=0x1e15, 
    target=<value optimized out>, level=<value optimized out>, 
    internalFormat=<value optimized out>, width=<value optimized out>, 
    height=<value optimized out>, border=0, format=6408, type=5121, 
    pixels=0x915ae0, unpack=0x5b92f0, texObj=0x919b10, texImage=0x91a090)
    at intel_tex_image.c:584
#13 0x00007ffff1132b2a in _mesa_TexImage2D (target=3553, level=0, 
    internalFormat=6408, width=64, height=64, border=0, format=6408, 
    type=5121, pixels=0x915ae0) at main/teximage.c:2288
#14 0x00007ffff5f9fb37 in Engine3D::RenderizerGL::gl_upload_texture(CSmartPointer<Texture>, Engine3D::TextureGL*, int) () from libs/libopengl_api.so
#15 0x00007ffff5fa296e in Engine3D::RenderizerGL::register_texture(CSmartPointer<Texture>) () from libs/libopengl_api.so
#16 0x00007ffff5fb0580 in Engine3D::RenderizerGL::init_graphics_system(int, int, int, bool, bool) () from libs/libopengl_api.so
#17 0x00007ffff6fcf2eb in DisplayEntity::creation_notify(Message*) ()
   from libs/libcommon_entities.so
#18 0x00007ffff581d374 in EntityManager::initialize_entity_as_custom_type(char const*, int, char const*, Message*, Entity*) () from libs/libentity_system.so
#19 0x00007ffff7e907c9 in GameClient::initialize_entities() ()
---Type <return> to continue, or q <return> to quit---
   from libs/libregnum_client.so
#20 0x00007ffff7e933f7 in GameClient::init(int, char**) ()
   from libs/libregnum_client.so
#21 0x00007ffff7e948a9 in GameClient::GameClient(int, char**) ()
   from libs/libregnum_client.so
#22 0x000000000040126e in main ()
Comment 4 Brian Paul 2009-09-14 11:48:27 UTC
The assertion that's failing is sometimes caused by a vertex array pointer/offset mix-up such as mistakenly using a user-space pointer as an offset into a VBO.
Comment 5 Ian Romanick 2009-09-17 00:06:17 UTC
*** Bug 23422 has been marked as a duplicate of this bug. ***
Comment 6 Ian Romanick 2009-09-17 00:06:36 UTC
*** Bug 23230 has been marked as a duplicate of this bug. ***
Comment 7 Mateusz Kaduk 2009-09-24 03:06:16 UTC
(In reply to comment #6)
> *** Bug 23230 has been marked as a duplicate of this bug. ***
> 

Test was performed on RegnumOnline 1.0.8 x86-64, GM965, Mesa 7.6-devel

1) This problem occurs in upcomming mesa_7_6_branch.

game: brw_draw_upload.c:412: brw_prepare_vertices: Assertion `input->offset < input->bo->size' failed.
Saving backtrace to crash_backtrace_13461.log
Got SIGABRT (aborted)

2) Regression In safe mode, I also observe that texture rendering on ingame models is broken.
Looks like coordinates of textures are not calculated correctly, because different textures are applied or black.

The problem exist only on models and weapons and bad textures are moving while zooming out/in and rotating like changing shadows. Terrain is rendered correctly and not affected.

Comment 8 Brian Paul 2009-09-24 11:43:35 UTC
This should be fixed now with commit b849c6f1b3b38a68fae32d4dea16dd7431e41b6e on the 7.6 branch.
Comment 9 Sven Arvidsson 2009-09-24 12:06:28 UTC
I can confirm that the bugs in X2 and the problem with refraction in HoN are gone. 

Thanks for fixing this!
Comment 10 Mateusz Kaduk 2009-09-24 12:50:37 UTC
(In reply to comment #9)
> I can confirm that the bugs in X2 and the problem with refraction in HoN are
> gone. 
> 
> Thanks for fixing this!
> 

Yes, same here refraction does not crash game anymore.
Other video options also work. Thank You :)


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.