Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Switching applications causes black screen, wildly colored snapshot #2071

Merged
merged 1 commit into from
Aug 19, 2015

Conversation

brunoabinader
Copy link
Member

Activating the application switcher when the user dot is visible causes the entire map view (other than ornaments and the user dot) to go black. The following screenshots are from the iOS 9 Simulator running as an iPhone 6:

black-everything

While the application is in the background, the snapshot we throw up on-screen has an artistic flair to it that suggests texture or z-fighting issues. As soon as the entering-foreground animation completes, we take down the snapshot and the black screen returns.

switching

switched

If you enter the application switcher while the user dot is hidden, the snapshot is correct, although the black screen does come back as soon as you switch back to the application:

switching-good

switched-good

Notice how some features do appear in the corrupted snapshot, including a school grounds, part of a highway, and some terrain tinting.

The same thing happens on the iOS 8.4 Simulator running as an iPhone 6:

switching-8 4

If you merely activate the application switcher but don’t switch away from iosapp, you’re left with a live, shrunken view of the application. In this state, you can sometimes see the colored splotches shifting around as the map redraws.

Unlike #2012, nothing is logged to the console.

/cc @kkaefer @incanus @friedbunny

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS labels Aug 13, 2015
@picciano
Copy link

Looks a lot like this one: #2012

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 13, 2015

Unlike #2012, nothing is logged to the console.

😉

Also, I should emphasize that this only occurs with the user dot visible. If I do it when the user dot is hidden, the application never gets into this corrupted state.

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 13, 2015

-glkView:drawInRect: doesn’t even get called after the screen turns black, even if I drag the map around.

@incanus
Copy link
Contributor

incanus commented Aug 14, 2015

I am seeing this happen even without user location shown (since launch or actively).

ios simulator screen shot aug 14 2015 4 15 22 pm

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 17, 2015

Yes, this can happen if you do anything that would cause a redraw after the application goes the background. So @incanus, you probably inadvertently had some drift-panning or drift-zooming going on when you activated the app switcher.

@robipresotto
Copy link

It's quite easy to reproduce - just scroll the map and go to the background mode immediately

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 18, 2015

git bisect fingers 9fd7e88, but it was a bit difficult to bisect due to #2036. (cc @brunoabinader)

git bisect start
# good: [df0fca364239efed97501bccc19da3b7cb4df920] bump podspec for 0.5.4
git bisect good df0fca364239efed97501bccc19da3b7cb4df920
# bad: [39c545c7e78e9190cc10aefa3f91cd53e56778f3] Install only needed Android SDK components on Travis
git bisect bad 39c545c7e78e9190cc10aefa3f91cd53e56778f3
# skip: [ca8ffcc4562b830a02e1087e8d951b556ae315d9] Merge pull request #2031 from mapbox/android-api-check
git bisect skip ca8ffcc4562b830a02e1087e8d951b556ae315d9
# skip: [23d88928beb40b230e5900800c83b4b0789b955a] #1856 - Setting map style programmatically and setting corresponding menu item checked
git bisect skip 23d88928beb40b230e5900800c83b4b0789b955a
# skip: [58357b7964fcc44cbb824da64225fe58bb3d3dd1] Removed Transform::needsTransition()
git bisect skip 58357b7964fcc44cbb824da64225fe58bb3d3dd1
# skip: [21ec5056489f53601b3d45a0b1c79a85add42b0b] add benchmark mode that shows the real frame time rather than the vsync time
git bisect skip 21ec5056489f53601b3d45a0b1c79a85add42b0b
# skip: [72aaf3934a8aa3569e455b04975d4f8ee2126dc4] Merge branch 'master' into 1856-material-take-2
git bisect skip 72aaf3934a8aa3569e455b04975d4f8ee2126dc4
# skip: [0cbe7e07f5ada444de45b3936f7378dd4f3b9d6b] Use OkHTTP to implement HTTPContext on Android.
git bisect skip 0cbe7e07f5ada444de45b3936f7378dd4f3b9d6b
# good: [49445b76f29a5b777f695a577f5153b9655370bf] Merge branch 'master' into 1940-user-location-in-sdk
git bisect good 49445b76f29a5b777f695a577f5153b9655370bf
# bad: [05a7e29d2fac31cb6e10901ee82f334a44b9ee3f] #1856 - Getting menu item checked based on style selection
git bisect bad 05a7e29d2fac31cb6e10901ee82f334a44b9ee3f
# skip: [47b7f3bbae7bdf25e3db5662a75bece1c9736795] #1856 - Adding ic_menu.png files
git bisect skip 47b7f3bbae7bdf25e3db5662a75bece1c9736795
# skip: [9b975c267a1547819dda41014e59c38c07163b9e] #1856 - Adding My Location icons for FAB
git bisect skip 9b975c267a1547819dda41014e59c38c07163b9e
# skip: [30a0617e37c30854cb53d5d1a7f3372a7dbcaaf5] #1856 - Cleaning up annotations selection option and centering map on annotation display area
git bisect skip 30a0617e37c30854cb53d5d1a7f3372a7dbcaaf5
# good: [27e24578f9f6101daa625516d0873c2b1e3464b8] Bring run-linux targets back
git bisect good 27e24578f9f6101daa625516d0873c2b1e3464b8
# skip: [d3ba9e23ea3ac396315540fd0f300ea2c453aae4] #1856 - Setting default style to Mapbox Streets
git bisect skip d3ba9e23ea3ac396315540fd0f300ea2c453aae4
# skip: [2d2966b7968fd014634d177ca76df43292cb93f9] Build correct Android ABIs on Travis
git bisect skip 2d2966b7968fd014634d177ca76df43292cb93f9
# bad: [f5a95e18d94e6a89ce05443729d5cf1ba3b41a5c] #1856 - Enabling and setting clickable state for features in Navigation Drawer menu
git bisect bad f5a95e18d94e6a89ce05443729d5cf1ba3b41a5c
# skip: [34d1c023de43a3c07d7531a156b438e625bc23d6] #1856 - Initial conversion to Material Design components
git bisect skip 34d1c023de43a3c07d7531a156b438e625bc23d6
# skip: [e2fd96b98a57c82deae38754560b9ae66225731f] Applying suggestion from Android studio to use Gradle URL with source code to enable in IDE documentation for Gradle files
git bisect skip e2fd96b98a57c82deae38754560b9ae66225731f
# skip: [7563e11eee56cd68afcb0aef41c9be28068d805c] #1856 - Adjusting compas layout back to 10dp
git bisect skip 7563e11eee56cd68afcb0aef41c9be28068d805c
# skip: [bfd039853ca397fc546c04f144c90469d0913c0c] #1856 - Adding Styles to Navigation View with separator
git bisect skip bfd039853ca397fc546c04f144c90469d0913c0c
# good: [492bcf0bd7eb62f3aedb148e103dd8ea9cb851ca] Added Update::Repaint
git bisect good 492bcf0bd7eb62f3aedb148e103dd8ea9cb851ca
# skip: [440ae9df9da2d42c056bb0aa69d80b7ff7a90d9b] #1856 - Setting up Navigation Drawer
git bisect skip 440ae9df9da2d42c056bb0aa69d80b7ff7a90d9b
# skip: [af89714b3935ea7b1ca312f9a8ce028aec04d812] Merge branch 'master' of github.com:mapbox/mapbox-gl-native
git bisect skip af89714b3935ea7b1ca312f9a8ce028aec04d812
# skip: [2f4b627f17b3086a5119a3f4157ca5b1024c6379] Merge branch 'android-tracking-modes' of git://github.com/erf/mapbox-gl-native into erf-android-tracking-modes
git bisect skip 2f4b627f17b3086a5119a3f4157ca5b1024c6379
# skip: [5b787455ddc77324e9ea2501576a767af55d3b60] #1856 - Using fixed Toolbar with no content scrolling underneath
git bisect skip 5b787455ddc77324e9ea2501576a767af55d3b60
# skip: [731608aa2428951e5e37b976c6ac48018de65be1] #1856 - Removing old toolbar and spinner setup code
git bisect skip 731608aa2428951e5e37b976c6ac48018de65be1
# bad: [b8a82d575599cfb2364e19150070031be9297d97] #1940 -Adding Null Check due to DRY initialization
git bisect bad b8a82d575599cfb2364e19150070031be9297d97
# skip: [5eebda7199025bb59ad2d28a49a197250e1d18d8] Updated Mason submodule pin
git bisect skip 5eebda7199025bb59ad2d28a49a197250e1d18d8
# skip: [fa4636ffe4d2c00446292c229cd549cbaee9e20c] Map::nudgeTransitions no longer depends on client information
git bisect skip fa4636ffe4d2c00446292c229cd549cbaee9e20c
# bad: [9fd7e883a7515f97ec4edd097a0db5cbebce3ca1] Coalesce view invalidation calls
git bisect bad 9fd7e883a7515f97ec4edd097a0db5cbebce3ca1
# first bad commit: [9fd7e883a7515f97ec4edd097a0db5cbebce3ca1] Coalesce view invalidation calls

@brunoabinader
Copy link
Member

I was able to reproduce it via iOS Simulator, working on a fix now.

Causes view to repaint when returning from pause state, fixing the black
screen perceived in some scenarios.

Fixes #2071.
@brunoabinader brunoabinader force-pushed the 2071-fix_view_invalidation branch from 55e6fbc to fa18f1a Compare August 19, 2015 08:56
@brunoabinader brunoabinader merged commit fa18f1a into master Aug 19, 2015
@brunoabinader brunoabinader deleted the 2071-fix_view_invalidation branch August 19, 2015 15:13
@brunoabinader
Copy link
Member

@1ec5 could you please verify the patch I just merged? It fixed the issue on my iPad Mini as well as iOS simulator (iPhone 6).

@robipresotto
Copy link

@brunoabinader it looks great

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 19, 2015

Looks good, thanks @brunoabinader!

AndwareSsj pushed a commit to AndwareSsj/mapbox-gl-native that referenced this pull request Nov 6, 2015
Causes view to repaint when returning from pause state, fixing the black
screen perceived in some scenarios.

Fixes mapbox#2071.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants