Environment
- Xcode version: 16.4
- iOS version: 26.4
- Maps SDK Version: 11.24.0 via mapbox_maps_flutter 2.24.0
Observed behavior and steps to reproduce
On iOS, the app crashes when calling label localization via StyleManager.localizeLabels from mapbox_maps_flutter for a style that contains a SymbolLayer whose text-field expression includes a null comparison.
The same style does not crash on Android.
Problematic expression inside layout.text-field:
["!=", ["get", "hoge"], null]
Example error:
mapbox_maps_flutter/StyleController.swift:367: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [RootCodingKeys(stringValue: "layout", intValue: nil), LayoutCodingKeys(stringValue: "text-field", intValue: nil)], debugDescription: "Failed to decode Value<String>", underlyingError: nil))
Expected behavior
The SDK should not crash when a valid Mapbox expression containing a null comparison is used inside a SymbolLayer text-field.
It should either handle the expression correctly during label localization or return a recoverable error instead of crashing.
Environment
Observed behavior and steps to reproduce
On iOS, the app crashes when calling label localization via
StyleManager.localizeLabelsfrommapbox_maps_flutterfor a style that contains aSymbolLayerwhosetext-fieldexpression includes a null comparison.The same style does not crash on Android.
Problematic expression inside
layout.text-field:Example error:
Expected behavior
The SDK should not crash when a valid Mapbox expression containing a null comparison is used inside a
SymbolLayertext-field.It should either handle the expression correctly during label localization or return a recoverable error instead of crashing.