<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - segfault in _mesa_get_format_datatype and _mesa_get_color_read_type when state dumping with glretrace"
href="https://bugs.freedesktop.org/show_bug.cgi?id=65173#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - segfault in _mesa_get_format_datatype and _mesa_get_color_read_type when state dumping with glretrace"
href="https://bugs.freedesktop.org/show_bug.cgi?id=65173">bug 65173</a>
from <span class="vcard"><a class="email" href="mailto:jfonseca@vmware.com" title="José Fonseca <jfonseca@vmware.com>"> <span class="fn">José Fonseca</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=65173#c6">comment #6</a>)
<span class="quote">> Hmm, could we get another person (Jose?) to try this too?</span >
Yep, it happens here too. ctx->ReadBuffer->_ColorReadBuffer is NULL in
_mesa_get_color_read_type. This is the full stack backtrace (this time debug
build):
Program received signal SIGSEGV, Segmentation fault.
_mesa_get_color_read_type (ctx=0xbed310) at src/mesa/main/framebuffer.c:905
905 const GLenum data_type = _mesa_get_format_datatype(
(gdb) bt
#0 _mesa_get_color_read_type (ctx=0xbed310) at src/mesa/main/framebuffer.c:905
#1 0x00007ffff4ed67f8 in find_custom_value (ctx=0xbed310, d=0x7ffff608ca88,
v=0x7fffffffb550) at src/mesa/main/get.c:696
#2 0x00007ffff4ed75ef in find_value (func=0x7ffff5a0328c "glGetIntegerv",
pname=35738, p=0x7fffffffb548, v=0x7fffffffb550)
at src/mesa/main/get.c:1099
#3 0x00007ffff4ed7d69 in _mesa_GetIntegerv (pname=35738,
params=0x7fffffffce88) at src/mesa/main/get.c:1299
#4 0x000000000043255a in _glGetIntegerv (pname=35738, params=0x7fffffffce88)
at /home/jfonseca/projects/apitrace/dispatch/glproc.hpp:4802
#5 0x000000000045bb28 in glstate::dumpParameters (json=..., context=...)
at /home/jfonseca/projects/apitrace/retrace/glstate_params.cpp:14881
#6 0x000000000042e3ee in glstate::dumpCurrentContext (os=...) at
/home/jfonseca/projects/apitrace/retrace/glstate.cpp:169
#7 0x000000000042c86a in GLDumper::dumpState (this=0x909d10, os=...)
at /home/jfonseca/projects/apitrace/retrace/glretrace_main.cpp:445
#8 0x000000000041fb9d in retrace::retraceCall (call=0xbd8f40) at
/home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:197
#9 0x00000000004219ec in retrace::RelayRunner::runLeg (this=0x98a720,
call=0xbd8f40)
at /home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:342
#10 0x00000000004218d2 in retrace::RelayRunner::runRace (this=0x98a720)
at /home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:313
#11 0x000000000041fe9a in retrace::RelayRace::run (this=0x7fffffffde30)
at /home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:480
#12 0x0000000000420072 in retrace::mainLoop () at
/home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:541
#13 0x0000000000420879 in main (argc=4, argv=0x7fffffffe068) at
/home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:804
The proposed patch fixes it.
I don't know if the ctx->ReadBuffer check is necessary but I suppose it doesn't
hurt.
In summary: looks good to me.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>