<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 7, 2012 at 7:26 PM, José Fonseca <span dir="ltr"><<a href="mailto:jose.r.fonseca@gmail.com" target="_blank">jose.r.fonseca@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Fri, Jul 13, 2012 at 7:07 AM, José Fonseca <<a href="mailto:jose.r.fonseca@gmail.com">jose.r.fonseca@gmail.com</a>> wrote:<br>
> On Wed, Jun 20, 2012 at 9:59 PM, Dan McCabe <<a href="mailto:zen3d.linux@gmail.com">zen3d.linux@gmail.com</a>> wrote:<br>
>> On 06/20/2012 10:08 AM, Dan McCabe wrote:<br>
>>><br>
>>> On 06/20/2012 05:37 AM, José Fonseca wrote:<br>
>>>><br>
>>>> Dan,<br>
>>>><br>
>>>> I'm not a Qt expert, but the series looks good to me overall.<br>
>>>><br>
>>>> However I'm seeing segfaults with certain traces.<br>
>>>><br>
>>>> For example, when I do<br>
>>>><br>
>>>>    wget<br>
>>>> <a href="http://people.freedesktop.org/~jrfonseca/traces/cinebench-r11-test.trace" target="_blank">http://people.freedesktop.org/~jrfonseca/traces/cinebench-r11-test.trace</a><br>
>>>>    ./qapitrace cinebench-r11-test.trace<br>
>>>><br>
>>>> and then press Ctrl+T, I get<br>
>>>><br>
>>>>    error: invalid snapshot stream encountered<br>
>>>>    ASSERT: "process.state() != QProcess::Running" in file<br>
>>>> /home/jfonseca/projects/apitrace/gui/retracer.cpp, line 409<br>
>>>>    Aborted<br>
>>>><br>
>>>> This doesn't not happen with master. It could be a random race<br>
>>>> condition that existed before, but becomes more frequent with your<br>
>>>> series.<br>
>>>><br>
>>>> Jose<br>
>>>><br>
>>>> On Fri, Jun 1, 2012 at 9:40 PM, Dan McCabe<<a href="mailto:zen3d.linux@gmail.com">zen3d.linux@gmail.com</a>>  wrote:<br>
>>>>><br>
>>>>> This patch set adds support for drawing the thumbnails of calls to<br>
>>>>> the apitrace GUI app.<br>
>>><br>
>>> Thanks. I will investigate.<br>
>>><br>
>> While I haven't had the time to look further into this issue, the message<br>
>> "error: invalid snapshot stream encountered" is indicative of something<br>
>> (possibly an error in glretrace) polluting the input for qapitrace from<br>
>> glretrace. But I will look into it in more detail.<br>
><br>
> I thought of that, but glretrace didn't change, andI checked the data<br>
> glretrce is sending, and it is pristine..<br>
><br>
> It's either a latent problem in QProcess or BlockingIODevice (e.g,<br>
> Brian Paul also reported corruption reading JSON with<br>
> BlockingIODevice, which is why I had to disabel on commit<br>
> 95b4056d6a126a90e8e4e046e250ee4d75a1e8db ), or just a new bug in the<br>
> patch series.<br>
><br>
> So my suggestion to narrow this is:<br>
> - See if  disabling BlockingIODevice fixes (even if this fixes this is<br>
> not a solution, as this will call all screenshots to be stored in<br>
> memory -- impossible for big traces)<br>
> - bisect which of the patches of the new series induces the problem<br>
<br>
</div></div>I fixed this.<br>
<br>
The problem was that in certain cases, glretrace was mixing JSON state<br>
with the PNM snapshots, due to commit<br>
64deca6fafdc67e007ca220470df5c37849fc36c .<br>
<br>
The code is not very stable yet though -- I'm getting infinite loops<br>
and inifine memory allocation.<br>
<br>
Jose<br>
</blockquote></div><br></div><div class="gmail_extra">FYI, I finally managed to iron out the remaining issues and merged this into master.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The final issues (seen with the above mentioned cinebench-r11-test.trace) were:</div><div class="gmail_extra">- glBegin was wrongly being considered a draw call</div><div class="gmail_extra">- calls nos were being assumed to be continuous (but in fact some calls can be filtered out)</div><div class="gmail_extra"><br></div><div class="gmail_extra">The other memory/instability issues with the gui were probably solved independently in the meanwhile.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jose</div></div>