Merge branch 'DRTVWR-544-maint' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2022-06-29 21:57:31 +02:00
commit 9300613edc
16 changed files with 113 additions and 67 deletions

View File

@ -886,9 +886,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>2653c3627fd8687ff9e003425fd14834</string> <string>012aaadd1c40d430866bebda2e60bfae</string>
<key>url</key> <key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90199/821852/dullahan-1.12.3.202111032211_91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-565428.tar.bz2</string> <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/100136/882323/dullahan-1.12.3.202205202122_91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-572002.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>darwin64</string> <string>darwin64</string>
@ -898,9 +898,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>b4003772562a5dd40bc112eec7cba5f5</string> <string>ff1c56b7a28c689442f6439421bb32f5</string>
<key>url</key> <key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90201/821871/dullahan-1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-565428.tar.bz2</string> <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/100149/882391/dullahan-1.12.3.202205202205_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-572002.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
@ -910,9 +910,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>d9030d7a7390b3bda7de2adcc27e535a</string> <string>bbfe23d7f211865b81b291884949a887</string>
<key>url</key> <key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90200/821876/dullahan-1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-565428.tar.bz2</string> <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/100148/882385/dullahan-1.12.3.202205202202_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-572002.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows64</string> <string>windows64</string>
@ -931,7 +931,7 @@
</map> </map>
</map> </map>
<key>version</key> <key>version</key>
<string>1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114</string> <string>1.12.3.202205202205_91.1.21_g9dd45fe_chromium-91.0.4472.114</string>
</map> </map>
<key>expat</key> <key>expat</key>
<map> <map>

View File

@ -289,7 +289,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
{ {
// The source is done playing, clean it up. // The source is done playing, clean it up.
delete sourcep; delete sourcep;
mAllSources.erase(iter++); iter = mAllSources.erase(iter);
continue; continue;
} }

View File

@ -543,7 +543,7 @@ bool LLStreamingAudio_FMODSTUDIO::releaseDeadStreams()
{ {
LL_INFOS() << "Closed dead stream" << LL_ENDL; LL_INFOS() << "Closed dead stream" << LL_ENDL;
delete streamp; delete streamp;
mDeadStreams.erase(iter++); iter = mDeadStreams.erase(iter);
} }
else else
{ {

View File

@ -1027,7 +1027,7 @@ void LLPluginProcessParent::poll(F64 timeout)
while (itClean != sInstances.end()) while (itClean != sInstances.end())
{ {
if ((*itClean).second->isDone()) if ((*itClean).second->isDone())
sInstances.erase(itClean++); itClean = sInstances.erase(itClean);
else else
++itClean; ++itClean;
} }

View File

@ -1546,28 +1546,6 @@ LLSD LLMeshSkinInfo::asLLSD(bool include_joints, bool lock_scale_if_joint_positi
return ret; return ret;
} }
U32 LLMeshSkinInfo::sizeBytes() const
{
U32 res = sizeof(LLUUID); // mMeshID
res += sizeof(std::vector<std::string>) + sizeof(std::string) * mJointNames.size();
for (U32 i = 0; i < mJointNames.size(); ++i)
{
// <FS> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
//res += mJointNames[i].size(); // actual size, not capacity
res += mJointNames[i].mName.size(); // actual size, not capacity
// </FS>
}
res += sizeof(std::vector<S32>) + sizeof(S32) * mJointNums.size();
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * mInvBindMatrix.size();
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * mAlternateBindMatrix.size();
res += 16 * sizeof(float); //mBindShapeMatrix
res += sizeof(float) + 3 * sizeof(bool);
return res;
}
void LLMeshSkinInfo::updateHash() void LLMeshSkinInfo::updateHash()
{ {
// get hash of data relevant to render batches // get hash of data relevant to render batches
@ -1602,6 +1580,28 @@ void LLMeshSkinInfo::updateHash()
mHash = digest[0]; mHash = digest[0];
} }
U32 LLMeshSkinInfo::sizeBytes() const
{
U32 res = sizeof(LLUUID); // mMeshID
res += sizeof(std::vector<std::string>) + sizeof(std::string) * mJointNames.size();
for (U32 i = 0; i < mJointNames.size(); ++i)
{
// <FS> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
//res += mJointNames[i].size(); // actual size, not capacity
res += mJointNames[i].mName.size(); // actual size, not capacity
// </FS>
}
res += sizeof(std::vector<S32>) + sizeof(S32) * mJointNums.size();
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * mInvBindMatrix.size();
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * mAlternateBindMatrix.size();
res += 16 * sizeof(float); //mBindShapeMatrix
res += sizeof(float) + 3 * sizeof(bool);
return res;
}
LLModel::Decomposition::Decomposition(LLSD& data) LLModel::Decomposition::Decomposition(LLSD& data)
{ {
fromLLSD(data); fromLLSD(data);

View File

@ -51,8 +51,8 @@ public:
LLMeshSkinInfo(LLSD& data); LLMeshSkinInfo(LLSD& data);
void fromLLSD(LLSD& data); void fromLLSD(LLSD& data);
LLSD asLLSD(bool include_joints, bool lock_scale_if_joint_position) const; LLSD asLLSD(bool include_joints, bool lock_scale_if_joint_position) const;
U32 sizeBytes() const;
void updateHash(); void updateHash();
U32 sizeBytes() const;
LLUUID mMeshID; LLUUID mMeshID;
//<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup //<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup

View File

@ -829,17 +829,13 @@ void LLFloater::closeFloater(bool app_quitting)
for(handle_set_iter_t dependent_it = mDependents.begin(); for(handle_set_iter_t dependent_it = mDependents.begin();
dependent_it != mDependents.end(); ) dependent_it != mDependents.end(); )
{ {
LLFloater* floaterp = dependent_it->get(); LLFloater* floaterp = dependent_it->get();
if (floaterp) dependent_it = mDependents.erase(dependent_it);
{ if (floaterp)
++dependent_it; {
floaterp->closeFloater(app_quitting); floaterp->mDependeeHandle = LLHandle<LLFloater>();
} floaterp->closeFloater(app_quitting);
else }
{
mDependents.erase(dependent_it++);
}
} }
cleanupHandles(); cleanupHandles();
@ -1527,7 +1523,7 @@ void LLFloater::cleanupHandles()
LLFloater* floaterp = dependent_it->get(); LLFloater* floaterp = dependent_it->get();
if (!floaterp) if (!floaterp)
{ {
mDependents.erase(dependent_it++); dependent_it = mDependents.erase(dependent_it);
} }
else else
{ {

View File

@ -34,6 +34,7 @@
#include "llplugininstance.h" #include "llplugininstance.h"
#include "llpluginmessage.h" #include "llpluginmessage.h"
#include "llpluginmessageclasses.h" #include "llpluginmessageclasses.h"
#include "llstring.h"
#include "volume_catcher.h" #include "volume_catcher.h"
#include "media_plugin_base.h" #include "media_plugin_base.h"
@ -617,9 +618,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
// dir as the executable that loaded it (SLPlugin.exe). The code in // dir as the executable that loaded it (SLPlugin.exe). The code in
// Dullahan that tried to figure out the location automatically uses // Dullahan that tried to figure out the location automatically uses
// the location of the exe which isn't helpful so we tell it explicitly. // the location of the exe which isn't helpful so we tell it explicitly.
char cur_dir_str[MAX_PATH]; std::vector<wchar_t> buffer(MAX_PATH + 1);
GetCurrentDirectoryA(MAX_PATH, cur_dir_str); GetCurrentDirectoryW(MAX_PATH, &buffer[0]);
settings.host_process_path = std::string(cur_dir_str); settings.host_process_path = ll_convert_wide_to_string(&buffer[0]);
#endif #endif
settings.accept_language_list = mHostLanguage; settings.accept_language_list = mHostLanguage;

View File

@ -1707,14 +1707,13 @@ bool LLAppViewer::doFrame()
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df mainloop" ) LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df mainloop" )
// canonical per-frame event // canonical per-frame event
mainloop.post(newFrame); mainloop.post(newFrame);
// if one of our coroutines threw an uncaught exception, rethrow it now
LLCoros::instance().rethrow();
} }
{ {
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df suspend" ) LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df suspend" )
// give listeners a chance to run // give listeners a chance to run
llcoro::suspend(); llcoro::suspend();
// if one of our coroutines threw an uncaught exception, rethrow it now
LLCoros::instance().rethrow();
} }
}// <FS:Beq> ensure we have the entire top scope of frame covered (close input event and coro "idle") }// <FS:Beq> ensure we have the entire top scope of frame covered (close input event and coro "idle")
@ -6488,6 +6487,14 @@ void LLAppViewer::forceErrorDriverCrash()
glDeleteTextures(1, NULL); glDeleteTextures(1, NULL);
} }
// <FS:Ansariel> Wrongly merged back in by LL
//void LLAppViewer::forceErrorCoroutineCrash()
//{
// LL_WARNS() << "Forcing a crash in LLCoros" << LL_ENDL;
// LLCoros::instance().launch("LLAppViewer::crashyCoro", [] {throw LLException("A deliberate crash from LLCoros"); });
//}
// </FS:Ansariel>
void LLAppViewer::forceErrorThreadCrash() void LLAppViewer::forceErrorThreadCrash()
{ {
class LLCrashTestThread : public LLThread class LLCrashTestThread : public LLThread

View File

@ -151,15 +151,17 @@ public:
void removeMarkerFiles(); void removeMarkerFiles();
void removeDumpDir(); void removeDumpDir();
// LLAppViewer testing helpers. // LLAppViewer testing helpers.
// *NOTE: These will potentially crash the viewer. Only for debugging. // *NOTE: These will potentially crash the viewer. Only for debugging.
virtual void forceErrorLLError(); virtual void forceErrorLLError();
virtual void forceErrorBreakpoint(); virtual void forceErrorBreakpoint();
virtual void forceErrorBadMemoryAccess(); virtual void forceErrorBadMemoryAccess();
virtual void forceErrorInfiniteLoop(); virtual void forceErrorInfiniteLoop();
virtual void forceErrorSoftwareException(); virtual void forceErrorSoftwareException();
virtual void forceErrorDriverCrash(); virtual void forceErrorDriverCrash();
virtual void forceErrorThreadCrash(); // <FS:Ansariel> Wrongly merged back in by LL
//virtual void forceErrorCoroutineCrash();
virtual void forceErrorThreadCrash();
// The list is found in app_settings/settings_files.xml // The list is found in app_settings/settings_files.xml
// but since they are used explicitly in code, // but since they are used explicitly in code,

View File

@ -60,10 +60,10 @@ public:
const size_t parts = tokens.size(); const size_t parts = tokens.size();
// get the (optional) category for the search // get the (optional) category for the search
std::string category; std::string collection;
if (parts > 0) if (parts > 0)
{ {
category = tokens[0].asString(); collection = tokens[0].asString();
} }
// get the (optional) search string // get the (optional) search string
@ -75,7 +75,7 @@ public:
// create the LLSD arguments for the search floater // create the LLSD arguments for the search floater
LLFloaterSearch::Params p; LLFloaterSearch::Params p;
p.search.category = category; p.search.collection = collection;
p.search.query = LLURI::unescape(search_text); p.search.query = LLURI::unescape(search_text);
// open the search floater and perform the requested search // open the search floater and perform the requested search

View File

@ -154,8 +154,7 @@ void mark_dead_and_remove_if(T &c, const PredicateMatchRequest &matchPred)
if (matchPred(*it)) if (matchPred(*it))
{ {
(*it)->markDead(); (*it)->markDead();
// *TDOO: When C++11 is in change the following line to: it = c.erase(it); it = c.erase(it);
c.erase(it++);
} }
else else
{ {

View File

@ -3261,7 +3261,7 @@ bool LLViewerMediaImpl::isForcedUnloaded() const
} }
// If this media's class is not supposed to be shown, unload // If this media's class is not supposed to be shown, unload
if (!shouldShowBasedOnClass()) if (!shouldShowBasedOnClass() || isObscured())
{ {
return true; return true;
} }
@ -3946,6 +3946,26 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
} }
} }
//////////////////////////////////////////////////////////////////////////////////////////
//
bool LLViewerMediaImpl::isObscured() const
{
if (getUsedInUI() || isParcelMedia()) return false;
LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (!agent_parcel)
{
return false;
}
if (agent_parcel->getObscureMOAP() && !isInAgentParcel())
{
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
// //
bool LLViewerMediaImpl::isAttachedToAnotherAvatar() const bool LLViewerMediaImpl::isAttachedToAnotherAvatar() const

View File

@ -423,6 +423,7 @@ public:
private: private:
bool isAutoPlayable() const; bool isAutoPlayable() const;
bool shouldShowBasedOnClass() const; bool shouldShowBasedOnClass() const;
bool isObscured() const;
static bool isObjectAttachedToAnotherAvatar(LLVOVolume *obj); static bool isObjectAttachedToAnotherAvatar(LLVOVolume *obj);
static bool isObjectInAgentParcel(LLVOVolume *obj); static bool isObjectInAgentParcel(LLVOVolume *obj);

View File

@ -2790,6 +2790,17 @@ class LLAdvancedForceErrorDriverCrash : public view_listener_t
} }
}; };
// <FS:Ansariel> Wrongly merged back in by LL
//class LLAdvancedForceErrorCoroutineCrash : public view_listener_t
//{
// bool handleEvent(const LLSD& userdata)
// {
// force_error_coroutine_crash(NULL);
// return true;
// }
//};
// </FS:Ansariel>
class LLAdvancedForceErrorThreadCrash : public view_listener_t class LLAdvancedForceErrorThreadCrash : public view_listener_t
{ {
bool handleEvent(const LLSD& userdata) bool handleEvent(const LLSD& userdata)
@ -10565,6 +10576,13 @@ void force_error_driver_crash(void *)
LLAppViewer::instance()->forceErrorDriverCrash(); LLAppViewer::instance()->forceErrorDriverCrash();
} }
// <FS:Ansariel> Wrongly merged back in by LL
//void force_error_coroutine_crash(void *)
//{
// LLAppViewer::instance()->forceErrorCoroutineCrash();
//}
// </FS:Ansariel>
void force_error_thread_crash(void *) void force_error_thread_crash(void *)
{ {
LLAppViewer::instance()->forceErrorThreadCrash(); LLAppViewer::instance()->forceErrorThreadCrash();
@ -12174,6 +12192,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException"); view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException");
view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareExceptionCoro(), "Advanced.ForceErrorSoftwareExceptionCoro"); view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareExceptionCoro(), "Advanced.ForceErrorSoftwareExceptionCoro");
view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash"); view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash");
// <FS:Ansariel> Wrongly merged back in by LL
//view_listener_t::addMenu(new LLAdvancedForceErrorCoroutineCrash(), "Advanced.ForceErrorCoroutineCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorThreadCrash(), "Advanced.ForceErrorThreadCrash"); view_listener_t::addMenu(new LLAdvancedForceErrorThreadCrash(), "Advanced.ForceErrorThreadCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer"); view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer");

View File

@ -4940,7 +4940,7 @@ void LLVivoxVoiceClient::sessionState::VerifySessions()
if ((*it).expired()) if ((*it).expired())
{ {
LL_WARNS("Voice") << "Expired session found! removing" << LL_ENDL; LL_WARNS("Voice") << "Expired session found! removing" << LL_ENDL;
mSession.erase(it++); it = mSession.erase(it);
} }
else else
++it; ++it;
@ -7015,7 +7015,7 @@ void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id)
if (list_iter->second == id) if (list_iter->second == id)
{ {
LL_DEBUGS("VoiceFont") << "Removing " << id << " from the voice font list." << LL_ENDL; LL_DEBUGS("VoiceFont") << "Removing " << id << " from the voice font list." << LL_ENDL;
mVoiceFontList.erase(list_iter++); list_iter = mVoiceFontList.erase(list_iter);
mVoiceFontListDirty = true; mVoiceFontListDirty = true;
} }
else else