Bug 32455 - Crash with mame using OpenGL with newest Gallium on Radeon 4350
Summary: Crash with mame using OpenGL with newest Gallium on Radeon 4350
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: All Linux (All)
: medium critical
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 32456 33933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-16 14:01 UTC by Chris
Modified: 2015-02-08 22:18 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
prevent segfault in evergreen (945 bytes, patch)
2010-12-21 10:45 UTC, Rubén Fernández
Details | Splinter Review
OpenGL code from Mame (104.28 KB, text/plain)
2011-01-03 09:59 UTC, Chris
Details

Description Chris 2010-12-16 14:01:39 UTC
This is a backtrace of the issue, seems the first buffer is 0x0 and crashing on that in the r600g Gallium driver.  This is running the newest Mame using OpenGL, Linux-Next, everything basically from GIT and newest up to date code.

I suspect something in Mame might be causing the first buffer to be NULL, but not sure and it works on Classic so something is different in Gallium I am guessing.  

arcade mesa # lspci -v -s 01:00.0
01:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] (prog-if 00 [VGA controller])
	Subsystem: Diamond Multimedia Systems Device 4350
	Flags: bus master, fast devsel, latency 0, IRQ 41
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Memory at c8b00000 (64-bit, non-prefetchable) [size=64K]
	I/O ports at 2000 [size=256]
	[virtual] Expansion ROM at e01e0000 [disabled] [size=128K]
	Capabilities: [50] Power Management version 3
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information <?>
	Kernel driver in use: radeon
	Kernel modules: radeon

Linux arcade 2.6.37-rc5-next-20101213 #1 SMP Tue Dec 14 18:23:46 CST 2010 i686 Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz GenuineIntel GNU/Linux

(gdb) run pacman -verbose
Starting program: /mnt/livecd/usr/games/bin/mame pacman -verbose
[Thread debugging using libthread_db enabled]
Parsing mame.ini
[New Thread 0xb6f4db70 (LWP 25175)]
Build version:      0.140u2 (Dec 16 2010)
Build architecure:  SDLMAME_ARCH= 
Build defines 1:    SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 
Build defines 1:    LSB_FIRST=1 MAME_DEBUG=1 DISTRO=generic SYNC_IMPLEMENTATION=tc 
SDL/OpenGL defines: SDL_COMPILEDVERSION=1214 USE_OPENGL=1 USE_DISPATCH_GL=1 
Compiler defines A: __GNUC__=4 __GNUC_MINOR__=4 __GNUC_PATCHLEVEL__=4 __VERSION__="4.4.4" 
Compiler defines B: __unix__=1 __i386__=1 
Compiler defines C: __USE_FORTIFY_LEVEL=0 
SDL Device Driver     : x11
SDL Monitor Dimensions: 648 x 480
Enter sdlwindow_init
Using SDL single-window OpenGL driver (SDL 1.2)
Leave sdlwindow_init
 648x 480 -> 0.001621
Loaded opengl shared library: <default>
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
OpenGL: X.Org
OpenGL: Gallium 0.4 on AMD RV710
OpenGL: 2.1 Mesa 7.10-devel
OpenGL: texture rectangle supported
OpenGL: non-power-of-2 textures supported (new method)
OpenGL: vertex buffer supported
OpenGL: pixel buffers supported
OpenGL: framebuffer object supported
OpenGL: GLSL supported, but disabled
OpenGL: max texture size 8192 x 8192
Keyboard: Start initialization
Input: Adding Kbd #1: System keyboard
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding Mouse #1: System mouse
Mouse: Registered System mouse
Mouse: End initialization

Joystick: Start initialization
Joystick: End initialization
Audio: Start initialization
Audio: Driver is alsa
[New Thread 0xb565eb70 (LWP 25176)]
Audio: frequency: 48000, channels: 2, samples: 1024
sdl_create_buffers: creating stream buffer of 57344 bytes
Audio: End initialization
ouput: unable to open output notifier file /tmp/sdlmame_out
Input: Changing default joystick map = s8.4s8.44s8.4445
  s8888888s
  4s88888s6
  44s888s66
  444555666
  444555666
  444555666
  44s222s66
  4s22222s6
  s2222222s
Input: Changing default joystick map = s8.4s8.44s8.4445
  s8888888s
  4s88888s6
  44s888s66
  444555666
  444555666
  444555666
  44s222s66
  4s22222s6
  s2222222s
Matching font: /usr/share/fonts/liberation-fonts/LiberationSans-Regular.ttf
 648x 480 -> 0.001621
Starting Driver Device 'root'
  (missing dependencies; rescheduling)
Starting Z80 'maincpu'
Starting Video Screen 'screen'
Starting Speaker 'mono'
  (missing dependencies; rescheduling)
Starting Namco 'namco'
Starting Driver Device 'root'
  (missing dependencies; rescheduling)
Starting Speaker 'mono'

Starting Driver Device 'root'
OpenGL: VBO supported
OpenGL: PBO supported
OpenGL: FBO supported
OpenGL: using vid filter: 0
GL texture: copy 1, shader 0, dynamic 1, 288x224 288x224 [PALETTE16, Equal: 0, Palette: 1,
            scale 1x1, border 0, pitch 384,288/8192], colors: 512, bytes/pix 4

Program received signal SIGSEGV, Segmentation fault.
0xb5c01eec in r600_buffer_is_user_buffer (buffer=0x0) at r600_resource.h:103
103	r600_resource.h: No such file or directory.
	in r600_resource.h
(gdb) backtrace 
#0  0xb5c01eec in r600_buffer_is_user_buffer (buffer=0x0) at r600_resource.h:103
#1  0xb5c0247b in r600_set_vertex_buffers (ctx=0xe0aadc0, count=1, buffers=0xbfffe9fc) at r600_state_common.c:191
#2  0xb5ced384 in st_draw_vbo (ctx=0xe484218, arrays=0xe4b0468, prims=0xbfffec5c, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, 
    max_index=3) at state_tracker/st_draw.c:701
#3  0xb5ce692a in vbo_draw_arrays (ctx=0xe484218, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
#4  0xb5ce6a67 in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
#5  0x08fd463f in drawogl_window_draw (window=0xdf9cdf8, dc=0, update=1) at src/osd/sdl/drawogl.c:1525
#6  0x08fc5090 in draw_video_contents_wt (param=0xdfb58e8, threadid=0) at src/osd/sdl/window.c:1233
#7  0x08fc2e7f in execute_async (callback=0x8fc4f7f <draw_video_contents_wt>, wp=0xbfffee3c) at src/osd/sdl/window.c:160
#8  0x08fc4781 in sdlwindow_video_window_update (machine=0xdfb1aa0, window=0xdf9cdf8) at src/osd/sdl/window.c:1009
#9  0x08f9f281 in sdl_osd_interface::update (this=0xbffff3a0, skip_redraw=false) at src/osd/sdl/video.c:346
#10 0x0984308f in video_manager::frame_update (this=0xe4c1670, debug=false) at src/emu/video.c:253
#11 0x0981551d in screen_device::vblank_begin_callback (this=0xdf748f8) at src/emu/screen.c:799
#12 0x098164f2 in screen_device::static_vblank_begin_callback (machine=0xdfb1aa0, ptr=0xdf748f8, param=0) at src/emu/screen.h:207
#13 0x098297d2 in timer_execute_timers (machine=0xdfb1aa0) at src/emu/timer.c:389
#14 0x098116bd in device_scheduler::timeslice (this=0xdfb23dc) at src/emu/schedule.c:244
#15 0x097b3fe1 in running_machine::run (this=0xdfb1aa0, firstrun=true) at src/emu/machine.c:412
#16 0x097b1131 in mame_execute (osd=..., options=0xdfa2498) at src/emu/mame.c:203
#17 0x0973fe2d in cli_execute (argc=3, argv=0xbffff474, osd=..., osd_options=0xada9460) at src/emu/clifront.c:175
#18 0x08f9a37c in main (argc=3, argv=0xbffff474) at src/osd/sdl/sdlmain.c:328




(gdb) bt full

#0  0xb5c01eec in r600_buffer_is_user_buffer (buffer=0x0) at r600_resource.h:103
No locals.
#1  0xb5c0247b in r600_set_vertex_buffers (ctx=0xe0aadc0, count=1, buffers=0xbfffe9fc) at r600_state_common.c:191
        i = 0
        rctx = 0xe0aadc0
        vbo = 0xbfffe9fc
        max_index = 4294967295
#2  0xb5ced384 in st_draw_vbo (ctx=0xe484218, arrays=0xe4b0468, prims=0xbfffec5c, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, 
    max_index=3) at state_tracker/st_draw.c:701
        st = 0xe4ad880
        pipe = 0xe0aadc0
        vp = 0xe9086f0
        vpv = 0xe8f4db8
        vbuffer = {{stride = 8, max_index = 3, buffer_offset = 0, buffer = 0x0}, {stride = 27394048, max_index = 1, buffer_offset = 9584641, 
            buffer = 0x1248001}, {stride = 28753921, max_index = 3059970036, buffer_offset = 244352752, buffer = 0xbfffea78}, {stride = 3050865665, 
            max_index = 3221220076, buffer_offset = 27394050, buffer = 0xbfffea58}, {stride = 27394049, max_index = 3, buffer_offset = 8, 
            buffer = 0xbfffea78}, {stride = 3050862229, max_index = 3073952510, buffer_offset = 3059184192, buffer = 0x62f}, {stride = 27394070, 
            max_index = 27394086, buffer_offset = 3073952510, buffer = 0xe8f7b08}, {stride = 3059970036, max_index = 3059970036, 
            buffer_offset = 244352752, buffer = 0xbfffeab8}, {stride = 3074823052, max_index = 3, buffer_offset = 16, buffer = 0x6}, {stride = 64, 
            max_index = 3074823064, buffer_offset = 6, buffer = 0x2c}, {stride = 3059184192, max_index = 3074690840, buffer_offset = 20, 
            buffer = 0xb74613b8}, {stride = 3074690564, max_index = 3074691314, buffer_offset = 48, buffer = 0xb745fff4}, {stride = 0, 
            max_index = 3074823040, buffer_offset = 3221220088, buffer = 0xb74613b0}, {stride = 3074818036, max_index = 3074823040, buffer_offset = 0, 
            buffer = 0xbfffeaf8}, {stride = 3073962252, max_index = 16, buffer_offset = 244370256, buffer = 0x204b0}, {stride = 3059970036, 
            max_index = 3061087648, buffer_offset = 0, buffer = 0x0}, {stride = 3050328421, max_index = 244272520, buffer_offset = 3221220192, 
            buffer = 0x2c}, {stride = 13, max_index = 13, buffer_offset = 13, buffer = 0x11}, {stride = 0, max_index = 0, buffer_offset = 244352752, 
            buffer = 0x9d60251c}, {stride = 234445880, max_index = 3059970036, buffer_offset = 3061087648, buffer = 0xbfffeb98}, {stride = 3050879936, 
            max_index = 239616536, buffer_offset = 234567304, buffer = 0xbfffeb60}, {stride = 44, max_index = 244352752, buffer_offset = 234622136, 
            buffer = 0xbfffeb88}, {stride = 3051056141, max_index = 239616536, buffer_offset = 138412032, buffer = 0x101}, {stride = 16, max_index = 0, 
            buffer_offset = 0, buffer = 0xbfffeb98}, {stride = 239790520, max_index = 3051171495, buffer_offset = 3059970036, buffer = 0xbfffeba8}, {
            stride = 3051055507, max_index = 239616536, buffer_offset = 138412032, buffer = 0x8}, {stride = 3049939911, max_index = 239616536, 
            buffer_offset = 3059970036, buffer = 0xbfffebd8}, {stride = 3050223256, max_index = 239616536, buffer_offset = 138412032, 
            buffer = 0xbfffebd8}, {stride = 3049938678, max_index = 2000000000, buffer_offset = 234554628, buffer = 0xb7f15319}, {stride = 239786112, 
            max_index = 16, buffer_offset = 3059970036, buffer = 0xbfffec08}, {stride = 3059970036, max_index = 3061087648, buffer_offset = 0, 
            buffer = 0xbfffec08}, {stride = 3050004713, max_index = 233940708, buffer_offset = 138412032, buffer = 0x9cc2505}}
        attr = 3049941235

        velements = {{src_offset = 235552416, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0, 
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0, instance_divisor = 0, 
            vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, 
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {
            src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, 
            vertex_buffer_index = 3073952510, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, 
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_B5G5R5A1_UNORM}, {
            src_offset = 56, instance_divisor = 3074823060, vertex_buffer_index = 5, src_format = PIPE_FORMAT_R32G32B32_UNORM}, {src_offset = 0, 
            instance_divisor = 3074690840, vertex_buffer_index = 0, src_format = 3074823096}, {src_offset = 3074690564, instance_divisor = 3074691314, 
            vertex_buffer_index = 40, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 3074823040, vertex_buffer_index = 0, 
            src_format = 3074823088}, {src_offset = 3074818036, instance_divisor = 3074823040, vertex_buffer_index = 244352752, src_format = 3221219576}, 
---Type <return> to continue, or q <return> to quit--- 
          {src_offset = 3073962252, instance_divisor = 0, vertex_buffer_index = 0, src_format = 3073948022}, {src_offset = 3059970036, 
            instance_divisor = 3221219852, vertex_buffer_index = 244352752, src_format = 3221219624}, {src_offset = 3049429450, 
            instance_divisor = 244272480, vertex_buffer_index = 244271440, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, 
            vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_UNORM}, {src_offset = 244272480, instance_divisor = 0, 
            vertex_buffer_index = 27394177, src_format = 3221219704}, {src_offset = 3050860887, instance_divisor = 3221219772, vertex_buffer_index = 1, 
            src_format = PIPE_FORMAT_R10G10B10A2_UNORM}, {src_offset = 244352752, instance_divisor = 3221219672, vertex_buffer_index = 3073962045, 
            src_format = 3221219704}, {src_offset = 3050862229, instance_divisor = 244284112, vertex_buffer_index = 3059184463, src_format = 705}, {
            src_offset = 244352752, instance_divisor = 4294967295, vertex_buffer_index = 4, src_format = 244284112}, {src_offset = 1, 
            instance_divisor = 3059970036, vertex_buffer_index = 16, src_format = 3221219784}, {src_offset = 3050864047, instance_divisor = 3221220076, 
            vertex_buffer_index = 45, src_format = 27394114}, {src_offset = 0, instance_divisor = 27394177, vertex_buffer_index = 13, 
            src_format = PIPE_FORMAT_L16_UNORM}, {src_offset = 3059184463, instance_divisor = 705, vertex_buffer_index = 3059184544, src_format = 665}, {
            src_offset = 3221219868, instance_divisor = 28753921, vertex_buffer_index = 3, src_format = 27394114}, {src_offset = 27394177, 
            instance_divisor = 3221219940, vertex_buffer_index = 3059970036, src_format = 3221219960}, {src_offset = 3050877559, 
            instance_divisor = 3221220076, vertex_buffer_index = 8, src_format = PIPE_FORMAT_X8R8G8B8_UNORM}, {src_offset = 0, 
            instance_divisor = 28753921, vertex_buffer_index = 27394102, src_format = 27394048}, {src_offset = 3059184544, instance_divisor = 665, 
            vertex_buffer_index = 3, src_format = PIPE_FORMAT_R8G8_B8G8_UNORM}}
        num_vbuffers = 1
        num_velements = 2
        ibuffer = {index_size = 0, offset = 0, buffer = 0x0}
        userSpace = 0 '\000'
        vertDataEdgeFlags = 0 '\000'
        info = {indexed = 0 '\000', mode = 0, start = 0, count = 0, start_instance = 0, instance_count = 0, index_bias = 0, min_index = 0, max_index = 0, 
          primitive_restart = 0 '\000', restart_index = 0}
        i = 239620080

        __FUNCTION__ = "st_draw_vbo"
#3  0xb5ce692a in vbo_draw_arrays (ctx=0xe484218, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
        vbo = 0xe4ae118
        exec = 0xe4ae9b8
        prim = {{mode = 7, indexed = 0, begin = 1, end = 1, weak = 0, no_current_update = 1, pad = 0, start = 0, count = 4, basevertex = 0, 
            num_instances = 1}, {mode = 24, indexed = 0, begin = 1, end = 0, weak = 0, no_current_update = 0, pad = 29250, start = 1, count = 3221220504, 
            basevertex = -1244223421, num_instances = 239616536}}
#4  0xb5ce6a67 in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
        ctx = 0xe484218
        __FUNCTION__ = "vbo_exec_DrawArrays"
#5  0x08fd463f in drawogl_window_draw (window=0xdf9cdf8, dc=0, update=1) at src/osd/sdl/drawogl.c:1525
        i = 0
        vofs = 96
        pendingPrimitive = -1
        is_vector = 0
        prim = 0xe8db8e0
        texture = 0xe8ebcc0
        scrnum = 0
        screen = 0xdf295c0
        sdl = 0xe0a1df0
        hofs = 100
        curPrimitive = -1
---Type <return> to continue, or q <return> to quit---
#6  0x08fc5090 in draw_video_contents_wt (param=0xdfb58e8, threadid=0) at src/osd/sdl/window.c:1233
        dc = 0
        update = 1
        wp = 0xdfb58e8
        window = 0xdf9cdf8
#7  0x08fc2e7f in execute_async (callback=0x8fc4f7f <draw_video_contents_wt>, wp=0xbfffee3c) at src/osd/sdl/window.c:160
        wp_temp = 0xdfb58e8
#8  0x08fc4781 in sdlwindow_video_window_update (machine=0xdfb1aa0, window=0xdf9cdf8) at src/osd/sdl/window.c:1009
        wp = {window = 0xdf9cdf8, list = 0xe0a0cdc, machine = 0xdfb1aa0, resize_new_width = 0, resize_new_height = 0}
        primlist = 0xe0a0cdc
        tempwidth = 224
        tempheight = 288
#9  0x08f9f281 in sdl_osd_interface::update (this=0xbffff3a0, skip_redraw=false) at src/osd/sdl/video.c:346
        window = 0xdf9cdf8
#10 0x0984308f in video_manager::frame_update (this=0xe4c1670, debug=false) at src/emu/video.c:253
        phase = 3
        skipped_it = false
        current_time = {seconds = 0, attoseconds = 16499999999932416}
#11 0x0981551d in screen_device::vblank_begin_callback (this=0xdf748f8) at src/emu/screen.c:799

No locals.
#12 0x098164f2 in screen_device::static_vblank_begin_callback (machine=0xdfb1aa0, ptr=0xdf748f8, param=0) at src/emu/screen.h:207
No locals.
#13 0x098297d2 in timer_execute_timers (machine=0xdfb1aa0) at src/emu/timer.c:389
        was_enabled = 1
        global = 0xe086390
        timer = 0xe0864e0
#14 0x098116bd in device_scheduler::timeslice (this=0xdfb23dc) at src/emu/schedule.c:244
        call_debugger = false
        timerexec = 0xe08b79c
#15 0x097b3fe1 in running_machine::run (this=0xdfb1aa0, firstrun=true) at src/emu/machine.c:412
        settingsloaded = false
        error = 0
#16 0x097b1131 in mame_execute (osd=..., options=0xdfa2498) at src/emu/mame.c:203
        gamename = {<_astring_base> = {text = 0xbffff13c "pacman", alloclen = 56, 
            smallbuf = "pacman\000\277\373w7\267pa\371\r\006\341\372\nh\361\377\277\364\377E\267\230\361\377\277\300\200\305\tpa\371\r\006\341\372\n\210\361\377\277\006\000\000\000@\362\377\277"}, <No data fields>}
        driver = 0xa6be760
        config = 0xdf9a390
        machine = 0xdfb1aa0
        firstgame = false
        firstrun = true
        exit_pending = false
        error = 0
#17 0x0973fe2d in cli_execute (argc=3, argv=0xbffff474, osd=..., osd_options=0xada9460) at src/emu/clifront.c:175
        gamename_option = 0xdfa0820 "pacman"
        driver = 0xa6be760
---Type <return> to continue, or q <return> to quit---
        exename = {<_astring_base> = {text = 0xbffff200 "mame", alloclen = 56, 
            smallbuf = "mame\000\000\000\000k\035\356\267\364\237\360\267\364\237\360\267\000\000\000\000\240\362\377\277\\\362\377\277h\362\377\277\300+\367\r\340\370\377\267\000\000\000\000X~\355\r\365\270\357\267"}, <No data fields>}
        options = 0xdfa2498
        result = -1
        gamename = {<_astring_base> = {text = 0xbffff240 "pacman", alloclen = 56, 
            smallbuf = "pacman\000\000\rH\356\267\364\237\360\267X~\355\r(\312\355\r\210\362\377\277\bz\362\267 \t\376\267(\312\355\r\377\377\377\377\304\357\377\267@\252\004\b\001\000\000"}, <No data fields>}
#18 0x08f9a37c in main (argc=3, argv=0xbffff474) at src/osd/sdl/sdlmain.c:328
        osd = {<osd_interface> = {_vptr.osd_interface = 0xada9a28, m_machine = 0xdfb1aa0}, <No data fields>}
        res = 0
Comment 1 Alex Deucher 2010-12-17 15:03:22 UTC
*** Bug 32456 has been marked as a duplicate of this bug. ***
Comment 2 Öyvind Saether 2010-12-17 17:28:35 UTC
* Gentoo, 
* kernel 2.6.37-rc5-git6, 
* compiled using CFLAGS="-g3 -O0", 
* FEATURES="nostrip", 
* added --enable-debug to mesa-9999.ebuild, 
* added https://bugs.freedesktop.org/attachment.cgi?id=41220 patch to ebuild, 

bt full looks slightly different but I don't know what any of it really means. 

$ gdb sdlmame

warning: Can not parse XML syscalls information; XML support was disabled at compile time.
GNU gdb (Gentoo 7.0.1 p1) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/games/bin/sdlmame...(no debugging symbols found)...done.
(gdb) run  -video opengl -rompath /public/net/godzilla/games/MAME/roms/ mslug2
Starting program: /usr/games/bin/sdlmame -video opengl -rompath /public/net/godzilla/games/MAME/roms/ mslug2
[Thread debugging using libthread_db enabled]
Warning: unknown option in INI: useallheads
Warning: unknown option in INI: useallheads
[New Thread 0x7ffff42d8710 (LWP 12138)]
[New Thread 0x7ffff0416710 (LWP 12139)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff20cbb15 in r600_vertex_buffer_update (rctx=0x66bbbc0) at r600_state.c:177
177     r600_state.c: Ingen slik fil eller filkatalog.
        in r600_state.c
(gdb) bt
#0  0x00007ffff20cbb15 in r600_vertex_buffer_update (rctx=0x66bbbc0) at r600_state.c:177
#1  0x00007ffff20d93c0 in r600_set_vertex_buffers (ctx=0x66bbbc0, count=1, buffers=0x7fffffffc5c0) at r600_state_common.c:215
#2  0x00007ffff21d5eb4 in st_draw_vbo (ctx=0x6bf01c0, arrays=0x6c3f390, prims=0x7fffffffc950, nr_prims=1, ib=0x0,
    index_bounds_valid=1 '\001', min_index=0, max_index=3) at state_tracker/st_draw.c:701
#3  0x00007ffff21cf4e7 in vbo_draw_arrays (ctx=0x6bf01c0, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
#4  0x00007ffff21cf59f in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
#5  0x0000000000ff96f9 in drawogl_window_draw(_sdl_window_info*, unsigned int, int) ()
#6  0x0000000000ff1cc6 in draw_video_contents_wt(void*, int) ()
#7  0x0000000000ff2fc6 in sdlwindow_video_window_update(running_machine*, _sdl_window_info*) ()
#8  0x0000000000fd39ac in sdl_osd_interface::update(bool) ()
#9  0x00000000016206c4 in video_manager::frame_update(bool) ()
#10 0x00000000015ebd47 in display_loading_rom_message(_romload_private*, char const*) ()
#11 0x00000000015ecf9f in process_rom_entries(_romload_private*, char const*, rom_entry const*) ()
#12 0x00000000015edf17 in rom_init(running_machine*) ()
#13 0x0000000001597b02 in running_machine::start() ()
#14 0x000000000159803b in running_machine::run(bool) ()
#15 0x00000000015963d0 in mame_execute(osd_interface&, _core_options*) ()
#16 0x000000000154fbe5 in cli_execute(int, char**, osd_interface&, _options_entry const*) ()
#17 0x0000000000fd03bf in main ()
(gdb) bt full
#0  0x00007ffff20cbb15 in r600_vertex_buffer_update (rctx=0x66bbbc0) at r600_state.c:177
        rstate = 0x7ffff1c92010
        rbuffer = 0x0
        vertex_buffer = 0x66bcfd8
        i = 0
        offset = 107728872
#1  0x00007ffff20d93c0 in r600_set_vertex_buffers (ctx=0x66bbbc0, count=1, buffers=0x7fffffffc5c0) at r600_state_common.c:215
        rctx = 0x66bbbc0
        vbo = 0x7fffffffc5c0
        max_index = 4294967295
#2  0x00007ffff21d5eb4 in st_draw_vbo (ctx=0x6bf01c0, arrays=0x6c3f390, prims=0x7fffffffc950, nr_prims=1, ib=0x0,
    index_bounds_valid=1 '\001', min_index=0, max_index=3) at state_tracker/st_draw.c:701
        st = 0x6c3bb50
        pipe = 0x66bbbc0
        vp = 0x6e33ff0
        vpv = 0x6e3b5d0
        vbuffer = {{stride = 8, max_index = 3, buffer_offset = 0, buffer = 0x0}, {stride = 115487960, max_index = 0,
            buffer_offset = 4, buffer = 0x7fffffffc7a0}, {stride = 27394114, max_index = 0, buffer_offset = 3,
            buffer = 0x7fff01b6c001}, {stride = 16, max_index = 0, buffer_offset = 4294952736, buffer = 0x7ffff227d672}, {
            stride = 27394048, max_index = 117, buffer_offset = 4294952864, buffer = 0x6e234d8}, {stride = 27394048, max_index = 0,
            buffer_offset = 4294952624, buffer = 0x7fffffffc7a0}, {stride = 27394048, max_index = 32767, buffer_offset = 4070634848,
            buffer = 0x7fff00000299}, {stride = 4062682781, max_index = 32767, buffer_offset = 27394049, buffer = 0x7fffffffc6e0}, {
            stride = 27394050, max_index = 113, buffer_offset = 4294952864, buffer = 0x1a20000}, {stride = 4294952864, max_index = 4,
            buffer_offset = 27394050, buffer = 0x62f06d36780}, {stride = 4070634368, max_index = 32767, buffer_offset = 115488104,
            buffer = 0x7fffffffc720}, {stride = 4062683624, max_index = 32767, buffer_offset = 13, buffer = 0x30}, {stride = 13,
            max_index = 27394070, buffer_offset = 64, buffer = 0x1a0000000d}, {stride = 4134719176, max_index = 32767,
            buffer_offset = 27394049, buffer = 0x2c}, {stride = 115488104, max_index = 4, buffer_offset = 4134719096, buffer = 0x60}, {
            stride = 113435872, max_index = 4, buffer_offset = 11152, buffer = 0x6c2e4e0}, {stride = 4134719072, max_index = 32767,
            buffer_offset = 44, buffer = 0x1}, {stride = 115433088, max_index = 0, buffer_offset = 1, buffer = 0x7ffff644f9f0}, {
            stride = 4294952944, max_index = 32767, buffer_offset = 113435872, buffer = 0x7fffffffc7f0}, {stride = 114517888,
            max_index = 0, buffer_offset = 115490640, buffer = 0x7ffff21ee2d1}, {stride = 4294952976, max_index = 32767,
            buffer_offset = 115556336, buffer = 0x2c00000020}, {stride = 4294952976, max_index = 32767, buffer_offset = 113435872,
            buffer = 0x6bf01c0}, {stride = 13, max_index = 2640323868, buffer_offset = 115490112, buffer = 0x0}, {stride = 113435872,
            max_index = 0, buffer_offset = 4294953056, buffer = 0x7ffff227de94}, {stride = 0, max_index = 0,
            buffer_offset = 115556336, buffer = 0x6c04a08}, {stride = 113181120, max_index = 0, buffer_offset = 113181120,
            buffer = 0x6bf01c0}, {stride = 4063020300, max_index = 32767, buffer_offset = 113513040, buffer = 0x7fffffffc870}, {
            stride = 4062898911, max_index = 32767, buffer_offset = 8, buffer = 0x6bf01c0}, {stride = 0, max_index = 0,
            buffer_offset = 113496496, buffer = 0x7fffffffc890}, {stride = 4062898223, max_index = 32767, buffer_offset = 113455656,
            buffer = 0x6bf01c0}, {stride = 4294953152, max_index = 32767, buffer_offset = 4062003769, buffer = 0x840000006bf01c0}, {
            stride = 113181120, max_index = 0, buffer_offset = 16, buffer = 0x6c3bb50}}
        attr = 0  
        velements = {{src_offset = 107697328, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {
            src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 48,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 4134719176,
            src_format = 32767}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 34, src_format = PIPE_FORMAT_NONE}, {
            src_offset = 0, instance_divisor = 3, vertex_buffer_index = 4134719088, src_format = 32767}, {src_offset = 80,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_A8R8G8B8_UNORM}, {src_offset = 0,
---Type <return> to continue, or q <return> to quit---
            instance_divisor = 0, vertex_buffer_index = 115490160, src_format = PIPE_FORMAT_NONE}, {src_offset = 4134719072,
            instance_divisor = 32767, vertex_buffer_index = 34, src_format = PIPE_FORMAT_NONE}, {src_offset = 1, instance_divisor = 0,
            vertex_buffer_index = 115433088, src_format = PIPE_FORMAT_NONE}, {src_offset = 1, instance_divisor = 0,
            vertex_buffer_index = 4131715568, src_format = 32767}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 115490160, src_format = PIPE_FORMAT_NONE}, {src_offset = 4294952256, instance_divisor = 32767,
            vertex_buffer_index = 114517888, src_format = PIPE_FORMAT_NONE}, {src_offset = 1, instance_divisor = 0,
            vertex_buffer_index = 4061145596, src_format = 32767}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 115490112, src_format = PIPE_FORMAT_NONE}, {src_offset = 33, instance_divisor = 0,
            vertex_buffer_index = 115490592, src_format = 705}, {src_offset = 4070634736, instance_divisor = 32767,
            vertex_buffer_index = 115488032, src_format = PIPE_FORMAT_NONE}, {src_offset = 4294952368, instance_divisor = 32767,
            vertex_buffer_index = 4062683624, src_format = 32767}, {src_offset = 13, instance_divisor = 0, vertex_buffer_index = 8,
            src_format = PIPE_FORMAT_B8G8R8A8_UNORM}, {src_offset = 27394177, instance_divisor = 6, vertex_buffer_index = 4134719072,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 27394114, instance_divisor = 45, vertex_buffer_index = 4294952864,
            src_format = 32767}, {src_offset = 1, instance_divisor = 8, vertex_buffer_index = 4294952864,
            src_format = PIPE_FORMAT_X8R8G8B8_UNORM}, {src_offset = 115488032, instance_divisor = 0, vertex_buffer_index = 16,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 4294952464, instance_divisor = 32767, vertex_buffer_index = 4062685162,
            src_format = 32767}}
        num_vbuffers = 1
        num_velements = 2
        ibuffer = {index_size = 0, offset = 0, buffer = 0x0}
        userSpace = 0 '\000'
        vertDataEdgeFlags = 0 '\000'
        info = {indexed = 0 '\000', mode = 0, start = 0, count = 0, start_instance = 0, instance_count = 0, index_bias = 0,
          min_index = 0, max_index = 0, primitive_restart = 0 '\000', restart_index = 0}
        i = 32767 
#3  0x00007ffff21cf4e7 in vbo_draw_arrays (ctx=0x6bf01c0, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
        vbo = 0x6c3c590
        exec = 0x6c3d1b0
        prim = {{mode = 7, indexed = 0, begin = 1, end = 1, weak = 0, no_current_update = 0, pad = 0, start = 0, count = 4,
            basevertex = 0, num_instances = 1}, {mode = 255, indexed = 1, begin = 1, end = 1, weak = 1, no_current_update = 1,
            pad = 3, start = 113181120, count = 0, basevertex = -13920, num_instances = 32767}}
#4  0x00007ffff21cf59f in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
        ctx = 0x6bf01c0
#5  0x0000000000ff96f9 in drawogl_window_draw(_sdl_window_info*, unsigned int, int) ()
No symbol table info available.
#6  0x0000000000ff1cc6 in draw_video_contents_wt(void*, int) ()
No symbol table info available.
#7  0x0000000000ff2fc6 in sdlwindow_video_window_update(running_machine*, _sdl_window_info*) ()
No symbol table info available.
#8  0x0000000000fd39ac in sdl_osd_interface::update(bool) ()
No symbol table info available.
#9  0x00000000016206c4 in video_manager::frame_update(bool) ()
No symbol table info available.
#10 0x00000000015ebd47 in display_loading_rom_message(_romload_private*, char const*) ()
No symbol table info available.
#11 0x00000000015ecf9f in process_rom_entries(_romload_private*, char const*, rom_entry const*) ()
No symbol table info available.
#12 0x00000000015edf17 in rom_init(running_machine*) ()
No symbol table info available.
#13 0x0000000001597b02 in running_machine::start() ()
No symbol table info available.
#14 0x000000000159803b in running_machine::run(bool) ()
No symbol table info available.
#15 0x00000000015963d0 in mame_execute(osd_interface&, _core_options*) ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#16 0x000000000154fbe5 in cli_execute(int, char**, osd_interface&, _options_entry const*) ()
No symbol table info available.
#17 0x0000000000fd03bf in main ()
No symbol table info available.
(gdb) quit

Thank you for looking at all of this.
Comment 3 Chris 2010-12-17 23:24:29 UTC
That patch makes yours go a bit further than my backtrace did, I had patched my gentoo ebuild similar to what that patch does by skipping the NULL buffer at the first point.  It did the same thing for me as your backtrace after doing that, seems the buffer being NULL is not just easy to avoid but probably to find why it is NULL (seems to be whatever builds the VBO is skipping the first array member or something like that).  I'm using the same Gentoo ebuild too, on mine it works fine also if you switch to Classic from gallium with ebuild mesa set r600 classic but another person with the same card using my exact same build on a LiveCD I am using has Mame barely run at all at .001 fps and just show a black screen for glxgears.  It's suspiciously stopping at the same point in the mame output, but I'm not sure why in Classic on my card it runs perfectly.
Comment 4 Jerome Glisse 2010-12-20 12:34:33 UTC
Pushed a fix upstream please confirm it fix the issue for you too
Comment 5 Öyvind Saether 2010-12-20 16:11:27 UTC
line 179 offset += vertex_buffer->buffer_offset + r600_bo_offset(rbuffer->bo); (latest git with the "r600g: properly unset vertex buffer" abe9ffc25c8d65b48ae02cdc8445b212b9f61632 patch also SIGSEGVs.

$ gdb sdlmame
(stuff)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff20ccb06 in r600_vertex_buffer_update (rctx=0x66bbc30) at r600_state.c:179
179     r600_state.c: Ingen slik fil eller filkatalog.
        in r600_state.c
(gdb) bt full
#0  0x00007ffff20ccb06 in r600_vertex_buffer_update (rctx=0x66bbc30) at r600_state.c:179
        rstate = 0x7ffff1c93010
        rbuffer = 0x0
        vertex_buffer = 0x66bd048
        i = 0
        offset = 0
#1  0x00007ffff20da40b in r600_set_vertex_buffers (ctx=0x66bbc30, count=1, buffers=0x7fffffffc5c0) at r600_state_common.c:220
        rctx = 0x66bbc30
        vbo = 0x7fffffffc5c0
        max_index = 4294967295
#2  0x00007ffff21d6fa8 in st_draw_vbo (ctx=0x6bf0210, arrays=0x6c3f3a0, prims=0x7fffffffc950, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0,
    max_index=3) at state_tracker/st_draw.c:701
        st = 0x6c3bb60
        pipe = 0x66bbc30
        vp = 0x6e3f1c0
        vpv = 0x6e467a0
        vbuffer = {{stride = 8, max_index = 3, buffer_offset = 0, buffer = 0x0}, {stride = 115533480, max_index = 0, buffer_offset = 4,
            buffer = 0x7fffffffc7a0}, {stride = 27394114, max_index = 0, buffer_offset = 3, buffer = 0x7fff01b6c001}, {stride = 16, max_index = 0,
            buffer_offset = 4294952736, buffer = 0x7ffff227e76e}, {stride = 27394048, max_index = 117, buffer_offset = 4294952864, buffer = 0x6e2e6a8}, {
            stride = 27394048, max_index = 0, buffer_offset = 4294952624, buffer = 0x7fffffffc7a0}, {stride = 27394048, max_index = 32767,
            buffer_offset = 4070635360, buffer = 0x7fff00000299}, {stride = 4062687129, max_index = 32767, buffer_offset = 27394049,
            buffer = 0x7fffffffc6e0}, {stride = 27394050, max_index = 113, buffer_offset = 4294952864, buffer = 0x1a20000}, {stride = 4294952864,
            max_index = 4, buffer_offset = 27394050, buffer = 0x62f06d41900}, {stride = 4070634880, max_index = 32767, buffer_offset = 115533624,
            buffer = 0x7fffffffc720}, {stride = 4062687972, max_index = 32767, buffer_offset = 13, buffer = 0x30}, {stride = 13, max_index = 27394070,
            buffer_offset = 64, buffer = 0x1a0000000d}, {stride = 4134719176, max_index = 32767, buffer_offset = 27394049, buffer = 0x2c}, {
            stride = 115533624, max_index = 4, buffer_offset = 4134719096, buffer = 0x60}, {stride = 113435888, max_index = 4, buffer_offset = 80320,
            buffer = 0x6c2e4f0}, {stride = 4134719072, max_index = 32767, buffer_offset = 44, buffer = 0x1}, {stride = 115478608, max_index = 0,
            buffer_offset = 1, buffer = 0x7ffff644f9f0}, {stride = 4294952944, max_index = 32767, buffer_offset = 113435888, buffer = 0x7fffffffc7f0}, {
            stride = 114563328, max_index = 0, buffer_offset = 115536160, buffer = 0x7ffff21ef3cd}, {stride = 4294952976, max_index = 32767,
            buffer_offset = 115601856, buffer = 0x2c00000020}, {stride = 4294952976, max_index = 32767, buffer_offset = 113435888, buffer = 0x6bf0210}, {
            stride = 13, max_index = 2640323868, buffer_offset = 115535632, buffer = 0x0}, {stride = 113435888, max_index = 0, buffer_offset = 4294953056,
            buffer = 0x7ffff227ef90}, {stride = 0, max_index = 0, buffer_offset = 115601856, buffer = 0x6c04a58}, {stride = 113181200, max_index = 0,
            buffer_offset = 113181200, buffer = 0x6bf0210}, {stride = 4063024604, max_index = 32767, buffer_offset = 113513056, buffer = 0x7fffffffc870}, {
            stride = 4062903259, max_index = 32767, buffer_offset = 8, buffer = 0x6bf0210}, {stride = 0, max_index = 0, buffer_offset = 113496512,
            buffer = 0x7fffffffc890}, {stride = 4062902571, max_index = 32767, buffer_offset = 113455672, buffer = 0x6bf0210}, {stride = 4294953152,
            max_index = 32767, buffer_offset = 4062008109, buffer = 0x840000006bf0210}, {stride = 113181200, max_index = 0, buffer_offset = 16,
            buffer = 0x6c3bb60}}
        attr = 0  
        velements = {{src_offset = 107697360, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 48, src_format = PIPE_FORMAT_NONE}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 4134719176, src_format = 32767}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 34,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 3, vertex_buffer_index = 4134719088, src_format = 32767}, {src_offset = 80,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_A8R8G8B8_UNORM}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 115535680, src_format = PIPE_FORMAT_NONE}, {src_offset = 4134719072, instance_divisor = 32767, vertex_buffer_index = 34,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 1, instance_divisor = 0, vertex_buffer_index = 115478608, src_format = PIPE_FORMAT_NONE}, {
            src_offset = 1, instance_divisor = 0, vertex_buffer_index = 4131715568, src_format = 32767}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 115535680, src_format = PIPE_FORMAT_NONE}, {src_offset = 4294952256, instance_divisor = 32767,
            vertex_buffer_index = 114563328, src_format = PIPE_FORMAT_NONE}, {src_offset = 1, instance_divisor = 0, vertex_buffer_index = 4061149764,
            src_format = 32767}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 115535632, src_format = PIPE_FORMAT_NONE}, {src_offset = 33,
            instance_divisor = 0, vertex_buffer_index = 115536112, src_format = 705}, {src_offset = 4070635248, instance_divisor = 32767,
            vertex_buffer_index = 115533552, src_format = PIPE_FORMAT_NONE}, {src_offset = 4294952368, instance_divisor = 32767,
---Type <return> to continue, or q <return> to quit---
            vertex_buffer_index = 4062687972, src_format = 32767}, {src_offset = 13, instance_divisor = 0, vertex_buffer_index = 8,
            src_format = PIPE_FORMAT_B8G8R8A8_UNORM}, {src_offset = 27394177, instance_divisor = 6, vertex_buffer_index = 4134719072,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 27394114, instance_divisor = 45, vertex_buffer_index = 4294952864, src_format = 32767}, {
            src_offset = 1, instance_divisor = 8, vertex_buffer_index = 4294952864, src_format = PIPE_FORMAT_X8R8G8B8_UNORM}, {src_offset = 115533552,
            instance_divisor = 0, vertex_buffer_index = 16, src_format = PIPE_FORMAT_NONE}, {src_offset = 4294952464, instance_divisor = 32767,
            vertex_buffer_index = 4062689510, src_format = 32767}}
        num_vbuffers = 1
        num_velements = 2
        ibuffer = {index_size = 0, offset = 0, buffer = 0x0}
        userSpace = 0 '\000'
        vertDataEdgeFlags = 0 '\000'
        info = {indexed = 0 '\000', mode = 0, start = 0, count = 0, start_instance = 0, instance_count = 0, index_bias = 0, min_index = 0, max_index = 0,
          primitive_restart = 0 '\000', restart_index = 0}
        i = 32767 
#3  0x00007ffff21d05db in vbo_draw_arrays (ctx=0x6bf0210, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
        vbo = 0x6c3c5a0
        exec = 0x6c3d1c0
        prim = {{mode = 7, indexed = 0, begin = 1, end = 1, weak = 0, no_current_update = 0, pad = 0, start = 0, count = 4, basevertex = 0,
            num_instances = 1}, {mode = 255, indexed = 1, begin = 1, end = 1, weak = 1, no_current_update = 1, pad = 3, start = 113181200, count = 0,
            basevertex = -13920, num_instances = 32767}}
#4  0x00007ffff21d0693 in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
        ctx = 0x6bf0210
#5  0x0000000000ff96f9 in drawogl_window_draw(_sdl_window_info*, unsigned int, int) ()
No symbol table info available.
#6  0x0000000000ff1cc6 in draw_video_contents_wt(void*, int) ()
No symbol table info available.
#7  0x0000000000ff2fc6 in sdlwindow_video_window_update(running_machine*, _sdl_window_info*) ()
No symbol table info available.
#8  0x0000000000fd39ac in sdl_osd_interface::update(bool) ()
No symbol table info available.
#9  0x00000000016206c4 in video_manager::frame_update(bool) ()
No symbol table info available.
#10 0x00000000015ebd47 in display_loading_rom_message(_romload_private*, char const*) ()
No symbol table info available.
#11 0x00000000015ecf9f in process_rom_entries(_romload_private*, char const*, rom_entry const*) ()
No symbol table info available.
#12 0x00000000015edf17 in rom_init(running_machine*) ()
No symbol table info available.
#13 0x0000000001597b02 in running_machine::start() ()
No symbol table info available.
#14 0x000000000159803b in running_machine::run(bool) ()
No symbol table info available.
#15 0x00000000015963d0 in mame_execute(osd_interface&, _core_options*) ()
No symbol table info available.
#16 0x000000000154fbe5 in cli_execute(int, char**, osd_interface&, _options_entry const*) ()
No symbol table info available.
#17 0x0000000000fd03bf in main ()
No symbol table info available.
(gdb) bt
#0  0x00007ffff20ccb06 in r600_vertex_buffer_update (rctx=0x66bbc30) at r600_state.c:179
#1  0x00007ffff20da40b in r600_set_vertex_buffers (ctx=0x66bbc30, count=1, buffers=0x7fffffffc5c0) at r600_state_common.c:220
#2  0x00007ffff21d6fa8 in st_draw_vbo (ctx=0x6bf0210, arrays=0x6c3f3a0, prims=0x7fffffffc950, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0,
    max_index=3) at state_tracker/st_draw.c:701
#3  0x00007ffff21d05db in vbo_draw_arrays (ctx=0x6bf0210, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
#4  0x00007ffff21d0693 in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
#5  0x0000000000ff96f9 in drawogl_window_draw(_sdl_window_info*, unsigned int, int) ()
#6  0x0000000000ff1cc6 in draw_video_contents_wt(void*, int) ()
#7  0x0000000000ff2fc6 in sdlwindow_video_window_update(running_machine*, _sdl_window_info*) ()
#8  0x0000000000fd39ac in sdl_osd_interface::update(bool) ()
#9  0x00000000016206c4 in video_manager::frame_update(bool) ()
#10 0x00000000015ebd47 in display_loading_rom_message(_romload_private*, char const*) ()
#11 0x00000000015ecf9f in process_rom_entries(_romload_private*, char const*, rom_entry const*) ()
#12 0x00000000015edf17 in rom_init(running_machine*) ()
#13 0x0000000001597b02 in running_machine::start() ()
#14 0x000000000159803b in running_machine::run(bool) ()
#15 0x00000000015963d0 in mame_execute(osd_interface&, _core_options*) ()
#16 0x000000000154fbe5 in cli_execute(int, char**, osd_interface&, _options_entry const*) ()
#17 0x0000000000fd03bf in main ()
(gdb) quit


Thank you very much for trying!!!! :-)
Comment 6 Chris 2010-12-20 18:20:17 UTC
I get the same segfault and backtrace as Øyvind Sæther posted with the new version too, looks just like his.  Thanks, does look like it's getting farther though I think.
Comment 7 Rubén Fernández 2010-12-21 01:14:26 UTC
With the latest commit intended to fix this, mesa breaks almost completely in my new videocard (Radeon HD 5750); pretty much everything but glxgears produces a segfault.

I give you here the console output of a wine game as an example, perhaps it'll help.

Kernel: 2.6.36
libdrm 2.4.23
xf86-video-ati from latest git
mesa from latest git

--------------------------------------------------------------------

wine: Unhandled page fault on read access to 0x00000010 at address 0x7d06b76b (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x00000010 in 32-bit code (0x7d06b76b).
fixme:dbghelp_dwarf:compute_location Only supporting one breg (19 -> 23)
fixme:dbghelp_dwarf:compute_location Only supporting one breg (24 -> 19)
fixme:dbghelp_dwarf:compute_location Only supporting one breg (24 -> 19)
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
 EIP:7d06b76b ESP:0032e120 EBP:0032e158 EFLAGS:00010206(  R- --  I   - -P- )
 EAX:7c1392e8 EBX:7db27508 ECX:0000014d EDX:00000400
 ESI:00000000 EDI:7c40bc38
Stack dump:
0x0032e120:  b7757380 7c40bab0 7c28cb70 00000120
0x0032e130:  00000000 7c40bab0 0032e198 0000014d
0x0032e140:  00000000 7c40e3ac 0032e198 7db27508
0x0032e150:  00000001 7c40bac0 0032e198 7d05db04
0x0032e160:  7c40bc38 00000000 00000000 7c3756a8
0x0032e170:  00000000 7c40e3ac 7c40e3ac 7c40bc38
Backtrace:
=>0 0x7d06b76b evergreen_fs_resource_set+0x4b(ctx=0x7c40bc38, state=(nil), rid=0) [/home/ruben/mesa/src/gallium/winsys/r600/drm/evergreen_hw_context.c:890] in r600_dri.so (0x0032e198)
  1 0x7d05db04 r600_set_vertex_buffers+0x223(ctx=0x7c40bab0, count=0, buffers=0x7c3757f0) [/home/ruben/mesa/src/gallium/drivers/r600/r600_state_common.c:185] in r600_dri.so (0x0032e1d8)
  2 0x7d20c744 blitter_restore_CSOs+0x1e3(ctx=0x7c375688) [/home/ruben/mesa/src/gallium/auxiliary/util/u_blitter.c:337] in r600_dri.so (0x0032e328)
  3 0x7d20d434 util_blitter_copy_region+0x573(blitter=0x7c375688, dst=0x7c512be8, dstlevel=0, dstx=0, dsty=0, dstz=<is not available>, src=0x7c512e50, srclevel=0, srcbox=0x32e3e8, ignore_stencil=1) [/home/ruben/mesa/src/gallium/auxiliary/util/u_blitter.c:864] in r600_dri.so (0x0032e398)
  4 0x7d060153 r600_resource_copy_region+0xc2(ctx=0x7c40bab0, dst=0x7c512be8, dst_level=0, dstx=0, dsty=0, dstz=0, src=0x7c512e50, src_level=0, src_box=0x32e3e8) [/home/ruben/mesa/src/gallium/drivers/r600/r600_blit.c:172] in r600_dri.so (0x0032e418)
  5 0x7d055fef r600_texture_transfer_destroy+0x12e(ctx=0x7c40bab0, transfer=0x7c512e10) [/home/ruben/mesa/src/gallium/drivers/r600/r600_texture.c:67] in r600_dri.so (0x0032e438)
  6 0x7d236b8b u_transfer_destroy_vtbl+0x1a(pipe=0x7c40bab0, transfer=0x7c512e10) [/home/ruben/mesa/src/gallium/auxiliary/util/u_resource.c:49] in r600_dri.so (0x0032e458)
  7 0x7d105d25 st_texture_image_unmap+0x34(st=0x7c4d9a78, stImage=0x7c512b70) [/home/ruben/mesa/src/mesa/state_tracker/st_texture.c:169] in r600_dri.so (0x0032e538)
  8 0x7d1bb85c st_TexImage+0x3ab(ctx=<is not available>, dims=<is not available>, target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, depth=0x0001, border=0, format=0x80e1, type=0x8367, pixels=0x0(nil), unpack=0x7c38e094, texObj=0x7c512048, texImage=0x7c512b70, imageSize=0, compressed_src=0) [/home/ruben/mesa/src/mesa/state_tracker/st_cb_texture.c:786] in r600_dri.so (0x0032e588)
  9 0x7d1bbf1e st_TexImage2D+0x7d(ctx=0x7c37f3c0, target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, border=0, format=0x80e1, type=0x8367, pixels=0x0(nil), unpack=0x7c38e094, texObj=0x7c512048, texImage=0x7c512b70) [/home/ruben/mesa/src/mesa/state_tracker/st_cb_texture.c:819] in r600_dri.so (0x0032e678)
  10 0x7d0eaba5 teximage+0x784(ctx=0x7c37f3c0, dims=<is not available>, target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, depth=0x0001, border=0, format=0x80e1, type=0x8367, pixels=(nil)) [/home/ruben/mesa/src/mesa/main/teximage.c:2435] in r600_dri.so (0x0032e6b8)
  11 0x7d0eb1be _mesa_TexImage2D+0x6d(target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, border=0, format=0x80e1, type=0x8367, pixels=(nil)) [/home/ruben/mesa/src/mesa/main/teximage.c:2489] in r600_dri.so (0x0032e778)
  12 0x7e92b728 in wined3d (+0x4b727) (0x0032e948)
  13 0x7e940108 in wined3d (+0x60107) (0x0032ede8)
  14 0x7e940daa in wined3d (+0x60da9) (0x0032ee08)
  15 0x7e9c6ada WineDirect3DCreate+0x59() in wined3d (0x0032ee48)
  16 0x7ea16f66 Direct3DCreate8+0x65() in d3d8 (0x0032ee78)
0x7d06b76b evergreen_fs_resource_set+0x4b [/home/ruben/mesa/src/gallium/winsys/r600/drm/evergreen_hw_context.c:890] in r600_dri.so: movl	0x10(%esi),%ecx
Unable to open file ''
Modules:
Module	Address			Debug info	Name (90 modules)
PE	  400000-  b14000	Export          sammax102
ELF	7b800000-7b97e000	Deferred        kernel32<elf>
  \-PE	7b810000-7b97e000	\               kernel32
ELF	7bc00000-7bcb9000	Deferred        ntdll<elf>
  \-PE	7bc10000-7bcb9000	\               ntdll
ELF	7bf00000-7bf03000	Deferred        <wine-loader>
ELF	7ce48000-7ce4d000	Deferred        libtxc_dxtn.so
ELF	7cf52000-7db80000	Dwarf           r600_dri.so
ELF	7db80000-7db95000	Deferred        librt.so.1
ELF	7dc81000-7dc8c000	Deferred        libdrm.so.2
ELF	7dc8c000-7dc8f000	Deferred        libxdamage.so.1
ELF	7dcaa000-7dcad000	Deferred        iso8859-1.so
ELF	7dcad000-7dd05000	Deferred        libgl.so.1
ELF	7dd05000-7dd1f000	Deferred        spoolss<elf>
  \-PE	7dd10000-7dd1f000	\               spoolss
ELF	7dd1f000-7dd3f000	Deferred        localspl<elf>
  \-PE	7dd20000-7dd3f000	\               localspl
ELF	7dd3f000-7dd43000	Deferred        libgpg-error.so.0
ELF	7dd43000-7ddb9000	Deferred        libgcrypt.so.11
ELF	7ddb9000-7ddea000	Deferred        libcrypt.so.1
ELF	7ddea000-7de86000	Deferred        libgnutls.so.26
ELF	7de86000-7debd000	Deferred        libcups.so.2
ELF	7df21000-7df54000	Deferred        uxtheme<elf>
  \-PE	7df30000-7df54000	\               uxtheme
ELF	7df54000-7df5d000	Deferred        libxcursor.so.1
ELF	7df5d000-7df62000	Deferred        libxfixes.so.3
ELF	7df62000-7df65000	Deferred        libxcomposite.so.1
ELF	7df65000-7df6d000	Deferred        libxrender.so.1
ELF	7df6d000-7df8d000	Deferred        imm32<elf>
  \-PE	7df70000-7df8d000	\               imm32
ELF	7df8d000-7dfa5000	Deferred        libxcb.so.1
ELF	7dfa5000-7e0bc000	Deferred        libx11.so.6
ELF	7e0bc000-7e0ca000	Deferred        libxext.so.6
ELF	7e0ca000-7e0e1000	Deferred        libice.so.6
ELF	7e0e2000-7e0e5000	Deferred        libssp.so.0
ELF	7e0ff000-7e1a8000	Deferred        winex11<elf>
  \-PE	7e110000-7e1a8000	\               winex11
ELF	7e1a8000-7e1c5000	Deferred        libgcc_s.so.1
ELF	7e1c5000-7e1e6000	Deferred        libexpat.so.0
ELF	7e1e6000-7e20f000	Deferred        libfontconfig.so.1
ELF	7e20f000-7e224000	Deferred        libz.so.1
ELF	7e224000-7e297000	Deferred        libfreetype.so.6
ELF	7e297000-7e29e000	Deferred        libxrandr.so.2
ELF	7e29e000-7e2a3000	Deferred        libxxf86vm.so.1
ELF	7e2b5000-7e3a0000	Deferred        oleaut32<elf>
  \-PE	7e2d0000-7e3a0000	\               oleaut32
ELF	7e3a0000-7e413000	Deferred        rpcrt4<elf>
  \-PE	7e3b0000-7e413000	\               rpcrt4
ELF	7e413000-7e513000	Deferred        ole32<elf>
  \-PE	7e430000-7e513000	\               ole32
ELF	7e513000-7e54a000	Deferred        winspool<elf>
  \-PE	7e520000-7e54a000	\               winspool
ELF	7e54a000-7e735000	Deferred        shell32<elf>
  \-PE	7e560000-7e735000	\               shell32
ELF	7e735000-7e7f5000	Deferred        comdlg32<elf>
  \-PE	7e740000-7e7f5000	\               comdlg32
ELF	7e7f5000-7e888000	Deferred        winmm<elf>
  \-PE	7e800000-7e888000	\               winmm
ELF	7e888000-7e8ce000	Deferred        dsound<elf>
  \-PE	7e890000-7e8ce000	\               dsound
ELF	7e8ce000-7ea02000	Export          wined3d<elf>
  \-PE	7e8e0000-7ea02000	\               wined3d
ELF	7ea02000-7ea2f000	Export          d3d8<elf>
  \-PE	7ea10000-7ea2f000	\               d3d8
ELF	7ea2f000-7eb1a000	Deferred        comctl32<elf>
  \-PE	7ea40000-7eb1a000	\               comctl32
ELF	7eb1a000-7eb7c000	Deferred        shlwapi<elf>
  \-PE	7eb30000-7eb7c000	\               shlwapi
ELF	7eb7c000-7eb94000	Deferred        version<elf>
  \-PE	7eb80000-7eb94000	\               version
ELF	7eb94000-7ebee000	Deferred        advapi32<elf>
  \-PE	7eba0000-7ebee000	\               advapi32
ELF	7ebee000-7ec79000	Deferred        gdi32<elf>
  \-PE	7ec00000-7ec79000	\               gdi32
ELF	7ec79000-7edaa000	Deferred        user32<elf>
  \-PE	7ec90000-7edaa000	\               user32
ELF	7efa6000-7efbb000	Deferred        libnsl.so.1
ELF	7efbb000-7efe2000	Deferred        libm.so.6
ELF	7efe2000-7efeb000	Deferred        libsm.so.6
ELF	7efeb000-7eff6000	Deferred        libnss_files.so.2
ELF	7eff6000-7f000000	Deferred        libnss_nis.so.2
ELF	b75f2000-b75f7000	Deferred        libxdmcp.so.6
ELF	b75f9000-b75fd000	Deferred        libdl.so.2
ELF	b75fd000-b7600000	Deferred        libxinerama.so.1
ELF	b7610000-b7613000	Deferred        libxau.so.6
ELF	b7613000-b761b000	Deferred        libnss_compat.so.2
ELF	b761b000-b775a000	Deferred        libc.so.6
ELF	b775a000-b7773000	Deferred        libpthread.so.0
ELF	b7773000-b78b3000	Deferred        libwine.so.1
ELF	b78b4000-b78d3000	Deferred        ld-linux.so.2
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) C:\Archivos de programa\Telltale\Sam & Max\Sam And Max Episode 2\sammax102.exe
	00000009    0 <==
0000000e services.exe
	00000017    0
	00000015    0
	00000014    0
	00000010    0
	0000000f    0
00000011 winedevice.exe
	00000016    0
	00000013    0
	00000012    0
00000018 explorer.exe
	00000019    0
Backtrace:
=>0 0x7d06b76b evergreen_fs_resource_set+0x4b(ctx=0x7c40bc38, state=(nil), rid=0) [/home/ruben/mesa/src/gallium/winsys/r600/drm/evergreen_hw_context.c:890] in r600_dri.so (0x0032e198)
  1 0x7d05db04 r600_set_vertex_buffers+0x223(ctx=0x7c40bab0, count=0, buffers=0x7c3757f0) [/home/ruben/mesa/src/gallium/drivers/r600/r600_state_common.c:185] in r600_dri.so (0x0032e1d8)
  2 0x7d20c744 blitter_restore_CSOs+0x1e3(ctx=0x7c375688) [/home/ruben/mesa/src/gallium/auxiliary/util/u_blitter.c:337] in r600_dri.so (0x0032e328)
  3 0x7d20d434 util_blitter_copy_region+0x573(blitter=0x7c375688, dst=0x7c512be8, dstlevel=0, dstx=0, dsty=0, dstz=<is not available>, src=0x7c512e50, srclevel=0, srcbox=0x32e3e8, ignore_stencil=1) [/home/ruben/mesa/src/gallium/auxiliary/util/u_blitter.c:864] in r600_dri.so (0x0032e398)
  4 0x7d060153 r600_resource_copy_region+0xc2(ctx=0x7c40bab0, dst=0x7c512be8, dst_level=0, dstx=0, dsty=0, dstz=0, src=0x7c512e50, src_level=0, src_box=0x32e3e8) [/home/ruben/mesa/src/gallium/drivers/r600/r600_blit.c:172] in r600_dri.so (0x0032e418)
  5 0x7d055fef r600_texture_transfer_destroy+0x12e(ctx=0x7c40bab0, transfer=0x7c512e10) [/home/ruben/mesa/src/gallium/drivers/r600/r600_texture.c:67] in r600_dri.so (0x0032e438)
  6 0x7d236b8b u_transfer_destroy_vtbl+0x1a(pipe=0x7c40bab0, transfer=0x7c512e10) [/home/ruben/mesa/src/gallium/auxiliary/util/u_resource.c:49] in r600_dri.so (0x0032e458)
  7 0x7d105d25 st_texture_image_unmap+0x34(st=0x7c4d9a78, stImage=0x7c512b70) [/home/ruben/mesa/src/mesa/state_tracker/st_texture.c:169] in r600_dri.so (0x0032e538)
  8 0x7d1bb85c st_TexImage+0x3ab(ctx=<is not available>, dims=<is not available>, target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, depth=0x0001, border=0, format=0x80e1, type=0x8367, pixels=0x0(nil), unpack=0x7c38e094, texObj=0x7c512048, texImage=0x7c512b70, imageSize=0, compressed_src=0) [/home/ruben/mesa/src/mesa/state_tracker/st_cb_texture.c:786] in r600_dri.so (0x0032e588)
  9 0x7d1bbf1e st_TexImage2D+0x7d(ctx=0x7c37f3c0, target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, border=0, format=0x80e1, type=0x8367, pixels=0x0(nil), unpack=0x7c38e094, texObj=0x7c512048, texImage=0x7c512b70) [/home/ruben/mesa/src/mesa/state_tracker/st_cb_texture.c:819] in r600_dri.so (0x0032e678)
  10 0x7d0eaba5 teximage+0x784(ctx=0x7c37f3c0, dims=<is not available>, target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, depth=0x0001, border=0, format=0x80e1, type=0x8367, pixels=(nil)) [/home/ruben/mesa/src/mesa/main/teximage.c:2435] in r600_dri.so (0x0032e6b8)
  11 0x7d0eb1be _mesa_TexImage2D+0x6d(target=0x0de1, level=0, internalFormat=0x8058, width=0x0004, height=0x0004, border=0, format=0x80e1, type=0x8367, pixels=(nil)) [/home/ruben/mesa/src/mesa/main/teximage.c:2489] in r600_dri.so (0x0032e778)
  12 0x7e92b728 in wined3d (+0x4b727) (0x0032e948)
  13 0x7e940108 in wined3d (+0x60107) (0x0032ede8)
  14 0x7e940daa in wined3d (+0x60da9) (0x0032ee08)
  15 0x7e9c6ada WineDirect3DCreate+0x59() in wined3d (0x0032ee48)
  16 0x7ea16f66 Direct3DCreate8+0x65() in d3d8 (0x0032ee78)
Comment 8 Jerome Glisse 2010-12-21 08:04:09 UTC
Pushed another fix
Comment 9 Öyvind Saether 2010-12-21 09:25:27 UTC
sdlmame no longer throws a SIGSEGV when starting sdlmame games, but they do not work as expected. The games start just fine and pop up a black square where the game should be  (when vertix buffers are enabled). Sound works, the game apparently runs, but there is no visual output. I expect the visual outut.

I don't know if this is related/same issue/completely different problem, but if there are any magic commands I can run & paste the output of in order to help investigate then please let me know.
Comment 10 Rubén Fernández 2010-12-21 10:45:59 UTC
Created attachment 41350 [details] [review]
prevent segfault in evergreen

This patch ensures your fix doesn't break evergreen cards.

Turns out that, while the function "r600_context_pipe_state_set_resource" checks for the "state" parameter being null, it's counterpart "evergreen_resource_set" does not.

I just copied and pasted the validation code from r600 and everything seems to work OK again.
Comment 11 Rubén Fernández 2010-12-21 21:31:52 UTC
Commit 2dd189a824d4c5c5157aaf381d5e424317a8d1e4 by Dave solves the evergreen segfaults; my patch is unnecessary now
Comment 12 Chris 2011-01-03 09:59:06 UTC
Created attachment 41595 [details]
OpenGL code from Mame

Client code to Mesa Gallium which triggers the no video output bug.
Comment 13 Chris 2011-01-03 09:59:54 UTC
I can confirm the game runs but doesn't output any video now, unless using -no_vbo which avoids the VBO use.  

Does this possibly mean that mame is causing the NULL vbo buffer as the first one each time, and somehow that works fine on Mesa classic while with Gallium it is having these issues?  I'm looking at the Mame VBO code and not too familiar with OpenGL/SDL programming, but am posting the opengl code from Mame so it might help show what is going on from the application.
Comment 14 Alexandre Derumier 2011-02-10 07:05:00 UTC
*** Bug 33933 has been marked as a duplicate of this bug. ***
Comment 15 Öyvind Saether 2011-02-13 10:42:57 UTC
2.6.38-rc4-git2, latest mesa git

$ gdb sdlmame

warning: Can not parse XML syscalls information; XML support was disabled at compile time.
GNU gdb (Gentoo 7.0.1 p1) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/games/bin/sdlmame...done.
(gdb) run
Starting program: /usr/games/bin/sdlmame
[Thread debugging using libthread_db enabled]
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
[New Thread 0x7ffff43c7710 (LWP 19842)]
Invalid numscreens value 2; reverting to 1
[New Thread 0x7ffff3bc6710 (LWP 19843)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff3bc6710 (LWP 19843)]
0x00007ffff2346951 in u_vbuf_mgr_set_vertex_buffers (mgrb=0x71f97b0, count=1, bufs=0x7ffff3bc58e0) at util/u_vbuf_mgr.c:482
482     util/u_vbuf_mgr.c: Ingen slik fil eller filkatalog.
        in util/u_vbuf_mgr.c
(gdb) bt full
#0  0x00007ffff2346951 in u_vbuf_mgr_set_vertex_buffers (mgrb=0x71f97b0, count=1, bufs=0x7ffff3bc58e0) at util/u_vbuf_mgr.c:482
        vb = 0x7ffff3bc58e0
        mgr = 0x71f97b0
        i = 0
#1  0x00007ffff20bb4f7 in r600_set_vertex_buffers (ctx=0x720cfb0, count=1, buffers=0x7ffff3bc58e0) at r600_state_common.c:191
        rctx = 0x720cfb0
        i = 1
#2  0x00007ffff219f218 in st_draw_vbo (ctx=0x7735fc0, arrays=0x7786f20, prims=0x7ffff3bc5c70, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3) at state_tracker/st_draw.c:712
        st = 0x77834b0
        pipe = 0x720cfb0
        vp = 0x7fffec263fb0
        vpv = 0x7fffec1bcef0
        vbuffer = {{stride = 8, max_index = 3, buffer_offset = 0, buffer = 0x0}, {stride = 3961469624, max_index = 32767, buffer_offset = 4, buffer = 0x7ffff3bc5ac0}, {stride = 27394114, max_index = 32767, buffer_offset = 3,
            buffer = 0x7fff01b6c001}, {stride = 16, max_index = 0, buffer_offset = 4089207360, buffer = 0x7ffff2247a0e}, {stride = 27394048, max_index = 117, buffer_offset = 4089207488, buffer = 0x7fffec1f3ab8}, {stride = 27394048,
            max_index = 0, buffer_offset = 4089207248, buffer = 0x7ffff3bc5ac0}, {stride = 27394048, max_index = 32767, buffer_offset = 4064463776, buffer = 0x7fff0000029a}, {stride = 4062462521, max_index = 32767,
            buffer_offset = 27394049, buffer = 0x7ffff3bc5a00}, {stride = 27394050, max_index = 113, buffer_offset = 4089207488, buffer = 0x1a20000}, {stride = 4089207488, max_index = 4, buffer_offset = 27394050,
            buffer = 0x630ffffcd10}, {stride = 4064463296, max_index = 32767, buffer_offset = 3961469768, buffer = 0x7ffff3bc5a40}, {stride = 4062463364, max_index = 32767, buffer_offset = 14, buffer = 0x30}, {stride = 14,
            max_index = 27394070, buffer_offset = 64, buffer = 0x1a0000000e}, {stride = 3959423112, max_index = 32767, buffer_offset = 27394049, buffer = 0x2c}, {stride = 3961469768, max_index = 4, buffer_offset = 3959423032,
            buffer = 0x60}, {stride = 125262992, max_index = 4, buffer_offset = 80, buffer = 0x7775c90}, {stride = 3959423008, max_index = 32767, buffer_offset = 44, buffer = 0x0}, {stride = 4160737280, max_index = 32767,
            buffer_offset = 3, buffer = 0x7ffff644f9f0}, {stride = 4089207568, max_index = 32767, buffer_offset = 125262992, buffer = 0x7ffff3bc5b10}, {stride = 4294954256, max_index = 32767, buffer_offset = 3961245296,
            buffer = 0x7ffff21b8091}, {stride = 4089207600, max_index = 32767, buffer_offset = 3961929648, buffer = 0x2c00000020}, {stride = 4089207600, max_index = 32767, buffer_offset = 125262992, buffer = 0x7735fc0}, {stride = 14,
            max_index = 2640323868, buffer_offset = 3961229296, buffer = 0x0}, {stride = 125262992, max_index = 0, buffer_offset = 4089207680, buffer = 0x7ffff2248230}, {stride = 0, max_index = 0, buffer_offset = 3961929648,
            buffer = 0x774a948}, {stride = 125001664, max_index = 0, buffer_offset = 125001664, buffer = 0x7735fc0}, {stride = 4062858612, max_index = 32767, buffer_offset = 125341504, buffer = 0x7ffff3bc5b90}, {stride = 4062673767,
            max_index = 32767, buffer_offset = 125086024, buffer = 0x7735fc0}, {stride = 125282840, max_index = 0, buffer_offset = 125324352, buffer = 0x7ffff3bc5bb0}, {stride = 4062673099, max_index = 32767,
            buffer_offset = 4061607402, buffer = 0x7735fc0}, {stride = 4089207776, max_index = 32767, buffer_offset = 4061779401, buffer = 0x4100000f21739b2}, {stride = 125001664, max_index = 0, buffer_offset = 125282272,
            buffer = 0x77834b0}}
        attr = 0  
        velements = {{src_offset = 119464336, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_R32G32_FLOAT}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE},
          {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 0, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0,
            vertex_buffer_index = 48, src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 3959423112, src_format = 32767}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 34,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 3, vertex_buffer_index = 3959423024, src_format = 32767}, {src_offset = 80, instance_divisor = 0, vertex_buffer_index = 0,
            src_format = PIPE_FORMAT_A8R8G8B8_UNORM}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 3961244896, src_format = 32767}, {src_offset = 3959423008, instance_divisor = 32767, vertex_buffer_index = 34,
            src_format = PIPE_FORMAT_NONE}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 4160737280, src_format = 32767}, {src_offset = 3, instance_divisor = 0, vertex_buffer_index = 4131715568, src_format = 32767}, {
            src_offset = 0, instance_divisor = 0, vertex_buffer_index = 3961244896, src_format = 32767}, {src_offset = 4089206880, instance_divisor = 32767, vertex_buffer_index = 4294954256, src_format = 32767}, {src_offset = 0,
            instance_divisor = 0, vertex_buffer_index = 4061040412, src_format = 32767}, {src_offset = 0, instance_divisor = 0, vertex_buffer_index = 3961229296, src_format = 32767}, {src_offset = 33, instance_divisor = 0,
            vertex_buffer_index = 3961245248, src_format = 706}, {src_offset = 4064463664, instance_divisor = 32767, vertex_buffer_index = 3961469696, src_format = 32767}, {src_offset = 4089206992, instance_divisor = 32767,
            vertex_buffer_index = 4062463364, src_format = 32767}, {src_offset = 14, instance_divisor = 0, vertex_buffer_index = 8, src_format = PIPE_FORMAT_B8G8R8A8_UNORM}, {src_offset = 27394177, instance_divisor = 6,
            vertex_buffer_index = 3959423008, src_format = PIPE_FORMAT_NONE}, {src_offset = 27394114, instance_divisor = 45, vertex_buffer_index = 4089207488, src_format = 32767}, {src_offset = 0, instance_divisor = 8,
            vertex_buffer_index = 4089207488, src_format = PIPE_FORMAT_X8R8G8B8_UNORM}, {src_offset = 3961469696, instance_divisor = 32767, vertex_buffer_index = 16, src_format = PIPE_FORMAT_NONE}, {src_offset = 4089207088,
            instance_divisor = 32767, vertex_buffer_index = 4062464902, src_format = 32767}}
        num_vbuffers = 1
        num_velements = 2
        ibuffer = {index_size = 0, offset = 0, buffer = 0x0}
        userSpace = 0 '\000'
        vertDataEdgeFlags = 0 '\000'
        info = {indexed = 0 '\000', mode = 0, start = 0, count = 0, start_instance = 0, instance_count = 0, index_bias = 0, min_index = 0, max_index = 0, primitive_restart = 0 '\000', restart_index = 0}
        i = 32767 
#3  0x00007ffff2285119 in vbo_draw_arrays (ctx=0x7735fc0, mode=7, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
        vbo = 0x7783ec0
        exec = 0x7784c40
        prim = {{mode = 7, indexed = 0, begin = 1, end = 1, weak = 0, no_current_update = 1, pad = 0, start = 0, count = 4, basevertex = 0, num_instances = 1}, {mode = 255, indexed = 1, begin = 1, end = 1, weak = 1,
            no_current_update = 1, pad = 3, start = 125001664, count = 0, basevertex = -205759296, num_instances = 32767}}
#4  0x00007ffff22851d1 in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:619
        ctx = 0x7735fc0
---Type <return> to continue, or q <return> to quit---
#5  0x00000000013dcc56 in drawogl_window_draw (window=0x71e6ea0, dc=0, update=1) at src/osd/sdl/drawogl.c:1525
        i = 0
        vofs = 0  
        pendingPrimitive = -1
        is_vector = 0
        prim = 0x78993c0
        texture = 0x7fffec1567c0
        scrnum = 0
        screen = 0x7197520
        sdl = 0x71ea0d0
        hofs = 0  
        curPrimitive = 1
#6  0x00000000013d93b4 in draw_video_contents_wt (param=0x78e7500, threadid=0) at src/osd/sdl/window.c:1168
        dc = 0
        update = 1
        wp = 0x78e7500
        window = 0x71e6ea0
#7  0x00000000020d979f in worker_thread_process (queue=0x71c8380, thread=0x71c82f0) at src/osd/sdl/sdlwork.c:720
        item = 0x71e6510
        lockslot = 0
        threadid = 0
#8  0x00000000020d95be in worker_thread_entry (param=0x71c82f0) at src/osd/sdl/sdlwork.c:654
        stopspin = 0
        thread = 0x71c82f0
        queue = 0x71c8380
#9  0x00007ffff75248e4 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#10 0x00007ffff64a91dd in clone () from /lib/libc.so.6
No symbol table info available.
(gdb) quit
A debugging session is active.

        Inferior 1 [process 19839] will be killed.

Quit anyway? (y or n) y
Comment 16 Alexandre Derumier 2011-02-22 10:38:39 UTC
seem to be corrected for me since today mesa git ! :)

maybe commit 

http://cgit.freedesktop.org/mesa/mesa/commit/?id7942e6a5ae0113f1cbdf62b772849cf6cdd4eca1

 st/mesa: fix crash when DrawBuffer->_ColorDrawBuffers[0] is NULL


or
http://cgit.freedesktop.org/mesa/mesa/commit/?id=695cdee67827ee2c11e1445eb2022d3a530f1b23

st/mesa: fix crash when using both user and vbo buffers with the same stride


i'm using r600g on rv620 chipset.
Comment 17 Tom Stellard 2014-01-14 19:38:40 UTC
Reported as fixed.


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.