-
Notifications
You must be signed in to change notification settings - Fork 487
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 in stopFlow(immediately immediately: Bool = false, userDidSkip skipped: Bool = false, shouldCallDelegate: Bool = true ) #90
Comments
Could u please tell me, what is happening here. |
Hello @swetaarya, sadly from such stack trace, without more context attached to it, I'm afraid I can't really tell you issue right away. What action lead the crash? |
i think FlowManager.(stopFlow(immediately : Bool, userDidSkip : Bool, shouldCallDelegate : Bool) -> ()).(closure #2) + 412 causing crash |
i was calling CoachMarkController.startOn(self) in viewDidLoad() method. May be this causing problem |
That's extremely likely, you need to call |
But why crash occuring in FlowManager.(stopFlow(immediately : Bool, userDidSkip : Bool, shouldCallDelegate : Bool) -> ()).(closure #2) + 412 |
Certainly because of a nil pointer inside |
I just had this crash in my app too. When looking into the
So I suspect that the |
To fix issue ephread#90
PR: #99 |
I seems to be working in the PR I created, so can it be merged to master? |
Thanks for the work @anfriis, I haven't merged your PR yet, because I believe that the block shouldn't normally outlive the controller (hence the use of |
No problem :) but i guess the block is outliving the controller because the controller gets deallocated when the containing view controller does, and then the block lives on somehow |
I can see that I now have a new problem, that the |
I could replicate the same issue by quickly opening and closing ViewControllers. Based on the stack trace, the crash line points to FlowManager:126 Further on @anfriis comment, I would propose to keep a weak self reference in the completionBlock instead of touching the unowned reference. will submit a pull request shortly after.
|
0 libswiftCore.dylib 0x100fb04ac hidden#8277 (_hidden#7745:75)
1 libswiftCore.dylib 0x100fbe3fc swift_unknownUnownedTakeStrong (_hidden#9593:764)
2 Instructions 0x100b1acc8 FlowManager.(stopFlow(immediately : Bool, userDidSkip : Bool, shouldCallDelegate : Bool) -> ()).(closure #2) + 412
3 UIKit 0x1969c9cf8 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 492
4 UIKit 0x1969c981c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
5 UIKit 0x1969c965c -[UIViewAnimationState animationDidStop:finished:] + 160
6 QuartzCore 0x193e4a180 CA::Layer::run_animation_callbacks(void*) + 260
7 libdispatch.dylib 0x18f9c11c0 _dispatch_client_callout + 16
8 libdispatch.dylib 0x18f9c5d6c _dispatch_main_queue_callback_4CF + 1000
9 CoreFoundation 0x190ae3f2c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
10 CoreFoundation 0x190ae1b18 __CFRunLoopRun + 1660
11 CoreFoundation 0x190a10048 CFRunLoopRunSpecific + 444
12 GraphicsServices 0x192496198 GSEventRunModal + 180
13 UIKit 0x1969fc2fc -[UIApplication _run] + 684
14 UIKit 0x1969f7034 UIApplicationMain + 208
15 Shop101 0x1003fdafc main (AppDelegate.swift:31)
16 libdispatch.dylib 0x18f9f45b8 (Missing)
The text was updated successfully, but these errors were encountered: