Bug 13368

Summary: Crash (backtrace included) when playing maniadrive
Product: Mesa Reporter: Hans de Goede <jwrdegoede>
Component: Drivers/DRI/i915Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
URL: http://maniadrive.raydium.org/
Whiteboard:
i915 platform: i915 features:
Attachments: Full backtrace from the crash
Patch causing the reported problem

Description Hans de Goede 2007-11-23 06:17:23 UTC
When trying to play maniadrive on any of the i915 driver using 865 intel machines at work, it crashes. Both when using Fedora 8 and when using Fedora 8 + the mesa 7.1 snapshot from Fedora development. It worked just fine around Fedora-8 release candidate 1 so this is caused by a pretty recent change.

Maniadrive is a bit hard to build I'm afraid, but if you have a Fedora machine its just a yum install away, otherwise its available here:
http://maniadrive.raydium.org/

When run under the debugger this is where it crashes:
#0  0x01ac1744 in triangle_twoside (ctx=0x8f89078, e0=6, e1=9, e2=8)
    at ../../../../../src/mesa/tnl_dd/t_dd_tritmp.h:202
202                       GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data;
(gdb) p VB->ColorPtr
$9 = {0x8fc9d4c, 0x0}
(gdb)

Notice how the second pointer if the 2 big pointer array VB->ColorPtr is NULL, explaining the crash.

I'll attach a full backtrace, and I'm more then happy to do some scratch builds / do printing of some specific variables in other stack frames.
Comment 1 Hans de Goede 2007-11-23 06:17:48 UTC
Created attachment 12703 [details]
Full backtrace from the crash
Comment 2 Hans de Goede 2007-11-30 01:51:08 UTC
With the a git snapshot of Tue Nov 27 2007 I now get this:
maniadrive: intel_tris.c:114: intelStartInlinePrimitive: Assertion `intel->batch->id == intel->last_state_batch_id' failed.
Aborted
Comment 3 Michel Dänzer 2007-11-30 02:09:38 UTC
(In reply to comment #2)
> maniadrive: intel_tris.c:114: intelStartInlinePrimitive: Assertion
> `intel->batch->id == intel->last_state_batch_id' failed.

That's bug 13454.
Comment 4 Hans de Goede 2007-11-30 04:19:18 UTC
Could be bug 13454,

But I don't think so, glxgears works fine. Also maniadrive on these machines initally broken somewhere around mesa-7.0.0. It doesn't work with 7.0.1, nor with a snapshot from circa 10 days ago, not with a snapshot from 2 days ago, only the symptoms have changed. If I find the time I'll try todo a git bisect to pin down the commit causing the initial problem (atleast for maniadrive). Maybe this will shed some light on bug 13454 too, if I look at the proposed patch there I get the feeling the real bug is being papered over.

p.s.

maniadrive broke with r300 too, but there it doesn't crash, it just becomes very ugly (missing textures I think). I think though that there has been a version where maniadrive was still fine on i810 and already broken on r300, so I'm not sure if these problems are related.

Comment 5 Michel Dänzer 2007-11-30 06:07:33 UTC
Comment #3 referred specifically to comment #2 only... the assertion failure is an unrelated problem tracked in bug 13454.

Feel free to file another bug against the r300 driver.
Comment 6 Hans de Goede 2007-11-30 07:38:34 UTC
Created attachment 12869 [details] [review]
Patch causing the reported problem

Ok, after quite some testbuilds I've managed to pin down the problem to this patch from the mesa-7.0.2 branch (Fedora's mesa package is a git snapshot of 7.0.2), when this patch is reverted the earlier attached tracenack goes away.

I hope this gives you enough info to fix this. I believe this is also (atleast partially) responsible for the r300 problems I'll give this a spin on my r300 and update the r300 bug I already filed for this with this info.
Comment 7 Brian Paul 2007-12-03 13:09:39 UTC
Fixed in git.  The DD_TRI_LIGHT_TWOSIDE flag was getting set at the wrong place.
Comment 9 Adam Jackson 2009-08-24 12:28:26 UTC
Mass version move, cvs -> git

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.