Repeat icon indicating copy to clipboard operation
Repeat copied to clipboard

About the timer release collapse

Open MoShenGuo opened this issue 7 years ago • 4 comments

/// Destroy current timer private func destroyTimer() { self.timer?.setEventHandler(handler: nil) self.timer?.cancel()

	if state == .paused || state == .finished {
		self.timer?.resume()
	}
}

This method when the order is written is wrong, the timer if is put up, is to call self. The timer?resume (), and then call the self. The timer?.cancel () in the self. The timer = nil to release,Or it will collapse

MoShenGuo avatar Jul 20 '18 01:07 MoShenGuo

Faced with crash that related to this part of code.

#5. Crashed: com.repeat.queue
0  libdispatch.dylib              0x180859630 _dispatch_queue_xref_dispose$VARIANT$mp + 72
1  libdispatch.dylib              0x180854e18 -[OS_dispatch_source _xref_dispose] + 24
2  Repeat                         0x102343944 _T06Repeat8RepeaterC8setPause33_97E5396AC7E12D74879B993A593805A9LLSbAC5StateO4from_AG2totF + 240
3  Repeat                         0x102343c74 _T06Repeat8RepeaterC9timeFired33_97E5396AC7E12D74879B993A593805A9LLyyF + 752
4  Repeat                         0x102342b48 _T06Repeat8RepeaterC14configureTimer33_97E5396AC7E12D74879B993A593805A9LLSo014DispatchSourceD0_pyFyycfU_ + 124
5  Repeat                         0x102342b94 _T0Ieg_IeyB_TR + 52
6  libdispatch.dylib              0x180854a60 _dispatch_client_callout + 16
7  libdispatch.dylib              0x18085ce94 _dispatch_continuation_pop$VARIANT$mp + 424
8  libdispatch.dylib              0x180866784 _dispatch_source_invoke$VARIANT$mp + 1364
9  libdispatch.dylib              0x18085e86c _dispatch_queue_serial_drain$VARIANT$mp + 280
10 libdispatch.dylib              0x18085f2fc _dispatch_queue_invoke$VARIANT$mp + 336
11 libdispatch.dylib              0x18085fcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 340
12 libdispatch.dylib              0x180868098 _dispatch_workloop_worker_thread$VARIANT$mp + 668
13 libsystem_pthread.dylib        0x180b87e70 _pthread_wqthread + 860
14 libsystem_pthread.dylib        0x180b87b08 start_wqthread + 4

Samback avatar Aug 31 '18 11:08 Samback

I have also similar issue.

ghost avatar Dec 04 '18 11:12 ghost

I have also similar issue.

+1

aligermiyanoglu avatar Sep 26 '19 14:09 aligermiyanoglu

+1

Samback avatar Dec 26 '19 09:12 Samback