app Crashes when get back #1876
Replies: 1 comment 1 reply
-
@knight6700 Can you share more code, e.g. what your state, action and reducer look like, and what the view looks like? Without code it'll be tough to diagnose the actual problem. The warning that occurs before the crash may also contain a hint as to the issue. Did you give it a read?
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
when i get back with IFLEtStore and make a state with nil app crashes or get empty View
2023-01-27 16:05:32.056479+0200 Spomotion[15531:24441369] [ComposableArchitecture] An "ifLet" at "UserProfileMenu/PlacesProfileView.swift:163" received a child action when child state was "nil". …
Action:
PlaceProfile.Action.createVentAction(.createEventInfoState(.onAppear))
This is generally considered an application logic error, and can happen for a few reasons:
• A parent reducer set child state to "nil" before this reducer ran. This reducer must run before any other reducer sets child state to "nil". This ensures that child reducers can handle their actions while their state is still available.
• An in-flight effect emitted this action when child state was "nil". While it may be perfectly reasonable to ignore this action, consider canceling the associated effect before child state becomes "nil", especially if it is a long-living effect.
• This action was sent to the store while state was "nil". Make sure that actions for this reducer can only be sent from a view store when state is non-"nil". In SwiftUI applications, use "IfLetStore".
Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range
2023-01-27 16:05:32.087200+0200 Spomotion[15531:24441369] Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range
Beta Was this translation helpful? Give feedback.
All reactions