Closed deRonbrown closed 6 months ago
I observe exactly the same crash in my app. Also on Samsung Galaxy S24 Ultra only at the moment.
Edit: currently my app uses Mapbox SDK version: 10.14.0
@deRonbrown @WolfgangK can you also share your build version? Could it be that you're using some sort of beta build (e.g. https://developer.samsung.com/one-ui-beta)?
I tested on Samsung Z Fold 4 with Android 14 (build number UP1A.231005.007.F936BXXS5EXAB) - I see no crashes.
Unfortunately don't know the exact build version, I see the crashes on the Google Play Console from my users. Only Galaxy S24 devices are affected. I guess they don't have a beta build.
After further searching for a solution I saw that other apps (especially games, like Pokemon Go for example) also have similar problems on the Galaxy S24. I guess, the crashes are related.
me too, my magic 6 pro with Android 14 also crash, Mapbox SDK version is 11.2.0
Disable supportsPbo in PixelReader can fix this issue.
try {
map?.javaClass?.classLoader?.loadClass("com.mapbox.maps.renderer.gl.PixelReader")?.let {clz->
val field = clz.getDeclaredField("supportsPbo")
field.isAccessible = true
field.set(null, false)
}
}catch (t:Throwable){
MyLog.logE(TAG, "screenshot error", t)
}
```
Disable supportsPbo in PixelReader can fix this issue.
try { map?.javaClass?.classLoader?.loadClass("com.mapbox.maps.renderer.gl.PixelReader")?.let {clz-> val field = clz.getDeclaredField("supportsPbo") field.isAccessible = true field.set(null, false) } }catch (t:Throwable){ MyLog.logE(TAG, "screenshot error", t) } ```
@maonanyue thanks for sharing this. I do not have the device that reproduces this crash but if you say that supportsPbo = false
fixes the issue - we could provide this fallback on SDK level if reading pixels with PBO fails with an exception. Noting that this still looks like a vendor specific issue and hopefully should be fixed by Samsung in upcoming updates.
I got the same problem. And I don't know how to fix it. Mapbox Version:10.10.0
Thank you very much. Your approach solved my problem. @kiryldz
Just in case noting that the fix was included in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.3.0-rc.1 and will be included in v10.17.0 coming out next week so workaround from https://github.com/mapbox/mapbox-maps-android/issues/2280#issuecomment-1982758900 will be no longer needed.
Great, thank you! Special thanks to @maonanyue !
@kiryldz Hello, this is still an issue with 10.17 or 11.3, app still crashing on galaxy s24 ultra when calling snapshot
@kiryldz Hello, this is still an issue with 10.17 or 11.3, app still crashing on galaxy s24 ultra when calling snapshot
😞 Sorry, I did not have the device to verify and catching the native exception in Java out-of-the-box did not work. Well, then for now https://github.com/mapbox/mapbox-maps-android/issues/2280#issuecomment-1982758900 remains the easy workaround... It will be much more tricky to make this part of SDK then.
Ok, workaround won't work starting with 11.3.x though as supportsPbo
is not static anymore
@kiryldz Hello, this is still an issue with 10.17 or 11.3, app still crashing on galaxy s24 ultra when calling snapshot
😞 Sorry, I did not have the device to verify and catching the native exception in Java out-of-the-box did not work. Well, then for now #2280 (comment) remains the easy workaround... It will be much more tricky to make this part of SDK then.
you can verify in Samsung's Remote Test Lab using SM-S928 (galaxy s24 ultra )
Shouldn't this issue be reopened? Or do we need to create another?
This is still crashing a lot for us, and the workaround isn't working for me.
This is still crashing a lot for us, and the workaround isn't working for me.
Workaround work until 10.16
Hey all, next week in v11.4.0-rc.1 we will expose experimental MapView.setSnapshotLegacyMode(true|false)
API allowing to fallback to legacy / worse way of making a MapView snapshot but as proved in https://github.com/mapbox/mapbox-maps-android/issues/2280#issuecomment-1982758900 and comments below - helping with those specific Samsung devices.
Porting this to v10.17.1 is also planned, perhaps slightly later.
Edit: this is actually available in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.4.0-beta.3 already.
Edit: available in https://github.com/mapbox/mapbox-maps-android/releases/tag/v10.17.1 as well.
@kiryldz 在有些机型上还是有崩溃,在firebase中有显示,
Environment
Observed behavior and steps to reproduce
When taking a snapshot of a
MapView
, the app crashes with a native crash with the following stacktrace:Expected behavior
A snapshot is successful without crashing.
Notes / preliminary analysis
So far, this only appears to be an issue on Samsung Galaxy S24+ and Galaxy S24 Ultra devices running Android 14. We haven't yet gotten this crash reported on other devices running Android 14. I've been using Samsung's Remote Test Lab to test our app and the linked sample project below.
Additional links and references
Sample project: https://github.com/deRonbrown/MapboxSnapshotCrash