Overview:
Hi , So I downloaded a .lottie animation of a waving pirate flag (link is below) , I am using it on a component in a screen for my iOS only app , The animation worked flawlessly but then I started switching screens , upon rapidly switching between screens from the bottomNav the app started to crash and the CrashLogs showed that DotLottiePlayer was the culprit , Upon some digging I found that it might be DotLottiePlayer renderer issue so I switched to renderer="sw” , that didn’t solve anything either . I tried freeze() , pause() , stop() everything , I even added a Focus variable that would render the DotLottie file only when screen is in Focus But nothing solved the issue , as opposed some changes made it worse , then I gave up and used LottieView instead but that same animation file in .json looks like a jumping skull on a black box than an animation .
Steps To Recreate:
- Install @lottiefiles/dotlottie-react-native.
- Add a .lottie file to src/assets/animations/ (e.g., piratesFlag.lottie).
- Import the DotLottie component in a React Native screen.
- Attempt to render the animation as follows:tsx
<DotLottie
source={require('../../assets/animations/piratesFlag.lottie')}
autoPlay
loop
style={{ width: '100%', height: '100%' }}
/>
- Navigate to the screen containing the component.
- Result: The app crashes with a native exception or a white screen/hang.Current Rendering Logic (Workaround)
To avoid the crash, we have transitioned back to standard Lottie JSON files:
tsx
import LottieView from 'lottie-react-native';
// ... inside component
<LottieView
source={require('../../assets/animations/piratesFlag.json')}
autoPlay
loop
style={{ width: '100%', height: '100%', transform: [{ scale: 0.77 }] }}
/>
### Potential Root Causes
- Linkage Issues: Static framework linkage (use_frameworks! :linkage => :static) in the Podfile may be causing issues with the DotLottie native module.
- Simulator Compatibility: The experimental nature of iOS 26.2 simulators may have architectural differences that the current DotLottie SDK version does not yet support.
- Resource Parsing: Possible failure in the native layer when decompressing/parsing the .lottie (zipped) format compared to the raw .json format.
Expected Behavior
The .lottie animation should render smoothly without causing a native crash, maintaining the performance benefits of the dotLottie format.
### Crash Log:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 DotLottiePlayer 0x100baec78 ecma_gc_set_object_visited(ecma_object_t*) + 0
1 DotLottiePlayer 0x100bf438c ecma_gc_mark(ecma_object_t*) (.cold.9) + 224
2 DotLottiePlayer 0x100baeab8 ecma_gc_mark(ecma_object_t*) + 284
3 DotLottiePlayer 0x100bae2b0 ecma_gc_run() + 172
4 DotLottiePlayer 0x100badb08 ecma_finalize() + 32
5 DotLottiePlayer 0x100baca78 jerry_cleanup + 36
6 DotLottiePlayer 0x100b4db34 LottieExpressions::retrieve(LottieExpressions*) + 96
7 DotLottiePlayer 0x100b2abb0 LottieLoader::~LottieLoader() + 200
8 DotLottiePlayer 0x100b2acc8 LottieLoader::~LottieLoader() + 12
9 DotLottiePlayer 0x100b5e950 tvg::LoaderMgr::retrieve(tvg::LoadModule*) + 132
10 DotLottiePlayer 0x100b603b0 tvg::PictureImpl::~PictureImpl() + 40
11 DotLottiePlayer 0x100b56814 SceneImpl::clearPaints() + 300
12 DotLottiePlayer 0x100b56fe4 SceneImpl::~SceneImpl() + 40
13 DotLottiePlayer 0x100b56e94 SceneImpl::~SceneImpl() + 12
14 DotLottiePlayer 0x100b5e56c tvg::Paint::unref(bool) + 72
15 DotLottiePlayer 0x100b58f0c tvg::SwCanvas::~SwCanvas() + 68
16 DotLottiePlayer 0x100b58f5c tvg::SwCanvas::~SwCanvas() + 12
17 DotLottiePlayer 0x100b29dfc tvg_canvas_destroy + 24
18 DotLottiePlayer 0x100a677f4
Environment :
"react-native": "0.84.1"
"@lottiefiles/dotlottie-react-native": "^0.9.0"
"node": ">= 22.11.0"
IOS
Simulator:
iPhone 17 Pro iOS 26.2
Machine : M1 MacBook Pro
Overview:
Hi , So I downloaded a .lottie animation of a waving pirate flag (link is below) , I am using it on a component in a screen for my iOS only app , The animation worked flawlessly but then I started switching screens , upon rapidly switching between screens from the bottomNav the app started to crash and the CrashLogs showed that DotLottiePlayer was the culprit , Upon some digging I found that it might be DotLottiePlayer renderer issue so I switched to renderer="sw” , that didn’t solve anything either . I tried freeze() , pause() , stop() everything , I even added a Focus variable that would render the DotLottie file only when screen is in Focus But nothing solved the issue , as opposed some changes made it worse , then I gave up and used LottieView instead but that same animation file in .json looks like a jumping skull on a black box than an animation .
Steps To Recreate:
<DotLottie source={require('../../assets/animations/piratesFlag.lottie')} autoPlay loop style={{ width: '100%', height: '100%' }} />To avoid the crash, we have transitioned back to standard Lottie JSON files:
tsx
### Potential Root Causes
Expected Behavior
The .lottie animation should render smoothly without causing a native crash, maintaining the performance benefits of the dotLottie format.
### Crash Log:
Environment :
"react-native": "0.84.1"
"@lottiefiles/dotlottie-react-native": "^0.9.0"
"node": ">= 22.11.0"
IOS Simulator:
iPhone 17 Pro iOS 26.2
Machine : M1 MacBook Pro