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

Random crash which is very frequent #218

Open
vinayakparmar92 opened this issue Sep 13, 2019 · 4 comments
Open

Random crash which is very frequent #218

vinayakparmar92 opened this issue Sep 13, 2019 · 4 comments

Comments

@vinayakparmar92
Copy link

Describe the bug
I am using the pod of latest versions of Instructions(1.3.1). There is a random crash happening which is frequent. Attached here the screen shot. The crash is on 225 line number in file CoachMarkLayoutHelper. Here is the code:

let segmentIndex = Int(ceil(2 * pointOfInterest.x / frame.size.width))

Looks like at some moment, the frame.size.width is 0 which makes it crash.

To Reproduce
Happening randomly and not reproducible

Expected behavior
Crash should not happen

Screenshots
Screenshot 2019-09-13 at 15 24 31

Environment:

  • Device: All
  • iOS version: iOS 11 to iOS 12.4.1
  • Dependency Manager: CocoaPods

Additional context

@ephread
Copy link
Owner

ephread commented Oct 5, 2019

I put a partial fix in 1.4.0. It should no longer crash, falling back to a default alignment. But that won't solve the underlying issue. Can you share with me the full stack trace? I'd like to understand under what circumstances the frame could be nil. I believe this is a long-standing issue.

@vinayakparmar92
Copy link
Author

@ephread Thank you that you tried a fix. Mentioned below the full stack trace

OS Version: 12.4.0 (16G77)
Device: iPhone 7
RAM Free: 2.1%
Disk Free: 8.9%

#0. Crashed: com.apple.main-thread
0  Instructions                   0x1015491d0 specialized CoachMarkLayoutHelper.computeHorizontalAligment(of:forLayoutDirection:inFrame:) + 225 (CoachMarkLayoutHelper.swift:225)
1  Instructions                   0x101549944 specialized CoachMarkLayoutHelper.constraints(for:coachMark:parentView:layoutDirection:passNumber:) (<compiler-generated>)
2  Instructions                   0x101547558 specialized CoachMarkDisplayManager.generateAndEnableHorizontalConstraints(of:forDisplayIn:usingCoachMark:andOverlayView:) (<compiler-generated>)
3  Instructions                   0x101546024 CoachMarkDisplayManager.showNew(coachMarkView:from:at:animated:completion:) + 232 (CoachMarkDisplayManager.swift:232)
4  Instructions                   0x10154ef40 CoachMarksViewController.show(coachMark:at:animated:completion:) + 304 (CoachMarksViewController.swift:304)
5  Instructions                   0x101552438 FlowManager.createAndShowCoachMark(afterResuming:changing:) + 243 (FlowManager.swift:243)
6  Instructions                   0x101551804 FlowManager.showNextCoachMark(hidePrevious:) + 196 (FlowManager.swift:196)
7  Instructions                   0x101550e58 closure #1 in FlowManager.startFlow(withNumberOfCoachMarks:) + 88 (FlowManager.swift:88)
8  Instructions                   0x10154e948 closure #1 in CoachMarksViewController.prepareToShowCoachMarks(_:) + 272 (CoachMarksViewController.swift:272)
9  Instructions                   0x101558db4 closure #2 in TranslucentOverlayStyleManager.showOverlay(_:withDuration:completion:) + 96 (TranslucentOverlayStyleManager.swift:96)
10 Instructions                   0x1015581d0 thunk for @escaping @callee_guaranteed (@unowned Bool) -> () (<compiler-generated>)
11 UIKitCore                      0x1c79c0d1c -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 752
12 UIKitCore                      0x1c7997a74 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
13 UIKitCore                      0x1c7998048 -[UIViewAnimationState animationDidStop:finished:] + 296
14 QuartzCore                     0x19f02d3c8 CA::Layer::run_animation_callbacks(void*) + 284
15 libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
16 libdispatch.dylib              0x19a4cb008 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
17 CoreFoundation                 0x19aa7032c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
18 CoreFoundation                 0x19aa6b264 __CFRunLoopRun + 1924
19 CoreFoundation                 0x19aa6a7c0 CFRunLoopRunSpecific + 436
20 GraphicsServices               0x19cc6b79c GSEventRunModal + 104
21 UIKitCore                      0x1c7535c38 UIApplicationMain + 212
22 <APP NAME>                 0x10011213c main + 29 (RewardsDescViewController.swift:29)
23 libdyld.dylib                  0x19a52e8e0 start + 4

--

#0. Crashed: com.apple.main-thread
0  Instructions                   0x1015491d0 specialized CoachMarkLayoutHelper.computeHorizontalAligment(of:forLayoutDirection:inFrame:) + 225 (CoachMarkLayoutHelper.swift:225)
1  Instructions                   0x101549944 specialized CoachMarkLayoutHelper.constraints(for:coachMark:parentView:layoutDirection:passNumber:) (<compiler-generated>)
2  Instructions                   0x101547558 specialized CoachMarkDisplayManager.generateAndEnableHorizontalConstraints(of:forDisplayIn:usingCoachMark:andOverlayView:) (<compiler-generated>)
3  Instructions                   0x101546024 CoachMarkDisplayManager.showNew(coachMarkView:from:at:animated:completion:) + 232 (CoachMarkDisplayManager.swift:232)
4  Instructions                   0x10154ef40 CoachMarksViewController.show(coachMark:at:animated:completion:) + 304 (CoachMarksViewController.swift:304)
5  Instructions                   0x101552438 FlowManager.createAndShowCoachMark(afterResuming:changing:) + 243 (FlowManager.swift:243)
6  Instructions                   0x101551804 FlowManager.showNextCoachMark(hidePrevious:) + 196 (FlowManager.swift:196)
7  Instructions                   0x101550e58 closure #1 in FlowManager.startFlow(withNumberOfCoachMarks:) + 88 (FlowManager.swift:88)
8  Instructions                   0x10154e948 closure #1 in CoachMarksViewController.prepareToShowCoachMarks(_:) + 272 (CoachMarksViewController.swift:272)
9  Instructions                   0x101558db4 closure #2 in TranslucentOverlayStyleManager.showOverlay(_:withDuration:completion:) + 96 (TranslucentOverlayStyleManager.swift:96)
10 Instructions                   0x1015581d0 thunk for @escaping @callee_guaranteed (@unowned Bool) -> () (<compiler-generated>)
11 UIKitCore                      0x1c79c0d1c -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 752
12 UIKitCore                      0x1c7997a74 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
13 UIKitCore                      0x1c7998048 -[UIViewAnimationState animationDidStop:finished:] + 296
14 QuartzCore                     0x19f02d3c8 CA::Layer::run_animation_callbacks(void*) + 284
15 libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
16 libdispatch.dylib              0x19a4cb008 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
17 CoreFoundation                 0x19aa7032c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
18 CoreFoundation                 0x19aa6b264 __CFRunLoopRun + 1924
19 CoreFoundation                 0x19aa6a7c0 CFRunLoopRunSpecific + 436
20 GraphicsServices               0x19cc6b79c GSEventRunModal + 104
21 UIKitCore                      0x1c7535c38 UIApplicationMain + 212
22 <APP NAME>                 0x10011213c main + 29 (RewardsDescViewController.swift:29)
23 libdyld.dylib                  0x19a52e8e0 start + 4

#1. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe1f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#2. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#3. com.google.fira.worker
0  libsystem_kernel.dylib         0x19a67c408 fsync + 8
1  libsqlite3.dylib               0x19af423ec sqlite3_free_table + 67964
2  libsqlite3.dylib               0x19af41e3c sqlite3_free_table + 66508
3  libsqlite3.dylib               0x19af2c154 sqlite3_value_text + 23708
4  libsqlite3.dylib               0x19aef7df4 sqlite3_finalize + 3636
5  libsqlite3.dylib               0x19af24b00 sqlite3_step + 65916
6  libsqlite3.dylib               0x19af14b40 sqlite3_step + 444
7  <APP NAME>                 0x1005bbdc8 -[APMSqliteStore executeSQLStatement:error:] + 4375723464
8  <APP NAME>                 0x1005bbd38 -[APMSqliteStore executeSQL:error:] + 4375723320
9  <APP NAME>                 0x1005b948c -[APMSqliteStore validateTableWithName:requiredColumnNames:addOnColumns:error:] + 4375712908
10 <APP NAME>                 0x1005b8de4 -[APMSqliteStore ensureTableWithName:createSQL:requiredColumnNames:addOnColumns:error:] + 4375711204
11 <APP NAME>                 0x1005b805c -[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:error:] + 4375707740
12 <APP NAME>                 0x1005b8938 -[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:modifyColumnInfo:error:] + 4375710008
13 <APP NAME>                 0x10058892c -[APMDatabase ensureAllTables] + 4375513388
14 <APP NAME>                 0x100586eb0 -[APMDatabase initializeDatabaseResourcesWithContext:databasePath:] + 4375506608
15 <APP NAME>                 0x10057c240 -[APMDatabase initWithDatabaseName:persistedConfig:] + 4375462464
16 <APP NAME>                 0x10058d880 __47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 4375533696
17 libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
18 libdispatch.dylib              0x19a4c0eb8 _dispatch_once_callout + 28
19 <APP NAME>                 0x10058d46c -[APMMeasurement startMeasurementOnWorkerQueue] + 4375532652
20 <APP NAME>                 0x10058cfd4 -[APMMeasurement setEnabledOnWorkerQueue:] + 4375531476
21 <APP NAME>                 0x1005a6fb8 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 4375637944
22 libdispatch.dylib              0x19a51ca38 _dispatch_call_block_and_release + 24
23 libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
24 libdispatch.dylib              0x19a4c6324 _dispatch_lane_serial_drain$VARIANT$mp + 592
25 libdispatch.dylib              0x19a4c6e40 _dispatch_lane_invoke$VARIANT$mp + 428
26 libdispatch.dylib              0x19a4cf4ac _dispatch_workloop_worker_thread + 596
27 libsystem_pthread.dylib        0x19a6fe114 _pthread_wqthread + 304
28 libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#4. com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x19a6700f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19a66f5a0 mach_msg + 72
2  CoreFoundation                 0x19aa70120 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x19aa6b030 __CFRunLoopRun + 1360
4  CoreFoundation                 0x19aa6a7c0 CFRunLoopRunSpecific + 436
5  Foundation                     0x19b438eac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
6  Foundation                     0x19b438d3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7  UIKitCore                      0x1c761b754 -[UIEventFetcher threadMain] + 136
8  Foundation                     0x19b565674 __NSThread__start__ + 984
9  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
10 libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
11 libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#5. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#6. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#7. com.mixpanel.54605a9dc588acdc8e56b6d035b59538
0  libsystem_kernel.dylib         0x19a670130 semaphore_wait_trap + 8
1  libdispatch.dylib              0x19a4bf7a0 _dispatch_sema4_wait$VARIANT$mp + 24
2  libdispatch.dylib              0x19a4c0220 _dispatch_semaphore_wait_slow + 140
3  libswiftDispatch.dylib         0x1c903b5b8 OS_dispatch_semaphore.wait(wallTimeout:) + 20
4  Mixpanel                       0x101843c88 Decide.checkDecide(forceFetch:distinctId:token:completion:) + 148 (Decide.swift:148)
5  Mixpanel                       0x101885eb0 closure #1 in closure #1 in MixpanelInstance.checkDecide(forceFetch:completion:) + 1669 (MixpanelInstance.swift:1669)
6  Mixpanel                       0x10187391c thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
7  libdispatch.dylib              0x19a51ca38 _dispatch_call_block_and_release + 24
8  libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
9  libdispatch.dylib              0x19a4c6324 _dispatch_lane_serial_drain$VARIANT$mp + 592
10 libdispatch.dylib              0x19a4c6e40 _dispatch_lane_invoke$VARIANT$mp + 428
11 libdispatch.dylib              0x19a4cf4ac _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib        0x19a6fe114 _pthread_wqthread + 304
13 libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#8. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x19a6700f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19a66f5a0 mach_msg + 72
2  CoreFoundation                 0x19aa70120 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x19aa6b030 __CFRunLoopRun + 1360
4  CoreFoundation                 0x19aa6a7c0 CFRunLoopRunSpecific + 436
5  CFNetwork                      0x19b08474c -[__CoreSchedulingSetRunnable runForever] + 216
6  Foundation                     0x19b565674 __NSThread__start__ + 984
7  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
8  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
9  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#9. com.twitter.crashlytics.ios.MachExceptionServer
0  <APP NAME>                 0x1004ee828 CLSProcessRecordAllThreads + 376 (CLSProcess.c:376)
1  <APP NAME>                 0x1004eec10 CLSProcessRecordAllThreads + 407 (CLSProcess.c:407)
2  <APP NAME>                 0x1004de594 CLSHandler + 26 (CLSHandler.m:26)
3  <APP NAME>                 0x1004d9984 CLSMachExceptionServer + 446 (CLSMachException.c:446)
4  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
5  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
6  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#10. AVAudioSession Notify Thread
0  libsystem_kernel.dylib         0x19a6700f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19a66f5a0 mach_msg + 72
2  CoreFoundation                 0x19aa70120 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x19aa6b030 __CFRunLoopRun + 1360
4  CoreFoundation                 0x19aa6a7c0 CFRunLoopRunSpecific + 436
5  AVFAudio                       0x1a09dc334 GenericRunLoopThread::Entry(void*) + 156
6  AVFAudio                       0x1a0a06c60 CAPThread::Entry(CAPThread*) + 88
7  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
8  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
9  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#11. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#12. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#13. WEGQueue (QOS: USER_INITIATED)
0  libsystem_kernel.dylib         0x19a670148 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x19a4bf888 _dispatch_sema4_timedwait$VARIANT$mp + 64
2  libdispatch.dylib              0x19a4c01dc _dispatch_semaphore_wait_slow + 72
3  WebEngage                      0x101f4f470 _hidden#501_ + 115 (__hidden#515_:115)
4  WebEngage                      0x101f40c98 _hidden#350_ + 197 (__hidden#363_:197)
5  WebEngage                      0x101f4f04c _hidden#500_ + 93 (__hidden#515_:93)
6  WebEngage                      0x101f9e16c _hidden#1408_ + 17 (__hidden#1409_:17)
7  Foundation                     0x19b44f7c8 -[__NSOperationInternal _start:] + 740
8  Foundation                     0x19b545c4c __NSOQSchedule_f + 272
9  libdispatch.dylib              0x19a51ca38 _dispatch_call_block_and_release + 24
10 libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
11 libdispatch.dylib              0x19a4c201c _dispatch_continuation_pop$VARIANT$mp + 412
12 libdispatch.dylib              0x19a4c16e0 _dispatch_async_redirect_invoke + 600
13 libdispatch.dylib              0x19a4ce030 _dispatch_root_queue_drain + 372
14 libdispatch.dylib              0x19a4ce8d4 _dispatch_worker_thread2 + 128
15 libsystem_pthread.dylib        0x19a6fe1b4 _pthread_wqthread + 464
16 libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#14. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#15. Thread
0  libsystem_pthread.dylib        0x19a700cd0 start_wqthread + 190

#16. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#17. io.answers.EventQueue (QOS: BACKGROUND)
0  libsystem_kernel.dylib         0x19a67d920 write + 8
1  libz.1.dylib                   0x19a9bf0b4 gzvprintf + 820
2  libz.1.dylib                   0x19a9bf35c gzclose_w + 104
3  <APP NAME>                 0x100500868 -[ANSCompressLogOperation main] + 51 (ANSCompressLogOperation.m:51)
4  Foundation                     0x19b44f7c8 -[__NSOperationInternal _start:] + 740
5  Foundation                     0x19b545c4c __NSOQSchedule_f + 272
6  libdispatch.dylib              0x19a51ca38 _dispatch_call_block_and_release + 24
7  libdispatch.dylib              0x19a51d7d4 _dispatch_client_callout + 16
8  libdispatch.dylib              0x19a4c201c _dispatch_continuation_pop$VARIANT$mp + 412
9  libdispatch.dylib              0x19a4c16e0 _dispatch_async_redirect_invoke + 600
10 libdispatch.dylib              0x19a4ce030 _dispatch_root_queue_drain + 372
11 libdispatch.dylib              0x19a4ce8d4 _dispatch_worker_thread2 + 128
12 libsystem_pthread.dylib        0x19a6fe1b4 _pthread_wqthread + 464
13 libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#18. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe1f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#19. Thread
0  libsystem_kernel.dylib         0x19a670148 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x19a4bf888 _dispatch_sema4_timedwait$VARIANT$mp + 64
2  libdispatch.dylib              0x19a4c01dc _dispatch_semaphore_wait_slow + 72
3  libdispatch.dylib              0x19a4cddf8 _dispatch_worker_thread + 352
4  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
5  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
6  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#20. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#21. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

#22. Thread
0  libsystem_kernel.dylib         0x19a670148 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x19a4bf888 _dispatch_sema4_timedwait$VARIANT$mp + 64
2  libdispatch.dylib              0x19a4c01dc _dispatch_semaphore_wait_slow + 72
3  libdispatch.dylib              0x19a4cddf8 _dispatch_worker_thread + 352
4  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
5  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
6  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#23. Thread
0  libsystem_kernel.dylib         0x19a670148 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x19a4bf888 _dispatch_sema4_timedwait$VARIANT$mp + 64
2  libdispatch.dylib              0x19a4c01dc _dispatch_semaphore_wait_slow + 72
3  libdispatch.dylib              0x19a4cddf8 _dispatch_worker_thread + 352
4  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
5  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
6  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#24. Thread
0  libsystem_kernel.dylib         0x19a670148 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x19a4bf888 _dispatch_sema4_timedwait$VARIANT$mp + 64
2  libdispatch.dylib              0x19a4c01dc _dispatch_semaphore_wait_slow + 72
3  libdispatch.dylib              0x19a4cddf8 _dispatch_worker_thread + 352
4  libsystem_pthread.dylib        0x19a6fd2c0 _pthread_body + 128
5  libsystem_pthread.dylib        0x19a6fd220 _pthread_start + 44
6  libsystem_pthread.dylib        0x19a700cdc thread_start + 4

#25. Thread
0  libsystem_kernel.dylib         0x19a67bb74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19a6fe138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x19a700cd4 start_wqthread + 4

@ephread
Copy link
Owner

ephread commented Oct 14, 2019

@vinayakparmar92 from the stack trace, I assume that you previously paused the flow and you are starting it again, is that correct? Which PresentationContext are you using?

Instructions is crashing because an internal view (instructionsRootView) likely has a .zero frame when trying to lay out the coach marks, which is an edge case I can't wrap my head around. Maybe you are doing something I never thought about?

@vinayakparmar92
Copy link
Author

@vinayakparmar92 from the stack trace, I assume that you previously paused the flow and you are starting it again, is that correct? Which PresentationContext are you using?

Instructions is crashing because an internal view (instructionsRootView) likely has a .zero frame when trying to lay out the coach marks, which is an edge case I can't wrap my head around. Maybe you are doing something I never thought about?

Yes! I ask a singleton manager to present the Coachmark/Instruction which takes a callback. That callback will return a boolean if its the right moment to present the coachmark, if not then it will present it later. The CoachMarksController instance is alive during the whole cycle. I used the below method to invoke that callback to return if it should present or not

func coachMarksController(_ coachMarksController: CoachMarksController, willLoadCoachMarkAt index: Int) -> Bool

Tonbouy pushed a commit to Tonbouy/Instructions that referenced this issue Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants