> On March 25, 2011, 6:20 p.m., Merov Linden wrote: > > indra/newview/llappviewer.cpp, lines 1417-1420 > > <http://codereview.secondlife.com/r/218/diff/1/?file=1306#file1306line1417> > > > > Aren't we in danger of immediate crash when called? If so, what happens > > if we return here? Do we let the app crash? Shouldn't we crash here > > immediately so we can identify in the stack trace which memory allocation > > produces the situation? > > Xiaohong Bao wrote: > if we can avoid crash, we try to. if we can not, then viewer will crash > somewhere. This fix can not completely eliminate memory failure but try its > best to save the viewer from crash.
The problem is that it doesn't save the viewer from crashing, it's just delaying the inevitable. Worse: it's now going to crash in some random part of the code because memory gets corrupted, wasting tons of time for devs tracking why and doing no good to the user. At the very least, if one gets into this situation of calling forceToRelieveMemory() too often, one should get a debug message in the log with some stats (memory used, memory requested), and a stack trace (I think there's a call for that available in llcommon). That will help the dev to identify the possibly bad allocs. - Merov ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://codereview.secondlife.com/r/218/#review505 ----------------------------------------------------------- On March 21, 2011, 10:16 a.m., Xiaohong Bao wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://codereview.secondlife.com/r/218/ > ----------------------------------------------------------- > > (Updated March 21, 2011, 10:16 a.m.) > > > Review request for Viewer. > > > Summary > ------- > > partial fix for STORM-948: [crashhunters] meta-issue for bad_alloc exceptions > fixed: crashed caused by snapshots, loading the last bitmap, too large > texture memory due to insufficient physical memory > also force to rebuild VBO if the memory is about to be running out to > eliminate possible memory leaking caused by GPU driver. > > the changeset: 30a545579ab6 > > > This addresses bug storm-948. > http://jira.secondlife.com/browse/storm-948 > > > Diffs > ----- > > indra/newview/llappviewer.h a8639217816b > indra/newview/llappviewer.cpp a8639217816b > indra/newview/llviewerdisplay.cpp a8639217816b > indra/newview/llviewertexturelist.h a8639217816b > indra/newview/llviewertexturelist.cpp a8639217816b > indra/newview/llviewerwindow.cpp a8639217816b > > Diff: http://codereview.secondlife.com/r/218/diff > > > Testing > ------- > > > Thanks, > > Xiaohong > >
_______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges