[opensource-dev] Review Request: storm-1038: crash in texture cache pruning

Cron Stardust kf6kjg at gmail.com
Thu Mar 3 14:13:28 PST 2011



> On None, Oz Linden wrote:
> > indra/newview/lltexturecache.cpp, line 1439
> > <http://codereview.secondlife.com/r/172/diff/1/?file=1043#file1043line1439>
> >
> >     This was the crash - note that it is exactly the same condition that would normally get you out of the loop above.
> >

Any idea why this assert was there in the first place?  It looks to me like the code was escaping the loop on an error clause (which would explain why it was done in "if() break;" style,) and then asserting on that error.  If I'm right then why there wasn't any comments on those lines explaining the reasoning escapes me...  Such logic is far from obvious! :P

Note also that if there were no entries to purge (entries_to_purge < 0 because the above code found enough empty entries to successfully reduce the cache size enough,) and purge_list is empty (as it should be at this point in the code,) then the assert would fire.  Of course, I'm just trying to determine the reasoning behind the assert in the first place, and exercise my code reverse engineering skills. (The last few classes haven't had an ounce of real code, so I'm bored... :P )

PS: While you're in this territory, you might want to put some spaces around the subtraction operator inside the parenthesis on line 1426.  It looked too much like a dash to me on first glance!


- Cron


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/172/#review410
-----------------------------------------------------------


On March 3, 2011, 12:12 p.m., Oz Linden wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/172/
> -----------------------------------------------------------
> 
> (Updated March 3, 2011, 12:12 p.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> -------
> 
> If the viewer is started when the maximum number of items allowed in the texture cache is greater than the number actually in the cache, the viewer crashes.
> 
> 
> This addresses bug storm-1038.
>     http://jira.secondlife.com/browse/storm-1038
> 
> 
> Diffs
> -----
> 
>   indra/newview/lltexturecache.cpp 8596ccc522d9 
> 
> Diff: http://codereview.secondlife.com/r/172/diff
> 
> 
> Testing
> -------
> 
> Since I found this by somehow getting into the over-full condition when working on an unrelated issue, I found myself unable to launch my viewer.  One this fix was applied, launching worked just fine.
> 
> 
> Thanks,
> 
> Oz
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110303/6f33f021/attachment.htm 


More information about the opensource-dev mailing list