rive-app / rive-ios

iOS runtime for Rive
MIT License
462 stars 53 forks source link

rive::AudioEngine::start() Crash #322

Closed psbss closed 1 week ago

psbss commented 1 month ago

Description

Hello, We faced new crash when app run rive::AudioEngine::start() I was investigation of this issue, I think this is caused by SDK.

Provide a Repro

Maybe inside of rive::AudioEngine::RuntimeEngine have problem.

https://github.com/rive-app/rive-ios/blob/92b21c2cd74eebbdbb2e905f3e7996394e70b6a3/Source/Renderer/rive_renderer_view.mm#L25-L33

Stacktrace:

      Crashed: com.apple.main-thread
0  RiveRuntime                    0x32a94c rive::AudioEngine::start() + 22
1  RiveRuntime                    0x7df8 -[RiveRendererView didEnterBackground:] + 36
2  CoreFoundation                 0x2f7a8 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
3  CoreFoundation                 0x2f170 ___CFXRegistrationPost_block_invoke + 88
4  CoreFoundation                 0x2f0b8 _CFXRegistrationPost + 440
5  CoreFoundation                 0x2e608 _CFXNotificationPost + 728
6  Foundation                     0x29f10 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
7  UIKitCore                      0xe35834 __47-[UIApplication _applicationDidEnterBackground]_block_invoke + 268
8  UIKitCore                      0x2bd4f8 +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 140
9  UIKitCore                      0xe35614 -[UIApplication _applicationDidEnterBackground] + 136
10 UIKitCore                      0x18b560 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 652
11 UIKitCore                      0x18b298 _UIScenePerformActionsWithLifecycleActionMask + 112
12 UIKitCore                      0x211934 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216
13 UIKitCore                      0x13aac4 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 220
14 UIKitCore                      0x13953c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 608
15 UIKitCore                      0x138ea4 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 248
16 UIKitCore                      0x138d74 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 148
17 UIKitCore                      0x138c7c +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736
18 UIKitCore                      0x138504 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224
19 UIKitCore                      0x1381b4 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316
20 UIKitCore                      0x4c8e20 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.226 + 612
21 UIKitCore                      0x137328 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216
22 UIKitCore                      0x137198 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244
23 UIKitCore                      0x136fd8 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 336
24 FrontBoardServices             0xe524 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 660
25 FrontBoardServices             0xe270 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 152
26 FrontBoardServices             0xe10c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
27 FrontBoardServices             0xe028 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 344
28 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
29 libdispatch.dylib              0x786c _dispatch_block_invoke_direct + 288
30 FrontBoardServices             0xa490 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
31 FrontBoardServices             0xa410 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240
32 FrontBoardServices             0xa2e8 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28
33 CoreFoundation                 0x3762c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
34 CoreFoundation                 0x368a8 __CFRunLoopDoSource0 + 176
35 CoreFoundation                 0x35058 __CFRunLoopDoSources0 + 244
36 CoreFoundation                 0x33d88 __CFRunLoopRun + 828
37 CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
38 GraphicsServices               0x34e0 GSEventRunModal + 164
39 UIKitCore                      0x22aedc -[UIApplication _run] + 888
40 UIKitCore                      0x22a518 UIApplicationMain + 340
41 UIKitCore                      0x463734 __swift_destroy_boxed_opaque_existential_1Tm + 12004
42 Rewards                        0x153ec main + 4371846124 (AppDelegate.swift:4371846124)
43 ???                            0x1adc76d84 (missing symbols)

Expected behavior

Screenshots

Device & Versions (please complete the following information)

Additional context

streamlify commented 1 week ago

Same here! Happens to both simulator and device, whenever app goes to background. First time using Rive this is frustrating.

streamlify commented 1 week ago

Same here! Happens to both simulator and device, whenever app goes to background. First time using Rive this is frustrating.

Actually solved by specifying pod to latest version.

psbss commented 1 week ago

May solved https://github.com/rive-app/rive-ios/releases/tag/5.12.1