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

Yoga symbols collision #345

Open
alextoudic opened this issue Oct 16, 2024 · 0 comments
Open

Yoga symbols collision #345

alextoudic opened this issue Oct 16, 2024 · 0 comments

Comments

@alextoudic
Copy link

alextoudic commented Oct 16, 2024

Description

I'm experiencing an EXC_BAD_ACCESS error with YGNodeStyleSetMinWidth when using use_frameworks! :linkage => :static in a project that uses Yoga for layout (specifically with React Native)

Provide a Repro

You can find the reproduction setup here: https://github.com/alextoudic/rive-yoga-collision-repro/tree/main/ios

Expected behavior

Both the Rive runtime and React Native should function correctly, using their respective Yoga symbols as intended

Screenshots

image

Stack trace:

* thread #8, queue = 'com.facebook.react.ShadowQueue', stop reason = EXC_BAD_ACCESS (code=1, address=0x104100)
    frame #0: 0x0000000000104100
    frame #1: 0x000000010620578c RiveRuntime`YGNode::markDirtyAndPropagate() + 36
  * frame #2: 0x00000001094d3140 YogaCollision.debug.dylib`-[RCTShadowView layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:](self=0x000000010661c590, _cmd="layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:", minimumSize=(width = 0, height = 0), maximumSize=(width = 402, height = 874), layoutDirection=UIUserInterfaceLayoutDirectionLeftToRight, layoutContext=RCTLayoutContext @ 0x000000016b97df70) at RCTShadowView.m:268:5
    frame #3: 0x00000001094c1330 YogaCollision.debug.dylib`-[RCTRootShadowView layoutWithAffectedShadowViews:](self=0x000000010661c590, _cmd="layoutWithAffectedShadowViews:", affectedShadowViews=0x000060000214ecb0) at RCTRootShadowView.m:35:3
    frame #4: 0x00000001094e7014 YogaCollision.debug.dylib`-[RCTUIManager uiBlockWithLayoutUpdateForRootView:](self=0x000060000291bbf0, _cmd="uiBlockWithLayoutUpdateForRootView:", rootShadowView=0x000000010661c590) at RCTUIManager.m:549:3
    frame #5: 0x00000001094ed104 YogaCollision.debug.dylib`-[RCTUIManager _layoutAndMount](self=0x000060000291bbf0, _cmd="_layoutAndMount") at RCTUIManager.m:1126:22
    frame #6: 0x00000001094ecfa8 YogaCollision.debug.dylib`-[RCTUIManager batchDidComplete](self=0x000060000291bbf0, _cmd="batchDidComplete") at RCTUIManager.m:1109:3
    frame #7: 0x000000010943b114 YogaCollision.debug.dylib`__32-[RCTCxxBridge batchDidComplete]_block_invoke(.block_descriptor=0x0000600000ce0c30) at RCTCxxBridge.mm:1514:13
    frame #8: 0x0000000104e6cec0 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #9: 0x0000000104e6e7b8 libdispatch.dylib`_dispatch_client_callout + 16
    frame #10: 0x0000000104e76aac libdispatch.dylib`_dispatch_lane_serial_drain + 912
    frame #11: 0x0000000104e777b0 libdispatch.dylib`_dispatch_lane_invoke + 420
    frame #12: 0x0000000104e841f0 libdispatch.dylib`_dispatch_root_queue_drain_deferred_wlh + 324
    frame #13: 0x0000000104e8375c libdispatch.dylib`_dispatch_workloop_worker_thread + 732
    frame #14: 0x0000000104f07814 libsystem_pthread.dylib`_pthread_wqthread + 284

Device & Versions (please complete the following information)

  • Device: iOS Simulator
  • iOS version: 18

Additional context

The reproduction project is built using Expo with a patched version of rive-react-native to ensure the latest RiveRuntime version (the issue persists with or without this patch). This problem only arises when using use_frameworks! :linkage => :static, which is necessary in my case to integrate @react-native-firebase

I previously commented on this issue but believe this problem may be more related to the loading of Rive's Yoga symbols in a project with overlapping Yoga dependencies when libraries are not dynamically linked. Any insights from iOS developers would be greatly appreciated

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