์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- combine
- BOJ
- realm
- XCTest
- MVVM
- Lv2
- designpattern
- ๋ฐฑ์ค
- swift
- arkit
- BFS
- raywenderlich
- Swfit
- ํ๋ก๊ทธ๋๋จธ์ค
- node.js
- Kuring
- rxcocoa
- RxSwift
- reactorkit
- Xcode
- tableView
- ํจ์คํธ์บ ํผ์ค
- Flutter
- TCA
- SwiftUI
- CollectionView
- UIKit
- ios
- SnapKit
- visionOS
- Today
- Total
lgvv98
[RxSwift] Reentrancy anomaly was detected. Error ๋์ ๋ณธ๋ฌธ
[RxSwift] Reentrancy anomaly was detected. Error ๋์
๐ฅ ์บ๋ฟ๋งจ 2021. 9. 4. 14:59โ ์ด๋ฒ ์๊ฐ์๋ rxswift๋ฅผ ์ฌ์ฉํ๋ค๊ฐ ๋ง๋ ์๋ฌ์ ๋ํด์ ์์๋ณผ ์์ ์ด์ผ
์ด๋ฐ ์๋ฌ๋ฅผ ๋ง๋ ์ํฉ์ rxSwift๋ฅผ ์ ์ฉํ์ฌ ํ ์คํธํ๋์ ๊ธ์์ ์ต๋ ๊ธธ์ด๋ฅผ ์ ํด์ค๋ ๋ฐ์ํ์ด.
โ ์์ ํฌ์คํ ์ ์ฐธ๊ณ ํ๋ฉด ์กฐ๊ธ ๋ ์ข์!
2021.09.04 - [๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ] - [RxSwift] Textfield maxLength
โ ๋ฐ์ํ ์๋ฌ์ Text
โ ๏ธ Reentrancy anomaly was detected.
> Debugging: To debug this issue you can set a breakpoint in /Users/hamlitjason/HappyHouse/HappyHouse/Pods/RxSwift/RxSwift/Rx.swift:96 and observe the call stack.
> Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`
This behavior breaks the grammar because there is overlapping between sequence events.
Observable sequence is trying to send an event before sending of previous event has finished.
> Interpretation: This could mean that there is some kind of unexpected cyclic dependency in your code,
or that the system is not behaving in the expected way.
> Remedy: If this is the expected behavior this message can be suppressed by adding `.observe(on:MainScheduler.asyncInstance)`
or by enqueuing sequence events in some other way.
โ ์๋ฌ๊ฐ ๋ฐ์ํ ์ํฉ์์ ๋ด๊ฐ ์์ฑํ ์ฝ๋
๐ ์ฐ์ ๋๋ ํ ์คํธํ๋์ ๊ธธ์ด๋ฅผ ์ ํํ๊ธฐ ์ํด์ ์์ ๊ฐ์ด ์์ฑ์ ํ์ด.
๊ทธ๋ฌ์...! ์๋ฌ๋ฅผ ๋ฑ ๋ง๋๊ฒ ๋์๋๋ฐ, ๊ทธ๋ ๋ด๊ฐํ ์๊ฐ(๊ตฌ๊ธ๋ง ํ๊ธฐ ์ )์ผ๋ก๋ ์ ์ค๋ ๋๋ฅผ ๋ถ๋ฐฐํ๋ ๊ณผ์ ์์ ์ด๋ค ๋ฌธ์ ๊ฐ ์๋ค๊ณ ์๊ฐํ์ด.
๊ทธ๋ฌ๋๊น TextField๋ UI๊ด๋ จํ ๊ฒ์ด๋๊น ๋ฉ์ธ ์ค๋ ๋๋ก ์ฌ๋ ค์ผํ๋? ์ด๋ฐ ์๊ฐ์ ํํ๊ฒ ๋์์ง.
๊ทธ๋์, ์ด๋ค ์ํฉ์์ ์๋ฌ๊ฐ ๋จ๋์ง ํ์ธํด ๋ณด๋ ค๊ณ subscribe๋ก ๋ฐ๊ฟ๋ณด๊ณ , observe๋ฅผ ํตํด ๋ฉ์ธ ์ค์ผ์ค๋ฌ๋ฅผ ์ง์ ์์ฑํด ๋ณด์์ด.
๊ทธ๋ฐ๋ฐ๋ ๊ฐ์ ์ค๋ฅ๊ฐ ๋จ๋ ๊ฒ์ ํ์ธํ๊ณ , onError๋ onCompleted, onDisposed๊ฐ ์ ๋ถ ์คํ๋์ง ์์์ด.
์ด์ฏค ๋๋๊น ๊ตฌ๊ธ๋ง์ ํด์ผ๊ฒ ๋ค๊ณ ๋๋.
๊ตฌ๊ธ๋ง์ ํด๋ณด๋๊น ๋์ถฉ ์ฌ์ง์ ํ๋ ๊ฒ์ ๋ํ ๋ฌธ์ ์์ ๋๊ผ์ด.
๊ทธ๋ฆฌ๊ณ ๋ ๋นํฉ์ค๋ฌ์ ๋ ์ ์, ์๋ฌ์ฝ๋๋ฅผ ์์ธํ ๋ณด๋ฉด ์ด๋ค ์ฝ๋๋ฅผ ์ถ๊ฐํ๋ผ๊ณ ์ ํ์๋๋ผ.........
๊ทธ๋์ ๊ฒฐ๊ตญ์ ํด๊ฒฐ!
โ ์๋ฌ ์ฝ๋์ ๋ํ ์ด๋ฏธ์ง
'iOSํ๋ก์ ํธ > ๐ชท ๋๊ตฟํด์ปคํค(HappyHouse)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[RxSwift] TextView ๐ TextField (0) | 2021.09.11 |
---|---|
[RxSwift] button isSelected scan์ผ๋ก ํ ๊ธ์ฒ๋ผ ์ฌ์ฉํ๊ธฐ (0) | 2021.09.08 |
[RxSwift] Textfield maxLength (0) | 2021.09.04 |
[iOS] Tableview Cell ์ฌ์ด์ ๊ฐ๊ฒฉ์ฃผ๊ธฐ (0) | 2021.08.28 |
[iOS] TableView, CollectionView lastIndex ์ฐพ๊ธฐ (2) | 2021.08.27 |