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
{{ message }}
Repository navigation
fix(smartstore): avoid dev info crash when global store is unavailable - #4186
getDevSupportInfos builds an Objective-C array of alternating labels and values. An @[...] array literal cannot contain nil. When the global SmartStore fails to open, store is nil; sending it getSQLCipherVersion returns nil. That makes the first two array entries effectively:
@[@"SQLCipher version", nil]
Array creation throws the exception in the crash report: attempt to insert nil object from objects[1].
The ?: @"Unavailable" expression replaces that nil before the array is created. The Dev Info UI then receives a valid string value and can show the row instead of crashing. The same protection applies to the next two SQLCipher values. It does not make SmartStore open successfully; it only lets Dev Info remain usable when the store is unavailable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
This changes only the developer info display and does not change database opening or recovery behavior.