iOS Simulator: SIGSEGV in -[RiveFactory decodeImage:] when a RiveView with referenced image assets mounts again after the last RiveView unmounted

Đang mở
#449 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
43/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Start by tracing RiveReactNativeView.processAssetBytes, RiveFactory.decodeImage:, and RenderContextManager to understand how render contexts are retained across view unmounts. Reproduce the issue with the reported two-asset mount and unmount sequence in the iOS Simulator. Done when repeated remounts no longer crash while processing referenced image assets.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Versions: rive-react-native 9.8.6 (RiveRuntime 6.24.0), React Native 0.87, iOS Simulator on an Apple-silicon Mac. Not reproduced on a physical iPhone.

What happens: the app crashes natively (SIGSEGV) in -[RiveFactory decodeImage:], called from RiveReactNativeView.processAssetBytes, when a RiveView that supplies images through referencedAssets mounts again after every RiveView had been unmounted. The first mount always works.

Steps

  1. Render a RiveView for a .riv with two referenced image assets, supplied as URLs via referencedAssets.
  2. Unmount it so no RiveView is alive.
  3. Mount a new RiveView for the same file and assets.
  4. The app crashes while the asset bytes are processed. Intermittent: 4 of 5 automated runs.

What we think happens: RenderContextManager keeps its render contexts weakly ("when no more RiveRenderViews require these, they can be freed"), and RiveFactory holds a raw rive::Factory*. After the last view unmounts the context is freed, and decoding assets for the new view dereferences it.

Tried: decoding on the main thread (same crash, now on the main thread); dropping stale loads with a generation token (still crashes); holding a RiveFile reference (not reliable). RenderContextManager.shared().newDefaultContext() isn't callable from Swift because RenderContext is only forward-declared.

Ngôn ngữ chính
TypeScript
Star
789
Fork
81
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rive-app/rive-react-native

Tất cả issue của rive-app/rive-react-native

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.