Skip to contentSkip to conversation

New: crash during (or at end) of map loading in ut2004

Bug 33494 [email protected] 1 participant 3 messages Jan 25, 2011

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=33494

Summary: crash during (or at end) of map loading in ut2004
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: major
Priority: medium
Component: Drivers/Gallium/r600
AssignedTo: [email protected]
ReportedBy: [email protected]

When i try to launch a map in ut2004 i have a crash durring the loading (or just at the end of loading)

If I haven't debbuggeur attach ut2004 terminate on a DBUS error (Signal SIGBUS)

stack :

#0  memcpy() at ../sysdeps/x86_64/memcpy.S:267
#1  r600_upload_buffer() at /usr/include/bits/string3.h:52
#2  r600_upload_user_buffers() at r600_buffer.c:239
#3  evergreen_vertex_buffer_update() at evergreen_state.c:1372
#4  st_draw_vbo() at state_tracker/st_draw.c:712
#5  vbo_validated_drawrangeelements() at vbo/vbo_exec_array.c:793
#6  vbo_exec_DrawRangeElementsBaseVertex() at vbo/vbo_exec_array.c:905
#7  vbo_exec_DrawRangeElements() at vbo/vbo_exec_array.c:925
#8  FOpenGLRenderInterface::DrawPrimitive(EPrimitiveType, int, int, int, int)()
at :0
#9  FBspDrawList::Render(FLevelSceneNode*, FRenderInterface*)() at :0
#10  RenderLevel(FLevelSceneNode*, FRenderInterface*)() at :0
#11  FLevelSceneNode::Render(FRenderInterface*)() at :0
#12  FPlayerSceneNode::Render(FRenderInterface*)() at :0
#13  UGameEngine::Draw(UViewport*, int, unsigned char*, int*)() at :0
#14  USDLViewport::Repaint(int)() at :0
#15  USDLClient::Tick()() at :0
#16  UGameEngine::Tick(float)() at :0
#17  CMainLoop::RunLoop()() at :0
#18  ??() at :0
#19  main() at :0

Test with :
- mesa git (commit 90c2fd86407999475ff6accecf36e5a2c75feb9b)
- libdrm git (commit 550fe2ca3b29ad2191eab4fdfbed9ed21e25492d)
- xf86-video-ati git (commit fadee0409a8e13b78bbccb83dd70f590fee23d57)
with kernel 3.6.37

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 33494] crash during (or at end) of map loading in ut2004

https://bugs.freedesktop.org/show_bug.cgi?id=33494

--- Comment #1 from XoD <[email protected]> 2011-01-25 12:13:11 PST --- If I add a sprintf before memcpy in r600_upload.c I was able to debug in r600_upload_buffer.

The call stack was :

#0  memcpy() at ../sysdeps/x86_64/memcpy.S:267
#1  fprintf() at /usr/include/bits/string3.h:52
#2  r600_upload_buffer() at r600_upload.c:109
#3  r600_upload_user_buffers() at r600_buffer.c:239
#4  evergreen_vertex_buffer_update() at evergreen_state.c:1372
#5  st_draw_vbo() at state_tracker/st_draw.c:712

...

Patch :

(quoted diff) +0 -0

b/src/gallium/drivers/r600/r600_upload.c
index 44102ff..ba19185 100644

src/gallium/drivers/r600/r600_upload.c +0 -0
@@ -103,7 +103,11 @@ int r600_upload_buffer(struct r600_upload *upload,

unsigned offset,

        }

        in_ptr = in_buffer->user_buffer;
-       memcpy(upload->ptr + upload->offset, (uint8_t *) in_ptr + offset,
size);
+       uint8_t * ptr_src = (uint8_t *) upload->ptr + upload->offset;
+       uint8_t * ptr_dest = (uint8_t *) in_ptr + offset;
+       //R600_ERR("memcpy src %d dest %d size %d\n", ptr_src, ptr_dest, size);
+       fprintf(stdout, "memcpy src %p dest %p size %d\n", ptr_src, ptr_dest,
size);
+       memcpy(ptr_src, ptr_dest, size);
        *out_offset = upload->offset;
        *out_size = upload->size;
        *out_buffer = NULL;
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 33494] crash during (or at end) of map loading in ut2004

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=33494

XoD <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         AssignedTo|[email protected] |[email protected].
                   |.org                        |org
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.