diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-04-03 21:15:57 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-04-04 08:31:01 +0300 | 
| commit | f795ad6d6298a5a2e13a9cf9117f9c1d39475a4f (patch) | |
| tree | adaa8d1b8d3a5ea8cafafe03bf71ef3af4ec960e /indra | |
| parent | f2e7e30cffca1de0a1ee9287753156f8a312b7dd (diff) | |
#3870 Crash at LLVOAvatarSelf::getJoint()
A long standing one
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llvoavatar.h | 2 | ||||
| -rw-r--r-- | indra/newview/llvoavatarself.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llvoavatarself.h | 4 | 
3 files changed, 14 insertions, 1 deletions
| diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 263c3dadf6..a2232d21a2 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -547,7 +547,7 @@ public:      U32         renderTransparent(bool first_pass);      void        renderCollisionVolumes();      void        renderBones(const std::string &selected_joint = std::string()); -    void        renderJoints(); +    virtual void renderJoints();      static void deleteCachedImages(bool clearAll=true);      static void destroyGL();      static void restoreGL(); 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)  { diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 051ac791c0..f9bea41b1d 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -92,6 +92,8 @@ public:      /*virtual*/ void        requestStopMotion(LLMotion* motion);      /*virtual*/ LLJoint*    getJoint(const std::string &name); +    /*virtual*/ void renderJoints(); +      /*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);      /*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight);      /*virtual*/ bool setVisualParamWeight(S32 index, F32 weight); @@ -103,6 +105,8 @@ private:      // helper function. Passed in param is assumed to be in avatar's parameter list.      bool setParamWeight(const LLViewerVisualParam *param, F32 weight); +    std::mutex          mJointMapMutex; // getJoint gets used from mesh thread +  /********************************************************************************   **                                                                            **   **                    STATE | 
