Skip to content

[google_maps_flutter] iOS TileOverlay stops loading tiles after backgrounding app (3.13+) #135252

@elitree

Description

@elitree

Is there an existing issue for this?

Steps to reproduce

  1. Run the google_maps_flutter example app on an iOS device (compile against a 3.13 or higher flutter; this does not occur in 3.10)
  2. Select the Tile Overlay example
  3. Click Add Tile Overlay
  4. Scroll the map, and observe how the custom tiles are loaded as expected
  5. Background the app (can just trigger multitasking partially, for example)
  6. Scroll the map again
  7. Note that no new overlay tiles are downloaded, and the only tiles shown are the ones pulled down in steps 3-4

Expected results

As the user scrolls the map, custom TileOverlay tiles should continue to download and show whether or not the user has backgrounded the app yet.

Actual results

As soon as the user backgrounds the app, no more custom TileOverlay tiles will download.

This issue does not occur when compiling against Flutter 3.10. It does not seem to occur on Android.

Code sample

Reproduced using the example app in the packages repo: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter/example

Screenshots or Video

The following was captured from an iPhone 11 running iOS 17.0. I also reproduced it on an iPad Pro running iPadOS 16.7.

Video demonstration
Tile_Overlay_480.mov

Logs

Logs
fvm flutter run -d 00008030-000E10513A38802E
Launching lib/main.dart on Eli iPhone in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Automatically signing iOS for device deployment using specified development team in Xcode project: 6L6G8SY9C6
Running pod install...                                             541ms
Running Xcode build...                                          
Xcode build done.                                            6.1s
Installing and launching...                                     
You may be prompted to give access to control Xcode. Flutter uses Xcode to run your app. If access is not allowed, you can change this through your Settings > Privacy & Security > Automation.
[VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend.
Installing and launching...                                        29.2s
Syncing files to device Eli iPhone...                               28ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Eli iPhone is available at: http://127.0.0.1:51754/guQumPzfAk4=/
The Flutter DevTools debugger and profiler on Eli iPhone is available at: http://127.0.0.1:9102?uri=http://127.0.0.1:51754/guQumPzfAk4=/
[VERBOSE-2:shell.cc(1004)] The 'plugins.flutter.dev/google_maps_ios_0' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
((null)) was false: Don't support little endian bitmaps
((null)) was false: Unable to create GMSImageRenderTile due to bad graphics data
((null)) was false: Don't support little endian bitmaps
((null)) was false: Unable to create GMSImageRenderTile due to bad graphics data
((null)) was false: Don't support little endian bitmaps
((null)) was false: Unable to create GMSImageRenderTile due to bad graphics data
((null)) was false: Don't support little endian bitmaps
((null)) was false: Unable to create GMSImageRenderTile due to bad graphics data
((null)) was false: Don't support little endian bitmaps
((null)) was false: Unable to create GMSImageRenderTile due to bad graphics data
...

Those ((null)) console messages begin once you start scrolling the map after backgrounding/foregrounding the app, and they keep generating after that point whenever you scroll the map again.

Flutter Doctor output

The output below is for 3.13.3, but I've reproduced it with 3.13.5 as well. The issue does not occur with 3.10.7.

Doctor output
fvm flutter doctor -v
[✓] Flutter (Channel stable, 3.13.3, on macOS 14.0 23A339 darwin-arm64, locale en-US)
    • Flutter version 3.13.3 on channel stable at /Users/eligeller/fvm/versions/3.13.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2524052335 (2 weeks ago), 2023-09-06 14:32:31 -0700
    • Engine revision b8d35810e9
    • Dart version 3.1.1
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/eligeller/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.82.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (5 available)
    • Eli’s ReportAll iPhone (mobile) • 00008110-000611A60CD8401E • ios            • iOS 17.0 21A329
    • Eli iPhone (mobile)             • 00008030-000E10513A38802E • ios            • iOS 17.0 21A329
    • Eli’s iPad Pro (mobile)         • 00008103-001A203E26C3001E • ios            • iOS 16.7 20H19
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.0 23A339 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 116.0.5845.187

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsc: regressionIt was better in the past than it is nowe: impellerImpeller rendering backend issues and features requestsfound in release: 3.13Found to occur in 3.13found in release: 3.15Found to occur in 3.15has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions