Address several remaining 1.8.9.8373 crashes reported on

This commit is contained in:
Shyotl
2020-04-23 14:56:47 -05:00
parent 829045c262
commit 5de94d6610
7 changed files with 50 additions and 14 deletions

View File

@@ -1197,6 +1197,10 @@ void LLVertexBuffer::genBuffer(U32 size)
{
mMappedData = sDynamicVBOPool.allocate(mGLBuffer, mSize);
}
if ((sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB) && !mMappedData)
{
LL_ERRS() << "mMappedData allocation failedd" << LL_ENDL;
}
sGLCount++;
}
@@ -1213,6 +1217,10 @@ void LLVertexBuffer::genIndices(U32 size)
{
mMappedIndexData = sDynamicIBOPool.allocate(mGLIndices, mIndicesSize);
}
if ((sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB) && !mMappedIndexData)
{
LL_ERRS() << "mMappedIndexData allocation failedd" << LL_ENDL;
}
sGLCount++;
}
@@ -1848,6 +1856,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL;
}
bool was_locked = mIndexLocked;
if (!mIndexLocked)
{
mIndexLocked = true;
@@ -1942,6 +1951,10 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
LL_ERRS() << "glMapBuffer returned NULL (no index data)" << LL_ENDL;
}
else if (was_locked)
{
LL_ERRS() << "mIndexLocked was true but no Index data allocated" << LL_ENDL;
}
else
{
LL_ERRS() << "memory allocation for Index data failed. " << LL_ENDL;

View File

@@ -531,17 +531,24 @@ void LLChatBar::sendChat( EChatType type )
// static
void LLChatBar::startChat(const char* line)
{
if (!gChatBar || !gChatBar->getParent())
{
return;
}
gChatBar->getParent()->setVisible(TRUE);
gChatBar->setKeyboardFocus(TRUE);
gSavedSettings.setBOOL("ChatVisible", TRUE);
if (line && gChatBar->mInputEditor)
if (gChatBar->mInputEditor)
{
std::string line_string(line);
gChatBar->mInputEditor->setText(line_string);
if (line)
{
std::string line_string(line);
gChatBar->mInputEditor->setText(line_string);
}
// always move cursor to end so users don't obliterate chat when accidentally hitting WASD
gChatBar->mInputEditor->setCursorToEnd();
}
// always move cursor to end so users don't obliterate chat when accidentally hitting WASD
gChatBar->mInputEditor->setCursorToEnd();
}
@@ -550,7 +557,8 @@ void LLChatBar::startChat(const char* line)
void LLChatBar::stopChat()
{
// In simple UI mode, we never release focus from the chat bar
gChatBar->setKeyboardFocus(FALSE);
if (gChatBar)
gChatBar->setKeyboardFocus(FALSE);
// If we typed a movement key and pressed return during the
// same frame, the keyboard handlers will see the key as having
@@ -562,7 +570,8 @@ void LLChatBar::stopChat()
gAgent.stopTyping();
// hide chat bar so it doesn't grab focus back
gChatBar->getParent()->setVisible(FALSE);
if (gChatBar && gChatBar->getParent())
gChatBar->getParent()->setVisible(FALSE);
gSavedSettings.setBOOL("ChatVisible", FALSE);
}

View File

@@ -515,6 +515,10 @@ void LLCloudLayer::connectNeighbor(LLCloudLayer *cloudp, U32 direction)
return;
}
if (mNeighbors[direction])
{
mNeighbors[direction]->mNeighbors[gDirOpposite[direction]] = NULL;
}
mNeighbors[direction] = cloudp;
if (cloudp)
mNeighbors[direction]->mNeighbors[gDirOpposite[direction]] = this;

View File

@@ -94,7 +94,7 @@ void LLHUDIcon::renderIcon(BOOL for_select)
if (mHidden)
return;
if (mSourceObject.isNull() || mImagep.isNull())
if (mSourceObject.isNull() || mImagep.isNull() || mSourceObject->mDrawable.isNull())
{
markDead();
return;

View File

@@ -1895,6 +1895,11 @@ void LLIMProcessing::requestOfflineMessages()
void LLIMProcessing::requestOfflineMessagesCoro(const LLCoroResponder& responder)
{
if (LLApp::isQuitting() || !gAgent.getRegion())
{
return;
}
auto status = responder.getStatus();
if (!responder.isGoodStatus(status)) // success = httpResults["success"].asBoolean();

View File

@@ -548,24 +548,29 @@ void start_chat( EKeystate s )
}
// start chat
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
}
void start_gesture( EKeystate s )
{
if (LLAppViewer::instance()->quitRequested())
{
return; // can't talk, gotta go, kthxbye!
}
LLUICtrl* focus_ctrlp = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (KEYSTATE_UP == s &&
! (focus_ctrlp && focus_ctrlp->acceptsTextInput()))
{
if (gChatBar->getCurrentChat().empty())
if (gChatBar && gChatBar->getCurrentChat().empty())
{
// No existing chat in chat editor, insert '/'
gChatBar->startChat("/");
LLChatBar::startChat("/");
}
else
{
// Don't overwrite existing text in chat editor
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
}
}
}

View File

@@ -2946,7 +2946,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
{
// passing NULL here, character will be added later when it is handled by character handler.
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
return TRUE;
}
}
@@ -3548,7 +3548,7 @@ void LLViewerWindow::updateLayout()
&& gFocusMgr.getKeyboardFocus() == NULL
&& gChatBar->isInVisibleChain())
{
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
}
}