All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

VWR-25609 crash on shutdown in LLGLNamePool::sInstances destructor

Review Request #279 - Created April 26, 2011 and submitted

Brad Kittenbrink Reviewers
viewer
VWR-25609 richard.linden
None viewer-development
The error is due to the fact that the instances of subclasses of LLGLNamePool (e.g. LLVertexBuffer::sStreamVBOPool) were having their destructors run after the destructor for LLGLNamePool::sInstances, yet accessing the members of the already destructed vector, causing a crash.

The fix is to use the LLInstanceTracker class which has already solved this problem in a general way, rather than hand-rolling our own custom solution in LLGLNamePool.
Tested in debug builds with the Microsoft Debug heap and confirmed that this patch allows shutdown to complete without error.
Review request changed
Updated (May 2, 2011, 4:30 p.m.)
Ship it!
Posted (May 3, 2011, 5:47 p.m.)
looks good.