Bug 28931 - Floating Point Exception in Warzone2100 Trunk version
Floating Point Exception in Warzone2100 Trunk version
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
unspecified
x86 (IA32) Linux (All)
: medium major
Assigned To: Eric Anholt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-06 06:32 UTC by Joshua
Modified: 2010-08-20 12:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua 2010-07-06 06:32:24 UTC
OS: Arch Linux


Whenever I play the trunk version of Warzone2100. The game crashes with the backtrace having the following lines..

#4  <signal handler called>
No symbol table info available.
#5  0xb59bd479 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
No symbol table info available.
#6  0xb59be23d in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
No symbol table info available.
#7  0xb5a15e84 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
No symbol table info available.
#8  0x082007d0 in updateSectorGeometry (x=12, y=7) at terrain.c:627

I had reported this on the Warzone bug tracker. They say that the problem is with my graphics driver.
http://developer.wz2100.net/ticket/1974



Some info on my X.Org


X.Org X Server 1.8.1.902 (1.8.2 RC 2)
Release Date: 2010-06-21
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.34-ARCH i686 
Current Operating System: Linux XR-Z09 2.6.34-ARCH #1 SMP PREEMPT Sat Jun 19 13:06:16 CEST 2010 i686
Kernel command line: root=/dev/disk/by-uuid/e874c057-e0e1-489c-8f4c-019d2d10c9fe ro
Build Date: 21 June 2010  11:54:27AM
 
Current version of pixman: 0.18.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.


Willing to help with more information if needed. Just instruct me please.
Comment 1 Jesse Barnes 2010-07-08 10:05:31 UTC
Probably fixed in a recent version of Mesa.  Reassigning to the dri guys...
Comment 2 Eric Anholt 2010-07-11 22:11:57 UTC
needs debug symbols for mesa
Comment 3 Joshua 2010-07-12 04:48:55 UTC
(In reply to comment #2)
> needs debug symbols for mesa

Hello ,

I am the one who reported this bug. So you are saying that the Warzone2100 developers should use glGetError in their code to enable better debugging? As mentioned in http://www.mesa3d.org/debugging.html

If so, I will tell them this. I just want to report to the right people to help fix this problem.
Comment 4 Chris Wilson 2010-07-18 02:19:30 UTC
Not enough info here. Need to confirm the version of mesa you are using and install the dbg info -- there will be a package called something like libgl1-mesa-dri-dbg.

In all likelihood this is:

commit 18a6e5ee73c5cef283c6bef906e5f8e4f60d4000
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Jun 4 12:43:15 2010 -0700

    intel: Fix intel_compressed_num_bytes for FXT1 after I broke it.
    
    Fixes piglit fxt1-teximage since
    7554b83a21bd62b20df5a7327b69f08108ac9ab6, and also OGLC tests that hit
    FXT1 with a million other things.
    
    Bug #28184.
Comment 5 Chris Wilson 2010-07-18 02:20:16 UTC
Sigh, wrong commit. This is the one I was aiming for:

commit 7554b83a21bd62b20df5a7327b69f08108ac9ab6
Author: Eric Anholt <eric@anholt.net>
Date:   Thu May 13 14:48:13 2010 -0700

    intel: Handle arbitrary compressed formats in intel_compressed_num_bytes.
    
    Note that we don't support arbitrary block size for compressed quite
    yet -- block height of 4 is hard-coded all over the place.
    
    Bug #27098 (srgb dxt1 producing a bytes per pixel of 0).
Comment 6 Laurent carlier 2010-08-11 07:19:32 UTC
Problem is not fixed with mesa 7.8.2, here is a backtrace from warzone2100:


(gdb) #0  0xb779c424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb76d240b in waitpid () from /lib/libpthread.so.0
No symbol table info available.
#2  0x082a93c5 in gdbExtendedBacktrace (dumpFile=11) at exceptionhandler.c:499
        gdbPipe = 13
        status = -1080783560
        wpid = 0
        gdbCommands = "backtrace full\nframe 4\ndisassemble\ninfo registers\nquit\n"
        pid = 19249
        __PRETTY_FUNCTION__ = "gdbExtendedBacktrace"
#3  0x082a964f in posixExceptionHandler (signum=8, siginfo=0xbf948d4c, sigcontext=0xbf948dcc) at exceptionhandler.c:607
        allreadyRunning = 1
        gdmpPath = "/tmp/warzone2100.gdmp-XXXXXX"
        dumpFilename = "/tmp/warzone2100.gdmp-aXilh9"
        dumpFile = 11
        signal = 0x831e3f4 "SIGFPE: Erroneous arithmetic operation: Integer divide by zero"
        btBuffer = {0x82a94f2, 0xb779c40c, 0xb5984c0d, 0xb59e041a, 0x82025fc, 0x8205d74, 0x80e5838, 0x80e517f, 0x80e46e0, 0x80f07d2, 0x815eab5, 0x8160b1a, 
          0x8160f84, 0x816179b, 0xb7150c76, 0x80b88b1, 0x0, 0x0, 0x0, 0x0}
        btSize = 16
#4  <signal handler called>
No symbol table info available.
#5  0xb5983e49 in intel_emit_linear_blit (intel=0x93ebb40, dst_bo=0xb7a80d0, dst_offset=572400, src_bo=0xccb4468, src_offset=0, size=0) at intel_blit.c:487
        pitch = 0
        height = <value optimized out>
        __PRETTY_FUNCTION__ = "intel_emit_linear_blit"
#6  0xb5984c0d in intel_bufferobj_subdata (ctx=0x93ebb40, target=34962, offset=572400, size=0, data=0xb78b600, obj=0xb7a8068) at intel_buffer_objects.c:222
        temp_bo = <value optimized out>
        __PRETTY_FUNCTION__ = "intel_bufferobj_subdata"
#7  0xb59e041a in _mesa_BufferSubDataARB (target=34962, offset=572400, size=0, data=0xb78b600) at main/bufferobj.c:1193
        ctx = 0x93ebb40
        bufObj = <value optimized out>
        __PRETTY_FUNCTION__ = "_mesa_BufferSubDataARB"
#8  0x082025fc in updateSectorGeometry (x=12, y=0) at terrain.c:631
        geometry = 0xccd51a8
        water = 0xcdc2108
        decaldata = 0xb78b600
        geometrySize = 512
        waterSize = 512
        decalSize = 0
        __FUNCTION__ = "updateSectorGeometry"
#9  0x08205d74 in drawTerrain () at terrain.c:1181
        i = -1247608874
        j = -1080781944
        x = 12
        y = 0
        texPage = 1119617024
        colour = {byte = {r = 0 '\000', g = 0 '\000', b = 188 '\274', a = 66 'B'}, rgba = 1119617024, vector = "\000\000\274B"}
        layer = -1247611131
        offset = -1080781944
        size = 155107452
        xPos = 23936
        yPos = 896
        distance = 47451280
        paramsX = {0, 0, -3.05175781e-05, 0}
        paramsY = {3.05175781e-05, 0, 0, 0}
        __FUNCTION__ = "drawTerrain"
#10 0x080e5838 in drawTiles (player=0x862b960) at display3d.c:845
        i = 65
        j = 65
        rx = 84
        rz = 16
        theSun = {x = 1176.97693, y = -3138.60498, z = 2353.95386}
#11 0x080e517f in displayTerrain () at display3d.c:681
No locals.
#12 0x080e46e0 in draw3DScene () at display3d.c:455
        bPlayerHasHQ = 0
        __FUNCTION__ = "draw3DScene"
#13 0x080f07d2 in displayWorld () at display.c:1397
        pos = {x = 0, y = 656, z = 1}
#14 0x0815eab5 in gameLoop () at loop.c:592
        psCurr = 0x0
        psNext = 0x0
        psCBuilding = 0x0
        psNBuilding = 0x0
        psCFeat = 0xb7717d1f
        psNFeat = 0xbf949758
        i = 8
        widgval = 3214186120
        quitting = 0
        intRetVal = INT_INTERCEPT
        clearMode = 0
        gameTicked = false
        __FUNCTION__ = "gameLoop"
#15 0x08160b1a in runGameLoop () at main.c:831
        __FUNCTION__ = "runGameLoop"
#16 0x08160f84 in mainLoop () at main.c:1026
        event = {type = 6 '\006', active = {type = 6 '\006', gain = 0 '\000', state = 1 '\001'}, key = {type = 6 '\006', which = 0 '\000', 
            state = 1 '\001', keysym = {scancode = 133 '\205', sym = SDLK_UNKNOWN, mod = KMOD_NONE, unicode = 0}}, motion = {type = 6 '\006', 
            which = 0 '\000', state = 1 '\001', x = 1157, y = 656, xrel = 0, yrel = 0}, button = {type = 6 '\006', which = 0 '\000', button = 1 '\001', 
            state = 0 '\000', x = 1157, y = 656}, jaxis = {type = 6 '\006', which = 0 '\000', axis = 1 '\001', value = 1157}, jball = {type = 6 '\006', 
            which = 0 '\000', ball = 1 '\001', xrel = 1157, yrel = 656}, jhat = {type = 6 '\006', which = 0 '\000', hat = 1 '\001', value = 0 '\000'}, 
          jbutton = {type = 6 '\006', which = 0 '\000', button = 1 '\001', state = 0 '\000'}, resize = {type = 6 '\006', w = 42992773, h = 0}, expose = {
            type = 6 '\006'}, quit = {type = 6 '\006'}, user = {type = 6 '\006', code = 42992773, data1 = 0x0, data2 = 0x0}, syswm = {type = 6 '\006', 
            msg = 0x2900485}}
#17 0x0816179b in main (argc=1, argv=0xbf94a944) at main.c:1270
        __FUNCTION__ = "main"
(gdb) #4  <signal handler called>
(gdb) Dump of assembler code for function __kernel_rt_sigreturn:
=> 0xb779c40c <+0>:	mov    $0xad,%eax
   0xb779c411 <+5>:	int    $0x80
   0xb779c413 <+7>:	nop
End of assembler dump.
(gdb) eax            0xfffffe00	-512
ecx            0xbf948c70	-1080783760
edx            0x0	0
ebx            0xb5bfac48	-1245729720
esp            0xbf948d40	0xbf948d40
ebp            0xbf949138	0xbf949138
esi            0x0	0
edi            0x0	0
eip            0xb779c40c	0xb779c40c <__kernel_rt_sigreturn>
eflags         0x293	[ CF AF SF IF ]
cs             0x73	115
ss             0x7b	123
ds             0x7b	123
es             0x7b	123
fs             0x0	0
gs             0x33	51
(gdb) A debugging session is active.

	Inferior 1 [process 19241] will be detached.
Comment 7 Eric Anholt 2010-08-20 12:38:18 UTC
Thanks for the backtrace.  That made the problem obvious.

commit f1ea4e7c36a10e174f20416baa18d155cda8f3d5
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Aug 20 12:33:40 2010 -0700

    vbo-subdata-zero: New test for bug #28931.

commit 27e6552a8fb0fd49be84fbaf9504e8371033db23
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Aug 20 12:36:34 2010 -0700

    intel: Don't try to do work for BufferSubData with a size of 0.
    
    If we hit the linear blit path, we'd come up with a pitch of 0, then
    divide by zero.
    
    Fixes vbo-subdata-zero, made for bug #28931 (warsow).