Fix PAGImageView deadlock caused by animator update re-entering mutex#3407
Merged
Fix PAGImageView deadlock caused by animator update re-entering mutex#3407
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3407 +/- ##
==========================================
+ Coverage 78.45% 78.49% +0.03%
==========================================
Files 532 532
Lines 41448 41448
Branches 12486 12486
==========================================
+ Hits 32520 32535 +15
+ Misses 6386 6380 -6
+ Partials 2542 2533 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shlzxjp
reviewed
Apr 27, 2026
| } | ||
| } | ||
| } | ||
| [self handleSizeChangedFromOldSize:oldBounds.size toNewSize:bounds.size]; |
Collaborator
There was a problem hiding this comment.
handleSizeChanged就可以了,优化下函数名
…ViewLock on iOS and OHOS.
515052e to
9202832
Compare
shlzxjp
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 iOS 和 OHOS 平台上 PAGImageView 因 animator update 回调重入 mutex 导致的死锁问题。
在 iOS 端,setBounds/setFrame 方法持有 imageViewLock 后调用 [animator update],而 update 会同步回调 flush 再次尝试获取 imageViewLock,导致同一线程对非递归互斥锁的重入死锁。修复方式是将 [animator update] 调用移到锁作用域之外。
在 OHOS 端,onSurfaceCreated 同样存在持锁调用 _animator->update() 导致 onAnimationUpdate 回调重入 locker 的问题,采用相同策略修复。