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 when attempting to clear the CAMetalLayer after emulation stop #32

Closed
OatmealDome opened this issue Jan 16, 2023 · 3 comments
Closed
Labels
more information required Further information is requested

Comments

@OatmealDome
Copy link
Owner

Crash report from brand:

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	       0x1d3cbe200 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1e3efb1ac pthread_kill + 268
2   libsystem_c.dylib             	       0x19eab5ca0 abort + 180
3   libsystem_c.dylib             	       0x19eb0c890 __assert_rtn + 272
4   Metal                         	       0x1924bef00 MTLReportFailure.cold.1 + 48
5   Metal                         	       0x19249d7c8 MTLReportFailure + 464
6   Metal                         	       0x1923bcb44 -[_MTLCommandBuffer presentDrawable:] + 452
7   DolphiniOS                    	       0x102632fa8 -[EmulationCoordinator clearMetalLayer] + 472
8   DolphiniOS                    	       0x1026369d8 __58-[EmulationViewController receiveEmulationEndNotification]_block_invoke_2 + 100
9   UIKitCore                     	       0x1999d7fa0 -[UIPresentationController transitionDidFinish:] + 1120
10  UIKitCore                     	       0x1998ab8d4 -[_UICurrentContextPresentationController transitionDidFinish:] + 44
11  UIKitCore                     	       0x199ebc4f0 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.101 + 136
12  UIKitCore                     	       0x199a1185c -[_UIViewControllerTransitionContext completeTransition:] + 116
13  UIKitCore                     	       0x199a129c8 -[UITransitionView notifyDidCompleteTransition:] + 180
14  UIKitCore                     	       0x199a125c8 -[UITransitionView _didCompleteTransition:] + 828
15  UIKitCore                     	       0x19a77f1b0 __UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__ + 36
16  UIKitCore                     	       0x19982c114 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 636
17  UIKitCore                     	       0x19982b070 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 436
18  UIKitCore                     	       0x19982a790 -[UIViewAnimationState animationDidStop:finished:] + 196
19  UIKitCore                     	       0x19982a8a4 -[UIViewAnimationState animationDidStop:finished:] + 472
20  QuartzCore                    	       0x198c44ae8 CA::Layer::run_animation_callbacks(void*) + 232
21  libdispatch.dylib             	       0x19ea51fdc _dispatch_client_callout + 20
22  libdispatch.dylib             	       0x19ea607f4 _dispatch_main_queue_drain + 928
23  libdispatch.dylib             	       0x19ea60444 _dispatch_main_queue_callback_4CF + 44
24  CoreFoundation                	       0x197666a08 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
25  CoreFoundation                	       0x197648368 __CFRunLoopRun + 2036
26  CoreFoundation                	       0x19764d1e4 CFRunLoopRunSpecific + 612
27  GraphicsServices              	       0x1d046d368 GSEventRunModal + 164
28  UIKitCore                     	       0x199afcd88 -[UIApplication _run] + 888
29  UIKitCore                     	       0x199afc9ec UIApplicationMain + 340
30  DolphiniOS                    	       0x10262eb98 main + 144
31  dyld                          	       0x1b5971948 start + 2504
@OatmealDome
Copy link
Owner Author

Fixed an issue where the clear code would get called multiple times due to multiple observer registration in NSNotificationCenter. I also adjusted the code to clear the layer before dismissing the view controller.

Let's see if the issue reappears in the next beta.

@Simonx22
Copy link
Collaborator

Is this fixed?

@Simonx22 Simonx22 added the more information required Further information is requested label Jan 21, 2023
@OatmealDome
Copy link
Owner Author

OatmealDome commented Jan 23, 2023

Going to assume fixed. If I see it occur again, I'll reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants