You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From looking at the source code of ReactiveSwift, this seems only possible from using flatten(.latest) or flatMap(.latest).
In my codebase, I have identified three places that use flatten(.latest). The primary suspect has been refactored to using Combine. Unfortunately this did not solve the problem. The other two suspects do not seem suspicious to me:
Uses flatMapError to return a new producer, up to 3 times, after a delay of 10 seconds:
The condition is checked inside Foo.producer(), if the condition is met the returned producer will complete immediately without sending a value. Before the condition is met, a producer is returned that emits one value and completes, or an error.
I am using ReactiveSwift 6.6.1. The stack trace is attached. Is either of the use-cases above the culprit, or am I missing something else?
I'm starting to think that a Swift compiler optimization (bug) might be causing this. Never seen the bug in debug builds (no optimization), but I do see it in release builds (-Os optimization)
I occasionally receive crash reports with an infinite recursion in
observeSwitchToLatest()
.From looking at the source code of ReactiveSwift, this seems only possible from using
flatten(.latest) or flatMap(.latest)
.In my codebase, I have identified three places that use
flatten(.latest)
. The primary suspect has been refactored to using Combine. Unfortunately this did not solve the problem. The other two suspects do not seem suspicious to me:flatMapError
to return a new producer, up to 3 times, after a delay of 10 seconds:The condition is checked inside
Foo.producer()
, if the condition is met the returned producer will complete immediately without sending a value. Before the condition is met, a producer is returned that emits one value and completes, or an error.I am using ReactiveSwift 6.6.1. The stack trace is attached. Is either of the use-cases above the culprit, or am I missing something else?
crash_report.txt
The text was updated successfully, but these errors were encountered: