Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when using react-native-reanimated animations #478

Open
avega99 opened this issue Jan 10, 2025 · 0 comments
Open

App crashes when using react-native-reanimated animations #478

avega99 opened this issue Jan 10, 2025 · 0 comments

Comments

@avega99
Copy link

avega99 commented Jan 10, 2025

Description

This is the code, just hit the 'continue' button multiple times and the app will crash on both ios and android, it is more frequent on android though.

I couldn't see any logs in the terminal but I could get one in Android Studio and this the error message:

Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7082 (om.miagenda.app), pid 7082 (om.miagenda.app)
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A Cmdline: com.miagenda.app
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A pid: 7082, tid: 7082, name: om.miagenda.app >>> com.miagenda.app <<<
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A #1 pc 00000000000b7c38 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libjsi.so (BuildId: 1fb0acc4d5421d4a)
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A #2 pc 00000000000b6a70 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libjsi.so (google::LogMessage::SendToLog()+920) (BuildId: 1fb0acc4d5421d4a)
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A #3 pc 00000000000b70dc /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libjsi.so (google::LogMessage::Flush()+220) (BuildId: 1fb0acc4d5421d4a)
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A #4 pc 00000000000bb5ec /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libjsi.so (google::LogMessageFatal::~LogMessageFatal()+8) (BuildId: 1fb0acc4d5421d4a)
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A #5 pc 000000000007cc70 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libjsi.so (folly::dynamic::dynamic(folly::dynamic const&)+512) (BuildId: 1fb0acc4d5421d4a)
2025-01-09 22:56:05.318 7184-7184 DEBUG pid-7184 A #6 pc 00000000003ba6c4 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+720) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #7 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #8 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #9 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #10 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #11 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #12 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #13 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #14 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #15 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #16 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #17 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #18 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.319 7184-7184 DEBUG pid-7184 A #19 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #20 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #21 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #22 pc 00000000003ba544 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::shadow::ShadowTreeManager::cloneShadowTree(facebook::react::ShadowNode const&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, folly::dynamic, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, folly::dynamic> > >&, std::__ndk1::unordered_map<facebook::react::ShadowNodeFamily const*, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator >, std::__ndk1::hash<facebook::react::ShadowNodeFamily const*>, std::__ndk1::equal_to<facebook::react::ShadowNodeFamily const*>, std::__ndk1::allocator<std::__ndk1::pair<facebook::react::ShadowNodeFamily const* const, std::__ndk1::unordered_set<int, std::__ndk1::hash, std::__ndk1::equal_to, std::__ndk1::allocator > > > >&)+336) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #23 pc 0000000000314794 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libunistyles.so (margelo::nitro::unistyles::core::UnistylesCommitHook::shadowTreeWillCommit(facebook::react::ShadowTree const&, std::__ndk1::shared_ptr<facebook::react::RootShadowNode const> const&, std::__ndk1::shared_ptrfacebook::react::RootShadowNode const&)+312) (BuildId: 2e9effd33c76467ed679527d324e42f2d42d68d3)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #24 pc 000000000107785c /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::UIManager::shadowTreeWillCommit(facebook::react::ShadowTree const&, std::__ndk1::shared_ptr<facebook::react::RootShadowNode const> const&, std::__ndk1::shared_ptrfacebook::react::RootShadowNode const&) const+216) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #25 pc 0000000000fc1b34 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::ShadowTree::tryCommit(std::__ndk1::function<std::__ndk1::shared_ptrfacebook::react::RootShadowNode (facebook::react::RootShadowNode const&)> const&, facebook::react::ShadowTree::CommitOptions const&) const+720) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #26 pc 0000000000fc17dc /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::ShadowTree::commit(std::__ndk1::function<std::__ndk1::shared_ptrfacebook::react::RootShadowNode (facebook::react::RootShadowNode const&)> const&, facebook::react::ShadowTree::CommitOptions const&) const+96) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #27 pc 000000000020a488 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreanimated.so (BuildId: c3b334a72bd63a7edbe763f526ad706625233caf)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #28 pc 000000000020a3ec /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreanimated.so (BuildId: c3b334a72bd63a7edbe763f526ad706625233caf)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #29 pc 000000000020a33c /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreanimated.so (BuildId: c3b334a72bd63a7edbe763f526ad706625233caf)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #30 pc 000000000020a2e4 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreanimated.so (BuildId: c3b334a72bd63a7edbe763f526ad706625233caf)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #31 pc 00000000002088f0 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreanimated.so (BuildId: c3b334a72bd63a7edbe763f526ad706625233caf)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #32 pc 0000000000fcfd68 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #33 pc 0000000000fcd440 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (std::__ndk1::function<void (facebook::react::ShadowTree const&)>::operator()(facebook::react::ShadowTree const&) const+28) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #34 pc 0000000000fcd3a4 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::ShadowTreeRegistry::visit(int, std::__ndk1::function<void (facebook::react::ShadowTree const&)> const&) const+236) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #35 pc 0000000000207b28 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreanimated.so (reanimated::ReanimatedMountHook::shadowTreeDidMount(std::__ndk1::shared_ptr<facebook::react::RootShadowNode const> const&, double)+308) (BuildId: c3b334a72bd63a7edbe763f526ad706625233caf)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #36 pc 0000000001077b8c /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::UIManager::reportMount(int) const+284) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #37 pc 000000000101cfa8 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::Scheduler::reportMount(int) const+36) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #38 pc 0000000000b40080 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::react::Binding::reportMount(int)+452) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #39 pc 0000000000b652b0 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::jni::detail::MethodWrapper<void (facebook::react::Binding::)(int), &(facebook::react::Binding::reportMount(int)), facebook::react::Binding, void, int>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject>, int&&)+216) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #40 pc 0000000000b64678 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::jni::detail::CallWithJniConversions<void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject>, int&&), void, facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject*, int>::call(facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject*, int, void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject>, int&&))+92) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #41 pc 0000000000b643f0 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::jni::detail::FunctionWrapper<void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject>, int&&), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject*, void, int>::call(_JNIEnv*, _jobject*, int, void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::Binding, facebook::react::JBinding>::JavaPart, facebook::react::JBinding, void>::_javaobject>, int&&))+64) (BuildId: 909aec441f8d961f)
2025-01-09 22:56:05.320 7184-7184 DEBUG pid-7184 A #42 pc 0000000000b44de0 /data/app/~~wDlBxSotihfss6Wf-kBTeQ==/com.miagenda.app-o_9gjV4S6Wt7nb4MM8kGuA==/base.apk!libreactnative.so (facebook::jni::detail::MethodWrapper<void (facebook::react::Binding::)(int), &(facebook::react::Binding::reportMount(int)), facebook::react::Binding, void, int>::call(_JNIEnv, _jobject*, int)+44) (BuildId: 909aec441f8d961f)
---------------------------- PROCESS ENDED (7082) for package com.miagenda.app ----------------------------

Steps to Reproduce

import { StatusBar } from 'expo-status-bar'
import { BackHandler, Button, Dimensions, Platform, SafeAreaView, Text, TouchableOpacity, View, ViewToken } from 'react-native'
import Animated, { Extrapolation, interpolate, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue } from 'react-native-reanimated'
import { Ionicons } from '@expo/vector-icons'
import { useCallback, useEffect, useRef, useState } from 'react'
import { StyleSheet } from 'react-native-unistyles'

interface SetupScreenProps {
    id: string
    title: string
    subtitle: string
}

const setupConfigScreens: SetupScreenProps[] = [
    {
        id: 'nm',
        title: 'Lorem Ipsum',
        subtitle:
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur gravida elit non ex vestibulum, a sodales purus tempus.',
    },
    {
        id: 'wh',
        title: 'Dolor Sit',
        subtitle: 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti.',
    },
    {
        id: 'rs',
        title: 'Amet Consectetur',
        subtitle:
            'Etiam sed velit eget enim aliquet condimentum. Proin facilisis, ligula vel aliquam lacinia, elit libero cursus nisi, a tristique ligula justo at nulla.',
    },
    {
        id: 'nw',
        title: 'Adipiscing Elit',
        subtitle:
            'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Sed quis sapien in eros scelerisque feugiat.',
    },
    {
        id: 'pnd',
        title: 'Vestibulum Egestas',
        subtitle:
            'Aliquam vitae justo sit amet odio tristique sodales. Nunc eget dui nec odio ullamcorper molestie quis et nunc. Integer ut metus.',
    },
    {
        id: 'sv',
        title: 'Morbi Tristique',
        subtitle: 'Mauris faucibus enim id nibh tincidunt, nec interdum velit aliquet. Integer sagittis risus eu sapien auctor ultricies.',
    },
    {
        id: 'nd',
        title: 'Suspendisse Ultrices',
        subtitle:
            'Phasellus tincidunt nisi at turpis feugiat fermentum. Nulla facilisi. Nunc et enim tincidunt, vestibulum odio ut, sollicitudin purus.',
    },
]

export interface ViewableItems<T> {
    viewableItems: ViewToken<T>[]
    changed: ViewToken<T>[]
}

const INITIAL_PERCENTAGE_BAR = 100 / setupConfigScreens.length
const screen = Dimensions.get('screen')

export default function App() {
    const [currentIndex, setCurrentIndex] = useState(0)
    const scrollRef = useRef<Animated.FlatList<any>>(null)
    const translateX = useSharedValue(0)

    const onItemsChanged = useCallback((data: ViewableItems<SetupScreenProps>) => {
        if (data.changed[0].isViewable && typeof data.changed[0].index == 'number') {
            setCurrentIndex(data.changed[0].index)
        }
    }, [])

    const nextScreen = useCallback(() => {
        if (currentIndex < setupConfigScreens.length - 1) {
            scrollRef.current?.scrollToIndex({ index: currentIndex + 1, animated: true })
        } else {
            console.log('we need to go to next screen')
        }
    }, [currentIndex])

    const onBack = useCallback(() => {
        if (currentIndex != 0) {
            scrollRef.current?.scrollToIndex({ index: currentIndex - 1, animated: true })
        }
    }, [currentIndex])

    const onBackHandler = useCallback(() => {
        if (currentIndex === 0) return false
        onBack()
        return true
    }, [currentIndex])

    const scrollHandler = useAnimatedScrollHandler((e) => {
        translateX.value = e.contentOffset.x
    }, [])

    useEffect(() => {
        const backHandler = BackHandler.addEventListener('hardwareBackPress', onBackHandler)

        return () => backHandler.remove()
    }, [])

    const backStyle = useAnimatedStyle(() => {
        const opacity = interpolate(translateX.value, [0, screen.width], [0, 1])
        return {
            opacity,
        }
    }, [])

    const indicatorStyle = useAnimatedStyle(() => {
        // const width = interpolate(translateX.value, [])
        const inputRange = setupConfigScreens.map((_, index) => index * screen.width)
        const outputRange = setupConfigScreens.map((_, index) => (index + 1) * INITIAL_PERCENTAGE_BAR)
        const percentage = interpolate(translateX.value, inputRange, outputRange, Extrapolation.CLAMP)

        return {
            width: `${percentage}%`,
            height: 10,
        }
    }, [])
    return (
        <SafeAreaView style={styles.container}>
            <View style={styles.progressContainer}>
                <Animated.View style={[styles.back, backStyle]}>
                    <TouchableOpacity onPress={onBack}>
                        <Ionicons name='arrow-back-outline' size={24} />
                    </TouchableOpacity>
                </Animated.View>
                <View style={styles.progressBarContainer}>
                    <Animated.View style={[styles.indicator, indicatorStyle]} />
                </View>
            </View>
            <Animated.FlatList
                ref={scrollRef}
                data={setupConfigScreens}
                keyExtractor={(item) => item.id}
                onScroll={scrollHandler}
                horizontal
                pagingEnabled
                style={styles.list}
                scrollEnabled={false}
                onViewableItemsChanged={onItemsChanged}
                showsHorizontalScrollIndicator={false}
                renderItem={({ item }) => <SetupItemScreen item={item} nextScreen={nextScreen} />}
            />
            <StatusBar style='dark' />
        </SafeAreaView>
    )
}

interface Props {
    item: SetupScreenProps
    nextScreen: VoidFunction
}

const SetupItemScreen = ({ item, nextScreen }: Props) => {
    return (
        <View style={styles.screen}>
            <Text style={styles.title}>{item.title}</Text>
            <Text style={styles.subtitle}>{item.subtitle}</Text>
            <View style={{ marginTop: 'auto' }}>
                <Button title='Continuar' onPress={nextScreen} />
            </View>
        </View>
    )
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: 'white',
    },
    list: {
        flexGrow: 1,
    },
    progressContainer: {
        position: 'absolute',
        justifyContent: 'center',
        alignItems: 'center',
        top: 60 + 24,
        left: 24,
        right: 24,
    },
    back: {
        position: 'absolute',
        left: 0,
        zIndex: 99,
    },
    progressBarContainer: {
        width: '70%',
        backgroundColor: 'lightgrey',
        borderRadius: 10,
    },
    indicator: {
        backgroundColor: 'red',
        borderRadius: 10,
    },
    title: {
        fontSize: 25,
        fontWeight: '600',
        color: 'red',
    },
    subtitle: {
        color: 'grey',
        marginTop: 10,
        lineHeight: 20,
    },
    screen: {
        width: Dimensions.get('screen').width,
        padding: 24,
        flex: 1,
        paddingTop: Platform.select({
            android: 60 + 48,
            ios: 60,
        }),
    },
})

Snack or Repository Link (Optional)

No response

Unistyles Version

3.0.0-beta.4

React Native Version

0.76.3

Platforms

Android, iOS

Expo

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant