From: Eunki, Hong Date: Fri, 10 Jan 2025 04:20:37 +0000 (+0900) Subject: Do not use bitfield for thread sensitive values X-Git-Tag: accepted/tizen/unified/20250115.005102~2^2~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F317937%2F2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Do not use bitfield for thread sensitive values Their was some mysterious bugs occured on real world application. if(needRasterize) { mNeedToSleep = false; } DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "VECTOR_ANIMATION_THREAD_COMPLETED_TASK", [&](std::ostringstream& oss) { oss << "[w:" << mWorkingTasks.size() << ",c:" << mCompletedTasks.size() << ",r?" << needRasterize << ",s?" << mNeedToSleep << "]"; }); For like this code, we got r?1,s?1 logs. mean, mNeedToSleep become true even if needRasterize is true. mForceRenderOnce = true; DALI_LOG_DEBUG_INFO("VectorAnimationThread::mEventTrigger Triggered!\n"); The mForceRenderOnce value didn't depend on mConditionalWait, the race condition might occured. To avoid this kind of issue, let we seperate memory area for each values if they are thread sensitive. Change-Id: Ie45d0c273ad318c46baf72a1c8462792a35460ad Signed-off-by: Eunki, Hong --- diff --git a/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-thread.h b/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-thread.h index ff08c6dd17..6f9b165033 100644 --- a/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-thread.h +++ b/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-thread.h @@ -183,8 +183,8 @@ private: const Dali::LogFactoryInterface& mLogFactory; const Dali::TraceFactoryInterface& mTraceFactory; - bool mNeedToSleep : 1; - bool mDestroyThread : 1; + bool mNeedToSleep; + bool mDestroyThread; }; private: @@ -215,9 +215,9 @@ private: const Dali::TraceFactoryInterface& mTraceFactory; Dali::AsyncTaskManager mAsyncTaskManager; - bool mNeedToSleep : 1; - bool mDestroyThread : 1; - bool mForceRenderOnce : 1; + bool mNeedToSleep; + bool mDestroyThread; + bool mForceRenderOnce; }; } // namespace Internal