Merge branch 'release/2025.03' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/newview/llappviewer.h
#	indra/newview/llpanelprofilepicks.cpp
#	indra/newview/llviewermenu.cpp
master
Ansariel 2025-02-26 10:15:24 +01:00
commit bbcfa66f23
10 changed files with 150 additions and 7 deletions

View File

@ -1 +1 @@
7.1.12
7.1.13

View File

@ -6557,6 +6557,27 @@ void LLAppViewer::forceErrorDriverCrash()
//}
// </FS:Ansariel>
void LLAppViewer::forceErrorCoroprocedureCrash()
{
LL_WARNS() << "Forcing a crash in LLCoprocedureManager" << LL_ENDL;
LLCoprocedureManager::instance().enqueueCoprocedure("Upload", "DeliberateCrash",
[](LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t&, const LLUUID&)
{
LL_WARNS() << "Forcing a deliberate bad memory access from LLCoprocedureManager" << LL_ENDL;
S32* crash = NULL;
*crash = 0xDEADBEEF;
});
}
void LLAppViewer::forceErrorWorkQueueCrash()
{
LL::WorkQueue::ptr_t workqueue = LL::WorkQueue::getInstance("General");
if (workqueue)
{
workqueue->post([]() { throw LLException("This is a deliberate crash from General Queue"); });
}
}
void LLAppViewer::forceErrorThreadCrash()
{
class LLCrashTestThread : public LLThread

View File

@ -173,6 +173,8 @@ public:
virtual void forceErrorDriverCrash();
// <FS:Ansariel> Wrongly merged back in by LL
//virtual void forceErrorCoroutineCrash();
virtual void forceErrorCoroprocedureCrash();
virtual void forceErrorWorkQueueCrash();
virtual void forceErrorThreadCrash();
// The list is found in app_settings/settings_files.xml

View File

@ -783,6 +783,7 @@ void LLAvatarPropertiesProcessor::sendClassifiedInfoUpdate(const LLAvatarClassif
void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id)
{
LL_DEBUGS("PickInfo") << " Requiesting pick info for " << pick_id << LL_ENDL;
// Must ask for a pick based on the creator id because
// the pick database is distributed to the inventory cluster. JC
std::vector<std::string> request_params{ creator_id.asString(), pick_id.asString() };

View File

@ -57,6 +57,8 @@
static LLPanelInjector<LLPanelProfilePicks> t_panel_profile_picks("panel_profile_picks");
static LLPanelInjector<LLPanelProfilePick> t_panel_profile_pick("panel_profile_pick");
static const F32 REQUEST_TIMOUT = 60;
static const F32 LOCATION_CACHE_TIMOUT = 900;
class LLPickHandler : public LLCommandHandler
{
@ -339,6 +341,7 @@ void LLPanelProfilePicks::processProperties(void* data, EAvatarProcessorType typ
void LLPanelProfilePicks::processProperties(const LLAvatarData* avatar_picks)
{
LL_DEBUGS("PickInfo") << "Processing picks for avatar " << getAvatarId() << LL_ENDL;
LLUUID selected_id = mPickToSelectOnLoad;
bool has_selection = false;
if (mPickToSelectOnLoad.isNull())
@ -353,6 +356,25 @@ void LLPanelProfilePicks::processProperties(const LLAvatarData* avatar_picks)
}
}
// Avoid pointlesly requesting parcel data,
// store previous values
std::map<LLUUID, std::string> parcelid_location_map;
std::map<LLUUID, LLUUID> pickid_parcelid_map;
for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx)
{
LLPanelProfilePick* pick_panel = dynamic_cast<LLPanelProfilePick*>(mTabContainer->getPanelByIndex(tab_idx));
if (pick_panel && pick_panel->getPickId().notNull())
{
std::string location = pick_panel->getPickLocation();
if (!location.empty())
{
parcelid_location_map[pick_panel->getParcelID()] = pick_panel->getPickLocation();
pickid_parcelid_map[pick_panel->getPickId()] = pick_panel->getParcelID();
}
}
}
mTabContainer->deleteAllTabs();
LLAvatarData::picks_list_t::const_iterator it = avatar_picks->picks_list.begin();
@ -367,6 +389,15 @@ void LLPanelProfilePicks::processProperties(const LLAvatarData* avatar_picks)
pick_panel->setPickName(pick_name);
pick_panel->setAvatarId(getAvatarId());
std::map<LLUUID, LLUUID>::const_iterator found_pick = pickid_parcelid_map.find(pick_id);
if (found_pick != pickid_parcelid_map.end())
{
std::map<LLUUID, std::string>::const_iterator found = parcelid_location_map.find(found_pick->second);
if (found != parcelid_location_map.end() && !found->second.empty())
{
pick_panel->setPickLocation(found_pick->second, found->second);
}
}
mTabContainer->addTabPanel(
LLTabContainer::TabPanelParams().
panel(pick_panel).
@ -386,6 +417,11 @@ void LLPanelProfilePicks::processProperties(const LLAvatarData* avatar_picks)
LLPanelProfilePick* pick_panel = LLPanelProfilePick::create();
pick_panel->setAvatarId(getAvatarId());
std::map<LLUUID, std::string>::const_iterator found = parcelid_location_map.find(data.parcel_id);
if (found != parcelid_location_map.end() && !found->second.empty())
{
pick_panel->setPickLocation(data.parcel_id, found->second);
}
pick_panel->processProperties(&data);
mTabContainer->addTabPanel(
LLTabContainer::TabPanelParams().
@ -711,12 +747,17 @@ void LLPanelProfilePick::processProperties(void* data, EAvatarProcessorType type
void LLPanelProfilePick::processProperties(const LLPickData* pick_info)
{
LL_DEBUGS("PickInfo") << "Processing properties for pick " << mPickId << LL_ENDL;
mIsEditing = false;
// <AS:Chanayane> Fix FIRE-35185 (disables link rendering while editing picks or 1st life)
//mPickDescription->setParseHTML(true);
mPickDescription->setParseHTML(!getSelfProfile());
// </AS:Chanayane>
mParcelId = pick_info->parcel_id;
if (mParcelId != pick_info->parcel_id)
{
mParcelId = pick_info->parcel_id;
mPickLocationStr.clear();
}
setSnapshotId(pick_info->snapshot_id);
if (!getSelfProfile())
{
@ -726,8 +767,11 @@ void LLPanelProfilePick::processProperties(const LLPickData* pick_info)
setPickDesc(pick_info->desc);
setPosGlobal(pick_info->pos_global);
// Send remote parcel info request to get parcel name and sim (region) name.
sendParcelInfoRequest();
if (mPickLocationStr.empty() || mLastRequestTimer.getElapsedTimeF32() > LOCATION_CACHE_TIMOUT)
{
// Send remote parcel info request to get parcel name and sim (region) name.
sendParcelInfoRequest();
}
// *NOTE dzaporozhan
// We want to keep listening to APT_PICK_INFO because user may
@ -767,6 +811,12 @@ void LLPanelProfilePick::setPickDesc(const std::string& desc)
mPickDescription->setValue(desc);
}
void LLPanelProfilePick::setPickLocation(const LLUUID &parcel_id, const std::string& location)
{
setParcelID(parcel_id); // resets mPickLocationStr
setPickLocation(location);
}
// <AS:Chanayane> Preview button
void LLPanelProfilePick::reparseDescription(const std::string& desc)
{
@ -777,6 +827,8 @@ void LLPanelProfilePick::reparseDescription(const std::string& desc)
void LLPanelProfilePick::setPickLocation(const std::string& location)
{
getChild<LLUICtrl>("pick_location")->setValue(location);
mPickLocationStr = location;
mLastRequestTimer.reset();
}
void LLPanelProfilePick::onClickMap()
@ -929,16 +981,19 @@ std::string LLPanelProfilePick::getLocationNotice()
void LLPanelProfilePick::sendParcelInfoRequest()
{
if (mParcelId != mRequestedId)
if (mParcelId != mRequestedId || mLastRequestTimer.getElapsedTimeF32() > REQUEST_TIMOUT)
{
if (mRequestedId.notNull())
{
LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mRequestedId, this);
}
LL_DEBUGS("PickInfo") << "Sending parcel request " << mParcelId << " for pick " << mPickId << LL_ENDL;
LLRemoteParcelInfoProcessor::getInstance()->addObserver(mParcelId, this);
LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(mParcelId);
mRequestedId = mParcelId;
mLastRequestTimer.reset();
mPickLocationStr.clear();
}
}
@ -955,6 +1010,20 @@ void LLPanelProfilePick::processParcelInfo(const LLParcelData& parcel_data)
}
}
void LLPanelProfilePick::setParcelID(const LLUUID& parcel_id)
{
if (mParcelId != parcel_id)
{
mParcelId = parcel_id;
mPickLocationStr.clear();
}
if (mRequestedId.notNull() && mRequestedId != parcel_id)
{
LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mRequestedId, this);
mRequestedId.setNull();
}
}
// <FS:Ansariel> Keep set location button
void LLPanelProfilePick::addLocationChangedCallbacks()
{

View File

@ -124,6 +124,8 @@ public:
virtual void setPickName(const std::string& name);
const std::string getPickName();
virtual void setPickLocation(const LLUUID& parcel_id, const std::string& location);
std::string getPickLocation() { return mPickLocationStr; };
void processProperties(void* data, EAvatarProcessorType type) override;
void processProperties(const LLPickData* pick_data);
@ -142,7 +144,8 @@ public:
//This stuff we got from LLRemoteParcelObserver, in the last one we intentionally do nothing
void processParcelInfo(const LLParcelData& parcel_data) override;
void setParcelID(const LLUUID& parcel_id) override { mParcelId = parcel_id; }
void setParcelID(const LLUUID& parcel_id) override;
LLUUID getParcelID() const { return mParcelId; }
void setErrorStatus(S32 status, const std::string& reason) override {};
void addLocationChangedCallbacks(); // <FS:Ansariel> Keep set location button
@ -258,6 +261,8 @@ protected:
LLUUID mPickId;
LLUUID mRequestedId;
std::string mPickNameStr;
std::string mPickLocationStr;
LLTimer mLastRequestTimer;
boost::signals2::connection mRegionCallbackConnection;
boost::signals2::connection mParcelCallbackConnection;

View File

@ -81,7 +81,6 @@ public:
protected:
LLTimer mMouseDownTimer; // timer for how long mouse has been held down on a hint.
F32 mLastHeldTime;
bool mAllowModify;
LLButton* mLessBtn;
LLButton* mMoreBtn;

View File

@ -349,6 +349,8 @@ void force_error_software_exception();
void force_error_os_exception();
void force_error_driver_crash();
void force_error_coroutine_crash();
void force_error_coroprocedure_crash();
void force_error_work_queue_crash();
void force_error_thread_crash();
void handle_force_delete();
@ -2955,6 +2957,24 @@ class LLAdvancedForceErrorDriverCrash : public view_listener_t
//};
// </FS:Ansariel>
class LLAdvancedForceErrorCoroprocedureCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
force_error_coroprocedure_crash();
return true;
}
};
class LLAdvancedForceErrorWorkQueueCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
force_error_work_queue_crash();
return true;
}
};
class LLAdvancedForceErrorThreadCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@ -11039,6 +11059,16 @@ void force_error_driver_crash()
//}
// </FS:Ansariel>
void force_error_coroprocedure_crash()
{
LLAppViewer::instance()->forceErrorCoroprocedureCrash();
}
void force_error_work_queue_crash()
{
LLAppViewer::instance()->forceErrorWorkQueueCrash();
}
void force_error_thread_crash()
{
LLAppViewer::instance()->forceErrorThreadCrash();
@ -12757,6 +12787,8 @@ void initialize_menus()
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 LLAdvancedForceErrorCoroprocedureCrash(), "Advanced.ForceErrorCoroprocedureCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorWorkQueueCrash(), "Advanced.ForceErrorWorkQueueCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorThreadCrash(), "Advanced.ForceErrorThreadCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer");

View File

@ -471,6 +471,8 @@
<menu_item_call label="Treiber-Absturz erzwingen" name="Force Driver Carsh"/>
<menu_item_call label="Softwareausnahme erzwingen" name="Force Software Exception"/>
<menu_item_call label="Softwareausnahme in Coroutine erzwingen" name="Force Software Exception in Coroutine"/>
<menu_item_call label="Absturz in Coprocedure erzwingen" name="Force a Crash in a Coroprocedure"/>
<menu_item_call label="Absturz in Work Queue erzwingen" name="Force a Crash in a Work Queue"/>
<menu_item_call label="Absturz in Thread erzwingen" name="Force a Crash in a Thread"/>
<menu_item_call label="Verbindungsabbruch erzwingen" name="Force Disconnect Viewer"/>
<menu_item_call label="Speicherverlust simulieren" name="Memory Leaking Simulation"/>

View File

@ -4135,6 +4135,18 @@
<menu_item_call.on_click
function="Advanced.ForceErrorSoftwareExceptionCoro" />
</menu_item_call>
<menu_item_call
label="Force a Crash in a Coroprocedure"
name="Force a Crash in a Coroprocedure">
<menu_item_call.on_click
function="Advanced.ForceErrorCoroprocedureCrash" />
</menu_item_call>
<menu_item_call
label="Force a Crash in a Work Queue"
name="Force a Crash in a Work Queue">
<menu_item_call.on_click
function="Advanced.ForceErrorWorkQueueCrash" />
</menu_item_call>
<menu_item_call
label="Force a Crash in a Thread"
name="Force a Crash in a Thread">