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

Crash after commit [Add movieFragmentInterval options.] when enter in background #1629

Closed
al3x88 opened this issue Nov 21, 2024 · 2 comments · Fixed by #1630
Closed

Crash after commit [Add movieFragmentInterval options.] when enter in background #1629

al3x88 opened this issue Nov 21, 2024 · 2 comments · Fixed by #1630
Milestone

Comments

@al3x88
Copy link

al3x88 commented Nov 21, 2024

Describe the bug

If I install version 2.0.0 everything works perfectly unless you can't record locally as for the change in this commit: f433315

If setup my SPM with this commit:

Screenshot 2024-11-21 at 12 07 54

what happen is that, the first time I call (in viewDidLoad):

Task{ await mixer... }

and I put the app in background, it throw the error:

Incorrect actor executor assumption

and, if you are from the simulator it crashes, otherwise it restart from splash view (so basically the streaming is lost).

Note: if I comment all mixer occurrences and I test it works perfectly (unless does nothing since mixer is commented)

I tested extensively and I figured out that the behaviour happens after commit [Oct 31]:

4d19072

So most probably is related to some change happened on MediaMixer() on [Nov 1] here:

1e95f89

So currently I don't see any commit on ver 2.0.0 that allow my to record and going in background without issues.
Hope you can help me!! Many thanks for you amazing work.

To Reproduce

  1. SPM: setup commit: f433315
  2. When you are on IngestViewController.swift (or similar) put app in background
  3. if you are testing from Xcode it will crash with error: Incorrect actor executor assumption
  4. if you are testing without out Xcode it will restart from splash view.

Expected behavior

When app is set in background, it should be resumed without issues and keeping RTMP connection and view alive.

Version

2.0.0 commit f433315

Smartphone info.

  • IPHONE 12 iOS 18.1

Additional context

No response

Screenshots

No response

Relevant log output

No response

@al3x88 al3x88 changed the title After added fragment crash when enter in background Crash after commit [Add movieFragmentInterval options.] when enter in background Nov 21, 2024
@shogo4405
Copy link
Owner

shogo4405 commented Nov 22, 2024

Clash log

Thread 0 Crashed:
0   libsystem_kernel.dylib        	       0x1ea01d1d4 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x22218eef8 pthread_kill + 268
2   libsystem_c.dylib             	       0x1a1a0fad8 abort + 128
3   libswift_Concurrency.dylib    	       0x1a5360d50 swift::swift_Concurrency_fatalErrorv(unsigned int, char const*, char*) + 32
4   libswift_Concurrency.dylib    	       0x1a5360d70 swift::swift_Concurrency_fatalError(unsigned int, char const*, ...) + 32
5   libswift_Concurrency.dylib    	       0x1a5360894 swift_task_checkIsolated + 212
6   libswift_Concurrency.dylib    	       0x1a535cb78 swift_task_isCurrentExecutorImpl(swift::SerialExecutorRef) + 284
7   Example iOS.debug.dylib       	       0x102a72788 closure #4 in MediaMixer.startRunning() + 56
8   Combine                       	       0x1a2f91cec Subscribers.Sink.receive(_:) + 92
9   Combine                       	       0x1a2f91c80 protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B> + 24
10  Foundation                    	       0x198924360 closure #1 in Notification.Subscription.init(_:_:_:_:) + 272
11  Foundation                    	       0x198923af4 thunk for @escaping @callee_guaranteed @Sendable (@in_guaranteed Notification) -> () + 56
12  CoreFoundation                	       0x199c4f2e0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 128
13  CoreFoundation                	       0x199c4f210 ___CFXRegistrationPost_block_invoke + 88
14  CoreFoundation                	       0x199c4f158 _CFXRegistrationPost + 436
15  CoreFoundation                	       0x199c4d70c _CFXNotificationPost + 728
16  Foundation                    	       0x198870ea4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
17  UIKitCore                     	       0x19d524204 __47-[UIApplication _applicationDidEnterBackground]_block_invoke + 268
18  UIKitCore                     	       0x19c7700ac +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 140
19  UIKitCore                     	       0x19d523fe4 -[UIApplication _applicationDidEnterBackground] + 136
20  UIKitCore                     	       0x19c7b7158 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 652
21  UIKitCore                     	       0x19c5fa59c _UIScenePerformActionsWithLifecycleActionMask + 112
22  UIKitCore                     	       0x19c7b7848 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 220
23  UIKitCore                     	       0x19c7b7558 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 216
24  UIKitCore                     	       0x19c563178 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 608
25  UIKitCore                     	       0x19c53180c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 248
26  UIKitCore                     	       0x19c531134 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 148
27  UIKitCore                     	       0x19c530ab4 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736
28  UIKitCore                     	       0x19c5300ec _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224
29  UIKitCore                     	       0x19c5fbb14 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316
30  UIKitCore                     	       0x19cc0e80c __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.229 + 612
31  UIKitCore                     	       0x19c5fa01c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 208
32  UIKitCore                     	       0x19c6b9824 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244
33  UIKitCore                     	       0x19c6b9404 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 336
34  FrontBoardServices            	       0x1b32401bc __76-[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.193 + 244
35  FrontBoardServices            	       0x1b323fd6c -[FBSScene _callOutQueue_coalesceClientSettingsUpdates:] + 68
36  FrontBoardServices            	       0x1b320f3c8 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 796
37  FrontBoardServices            	       0x1b321ddb8 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 148
38  FrontBoardServices            	       0x1b321dc44 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
39  FrontBoardServices            	       0x1b3222114 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 340
40  libdispatch.dylib             	       0x1a19560d0 _dispatch_client_callout + 20
41  libdispatch.dylib             	       0x1a1959b14 _dispatch_block_invoke_direct + 284
42  FrontBoardServices            	       0x1b321f300 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
43  FrontBoardServices            	       0x1b321f280 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240
44  FrontBoardServices            	       0x1b321f158 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28
45  CoreFoundation                	       0x199c54328 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
46  CoreFoundation                	       0x199c542bc __CFRunLoopDoSource0 + 176
47  CoreFoundation                	       0x199c51dc0 __CFRunLoopDoSources0 + 244
48  CoreFoundation                	       0x199c50fbc __CFRunLoopRun + 840
49  CoreFoundation                	       0x199c50830 CFRunLoopRunSpecific + 588
50  GraphicsServices              	       0x1e5c301c4 GSEventRunModal + 164
51  UIKitCore                     	       0x19c7b6eb0 -[UIApplication _run] + 816
52  UIKitCore                     	       0x19c8655b4 UIApplicationMain + 340
53  Example iOS.debug.dylib       	       0x102985bf8 __debug_main_executable_dylib_entry_point + 64
54  dyld                          	       0x1bf63eec8 start + 2724

shogo4405 added a commit that referenced this issue Nov 22, 2024
@shogo4405 shogo4405 added this to the 2.0.1 milestone Nov 22, 2024
@shogo4405
Copy link
Owner

I'm able to fix the issue on our end. Thank you for reporting it. #1630

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

Successfully merging a pull request may close this issue.

2 participants