From f795ad6d6298a5a2e13a9cf9117f9c1d39475a4f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 3 Apr 2025 21:15:57 +0300 Subject: #3870 Crash at LLVOAvatarSelf::getJoint() A long standing one --- indra/newview/llvoavatarself.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 746ef7cacb..f23af5afa4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -697,6 +697,7 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time) // virtual LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) { + std::lock_guard lock(mJointMapMutex); LLJoint *jointp = NULL; jointp = LLVOAvatar::getJoint(name); if (!jointp && mScreenp) @@ -714,6 +715,14 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return jointp; } + +//virtual +void LLVOAvatarSelf::renderJoints() +{ + std::lock_guard lock(mJointMapMutex); + LLVOAvatar::renderJoints(); +} + // virtual bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight) { -- cgit v1.2.3 From 87b6428f5537238c970cabbc30e057914935a50c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 21 Apr 2025 16:59:29 +0300 Subject: #3870 Added joint initialization for LLVOAvatarSelf Sometimes mesh thread crashes when allocating joints --- indra/newview/llvoavatarself.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index f23af5afa4..90ff4067f2 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -225,6 +225,8 @@ void LLVOAvatarSelf::initInstance() doPeriodically(update_avatar_rez_metrics, 5.0); doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0); + initAllJoints(); // mesh thread uses LLVOAvatarSelf as a joint source + mInitFlags |= 1<<2; } -- cgit v1.2.3