Bug 32865

Summary: Frogatto (trunk r4089) crashes on startup,
Product: Mesa Reporter: Ignacio R. Morelle <shadowm2006>
Component: Drivers/DRI/R600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium CC: shadowm2006
Version: gitKeywords: NEEDINFO
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Ignacio R. Morelle 2011-01-05 21:28:41 UTC
Frogatto [http://www.frogatto.com/] at SVN revision 4089 crashes on startup due to an attempt to execute code from a NULL memory address, while calling the glGenFramebuffers() method.

This only occurs when running with the latest revision (a728646fb55245477d35e2761c3e0d15099b4cd4 from the freedesktop.org repository, current upstream HEAD) of Mesa's classic ATI R600 DRI2 driver. When running the application with LIBGL_ALWAYS_SOFTWARE=1 the software renderer kicks in and the crash does not happen.

Backtrace:
> (gdb) bt
> #0  0x0000000000000000 in ?? ()
> #1  0x00000000006b8c3b in texture_frame_buffer::init () at src/texture_frame_buffer.cpp:47
> #2  0x0000000000612d1c in main (argc=1, argv=0x7fffffffe1a8) at src/main.cpp:396
> (gdb) up
> #1  0x00000000006b8c3b in texture_frame_buffer::init () at src/texture_frame_buffer.cpp:47
> 47              EXT_CALL(glGenFramebuffers)(1, &framebuffer_id);
> (gdb) up
> #2  0x0000000000612d1c in main (argc=1, argv=0x7fffffffe1a8) at src/main.cpp:396
396             texture_frame_buffer::init();

In frame 1, framebuffer_id is zero, and the address passed is valid ((GLuint *) 0xb025b0) as far as gdb can tell. Additionally, the < EXT_CALL(call) > macro in question resolves to simply < call > on my platform.

System specs:
* ATI Radeon HD 3200 GPU
* Linux kernel 2.6.37 (release), using drm/radeon in KMS mode. 64-bit kernel and userland.
* Debian Sid + experimental ~ 2011-01-06 
* X.Org X Server 1.9.2.902 (1.9.3 RC 2)
* libdrm from the freedesktop.org git repository at commit bad5242a59aa8e31cf10749e2ac69b3c66ef7da0 (current upstream HEAD)
* radeon DDX from the freedesktop.org git repository at commit 35c4ff936601ee083f51510a5192fb97d622a483
* Mesa from the freedesktop.org git repository at commit a728646fb55245477d35e2761c3e0d15099b4cd4 (current upstream HEAD)
* glxinfo: OpenGL renderer string: Mesa DRI R600 (RS780 9612) 20090101  TCL DRI2
* glxinfo: OpenGL version string: 2.1 Mesa 7.10-devel
Comment 1 Ian Romanick 2011-01-06 14:00:51 UTC
The glGenFramebuffers function is part of the GL_ARB_framebuffer_object extension, and I don't think r600c supports that extension.  Running 'glxinfo | grep framebuffer' will tell for sure.  If this function isn't supported by the driver, it's an application bug.
Comment 2 Ignacio R. Morelle 2011-01-06 14:25:09 UTC
Indeed it's an application bug and I have now contacted the developers about it. I had originally searched for GL_EXT_framebuffer_object instead, which is supported by this driver.

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.