added some logging to help track down crash in EXT-5849

meow-7.2.2
Richard Linden 2010-03-05 17:38:21 -08:00
parent a3fa96ff0e
commit 7cea645ba2
3 changed files with 12 additions and 8 deletions

View File

@ -73,9 +73,9 @@ S32 LLView::sLastBottomXML = S32_MIN;
std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack;
#if LL_DEBUG
//#if LL_DEBUG
BOOL LLView::sIsDrawing = FALSE;
#endif
//#endif
// Compiler optimization, generate extern template
template class LLView* LLView::getChild<class LLView>(
@ -150,6 +150,10 @@ LLView::~LLView()
{
dirtyRect();
//llinfos << "Deleting view " << mName << ":" << (void*) this << llendl;
if (LLView::isDrawing)
{
llwarns << "Deleting view " << mName << " during UI draw() phase" << llendl;
}
// llassert(LLView::sIsDrawing == FALSE);
// llassert_always(sDepth == 0); // avoid deleting views while drawing! It can subtly break list iterators

View File

@ -171,9 +171,9 @@ private:
// widgets in general are not copyable
LLView(const LLView& other) {};
public:
#if LL_DEBUG
//#if LL_DEBUG
static BOOL sIsDrawing;
#endif
//#endif
enum ESoundFlags
{
SILENT = 0,

View File

@ -2021,9 +2021,9 @@ void LLViewerWindow::drawDebugText()
void LLViewerWindow::draw()
{
#if LL_DEBUG
//#if LL_DEBUG
LLView::sIsDrawing = TRUE;
#endif
//#endif
stop_glerror();
LLUI::setLineWidth(1.f);
@ -2135,9 +2135,9 @@ void LLViewerWindow::draw()
LLUI::popMatrix();
gGL.popMatrix();
#if LL_DEBUG
//#if LL_DEBUG
LLView::sIsDrawing = FALSE;
#endif
//#endif
}
// Takes a single keydown event, usually when UI is visible