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 }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
MapboxGL becomes unresponsive on OnePlus 2 and Location move but MapView is frozen #8030
@tobrun Actually tried, but still no results.
Actually problem appears by itself, without any user interaction.
Map responds to user actions, because we handle map movements. But not updating view\layer which displays map and layers. (We add objects to some new layer, and they're also "freezing" with map)
Also tested on MapboxSDKTestApp, where problem appears too.
@puzanov We don't have access to this device, and it's unlikely we're going to be able to determine the cause with so little information. You're going to have to dig into this a bit more yourself. Here are some suggestions:
Try other devices or configurations for comparison
Add logging to the code to determine where it starts failing
Attach a debugger after the freeze occurs and obtain a stack trace
1.) A low effort test would be to run the random tests on Amazon device farm. It should be able to reproduce basic issues caused by scrolling/pressing random keys.
2.) I can confirm that in the past I've tested the sample app on One Plus One (AWS) and One Plus Two(Real device) and I did not run into any issue.
I did this test at a time when mapbox used to publish 32 bit ARM binaries for ARM V8 as well. You can try removing the armv8 folder from the release. This will force the system to pick up the 32 bit version when running the application.
@mb12 we tried to force use 32 bit, with no results
I do not know how it's working on your phone, in mine it works few sec and after map just stops updating. Could you try to open simple map and zoom until city shows up?
And I also opened fragment and activity, the same story, but in dialog fragment it works very clever.
@jfirebaugh I launched on other phones and there app works fine.
Add logging to the code to determine where it starts failing // where should I insert Logging ?
@puzanov would you be able to do some debugging from your end as we don't have access to a OnePlus2? Could you add some breakpoints to MapView#onDraw(Canvas) and see if the flags checked there are still valid. Is MapView#OnTouchEvent(MotionEvent) still being called when the map "freezes"? Are you seeing the same result when switching to TextureView (you can enable this option through xml attrs or MapboxMapOptions).
@tobrun hi, I have same issue and I try your way, the result is: MapView#onDraw(Canvas) and MapView#OnTouchEvent(MotionEvent) still being called every when the map being "freezes".
I enable TextureMode and OMG, Its work !, map no longer "freezes". But I think this not a best solution, right? I don't known what happen in another device which can't work with TextureView and of course, about the performance , Hope you fix it in next release, anw, thank you so much for your support (bow)
@tobrun one more thing, what do you think about change from SurfaceView to TextureView, I meant should I sacrifice performance, for fix bug of a little bit of users ? and how I know about performance difference between two way, exactly ? Please give me a suggestion, thank you so much, again (bow)
One possible source of this bug is using an inner fragment in another fragment and using the Activity FragmentManager instead of the ChildFragmentManager of the fragment. See #9661.
@GianhTran the difference between SurfaceView and TextureView is that a TextureView will use a Texture to display the rendered content. While surfaceView allows to direclty render on the surface. Benefit of this is that SurfaceView will be more performant. Benefit of using TextureView is that it supports animation and has better synchronsitation for overlain view elements.
Same issue is with me using latest sdk v5.1.3 I am using in activity So any update
Here is my log:
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mapbox.mapboxsdk.maps.NativeMapView.createSurface(android.view.Surface)' on a null object reference at com.mapbox.mapboxsdk.maps.MapView$SurfaceCallback.surfaceCreated(MapView.java:426)
I got exactly the same issue : I have a map in a bottomsheet, which is in textureMode because of visual glitches when I drag the bottomsheet, and if I collapse the bottomsheet and expand it back, the map is totally frozen, not responding to user interaction, but MarkersViews are moving okay.
Finally the map is only working correctly on the first display.
I retrieved these logs when it happens :
01-18 14:49:19.297 15642-17390/fr.xpdigit.apptourism E/BufferQueueProducer: [SurfaceTexture-0-15642-2] dequeueBuffer: BufferQueue has no connected producer
[ 01-18 14:49:19.297 15642:17390 D/ ]
NULL == surf->write_back_color_buffer
01-18 14:49:19.300 15642-17390/fr.xpdigit.apptourism E/BufferQueueProducer: [SurfaceTexture-0-15642-2] dequeueBuffer: BufferQueue has no connected producer
[ 01-18 14:49:19.301 15642:17390 D/ ]
I am using the last MapBox Android SDK Version (5.3.1) and I reproduced the issue on multiple devices : Samsung A3 (2016) SM-1310F on Android 7.0, Samsung S7 on Android 7.0, Moto E on Android 4.4.4, Nexus 5 on Android 6.0.1. But the issue is not reproduced on the Nexus 5X on Android 8.0.
I hope that it will help you to resolve this issue guys.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
puzanov commentedon Feb 14, 2017
any updates?
tobrun commentedon Feb 15, 2017
@puzanov sadly we don't have a OnePlus2 for testing. Would you be able to try something out?
Do you still see the issue when you do:
Can you try disabling touch interaction on that viewgroup?
dastan1302 commentedon Feb 15, 2017
@tobrun Actually tried, but still no results.

Actually problem appears by itself, without any user interaction.
Map responds to user actions, because we handle map movements. But not updating view\layer which displays map and layers. (We add objects to some new layer, and they're also "freezing" with map)
Also tested on MapboxSDKTestApp, where problem appears too.
dastan1302 commentedon Feb 15, 2017
With 5th version the same story
puzanov commentedon Feb 15, 2017
@tobrun please help! we are suffering
puzanov commentedon Feb 16, 2017
@tobrun any updates?
jfirebaugh commentedon Feb 16, 2017
@puzanov We don't have access to this device, and it's unlikely we're going to be able to determine the cause with so little information. You're going to have to dig into this a bit more yourself. Here are some suggestions:
mb12 commentedon Feb 16, 2017
@puzanov You can try the following:
1.) A low effort test would be to run the random tests on Amazon device farm. It should be able to reproduce basic issues caused by scrolling/pressing random keys.
https://aws.amazon.com/device-farm/device-list/
2.) I can confirm that in the past I've tested the sample app on One Plus One (AWS) and One Plus Two(Real device) and I did not run into any issue.
I did this test at a time when mapbox used to publish 32 bit ARM binaries for ARM V8 as well. You can try removing the armv8 folder from the release. This will force the system to pick up the 32 bit version when running the application.
dastan1302 commentedon Feb 16, 2017
@mb12 we tried to force use 32 bit, with no results
I do not know how it's working on your phone, in mine it works few sec and after map just stops updating. Could you try to open simple map and zoom until city shows up?
And I also opened fragment and activity, the same story, but in dialog fragment it works very clever.
@jfirebaugh I launched on other phones and there app works fine.
Add logging to the code to determine where it starts failing // where should I insert Logging ?
tobrun commentedon Feb 16, 2017
Feel free to capture the logcat from a session and dump it into a gist.
dastan1302 commentedon Feb 20, 2017
@tobrun @jfirebaugh Test App Debug Mode screen , sdk 5.0.0-beta1 (for older logs the same)
https://gist.github.com/MrDazt/628be50c5c7817a92fa0ec84c3031d2c
puzanov commentedon Feb 22, 2017
@tobrun @jfirebaugh guys, any updates on this issue? Our users are crying :(
puzanov commentedon Feb 24, 2017
guys?
puzanov commentedon Mar 3, 2017
hey
tobrun commentedon Mar 6, 2017
@puzanov would you be able to do some debugging from your end as we don't have access to a OnePlus2? Could you add some breakpoints to
MapView#onDraw(Canvas)and see if the flags checked there are still valid. IsMapView#OnTouchEvent(MotionEvent)still being called when the map "freezes"? Are you seeing the same result when switching to TextureView (you can enable this option through xml attrs or MapboxMapOptions).GianhTran commentedon Jul 24, 2017
@tobrun hi, I have same issue and I try your way, the result is:
MapView#onDraw(Canvas)andMapView#OnTouchEvent(MotionEvent)still being called every when the map being "freezes".I enable TextureMode and OMG, Its work !, map no longer "freezes". But I think this not a best solution, right? I don't known what happen in another device which can't work with TextureView and of course, about the performance , Hope you fix it in next release, anw, thank you so much for your support (bow)
GianhTran commentedon Jul 24, 2017
@tobrun one more thing, what do you think about change from SurfaceView to TextureView, I meant should I sacrifice performance, for fix bug of a little bit of users ? and how I know about performance difference between two way, exactly ? Please give me a suggestion, thank you so much, again (bow)
tobrun commentedon Aug 2, 2017
One possible source of this bug is using an inner fragment in another fragment and using the Activity FragmentManager instead of the ChildFragmentManager of the fragment. See #9661.
@GianhTran the difference between SurfaceView and TextureView is that a TextureView will use a Texture to display the rendered content. While surfaceView allows to direclty render on the surface. Benefit of this is that SurfaceView will be more performant. Benefit of using TextureView is that it supports animation and has better synchronsitation for overlain view elements.
GianhTran commentedon Aug 4, 2017
@tobrun thank you so much for your support, but in my case, I using mapView in activity so your solution not work for me.
NancyAndroid commentedon Aug 31, 2017
Same issue is with me using latest sdk v5.1.3 I am using in activity So any update
Here is my log:
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mapbox.mapboxsdk.maps.NativeMapView.createSurface(android.view.Surface)' on a null object reference at com.mapbox.mapboxsdk.maps.MapView$SurfaceCallback.surfaceCreated(MapView.java:426)
NancyAndroid commentedon Aug 31, 2017
@GianhTran any update how you resolve this issue.
gang018 commentedon Dec 20, 2017
@NancyAndroid did you got a solution?
tobrun commentedon Jan 4, 2018
Capturing from related issues that using TextureView can be a workaround for this.
HappyDr0id commentedon Jan 18, 2018
I got exactly the same issue : I have a map in a bottomsheet, which is in textureMode because of visual glitches when I drag the bottomsheet, and if I collapse the bottomsheet and expand it back, the map is totally frozen, not responding to user interaction, but MarkersViews are moving okay.
Finally the map is only working correctly on the first display.
I retrieved these logs when it happens :
I am using the last MapBox Android SDK Version (5.3.1) and I reproduced the issue on multiple devices : Samsung A3 (2016) SM-1310F on Android 7.0, Samsung S7 on Android 7.0, Moto E on Android 4.4.4, Nexus 5 on Android 6.0.1. But the issue is not reproduced on the Nexus 5X on Android 8.0.
I hope that it will help you to resolve this issue guys.
stale commentedon Oct 28, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commentedon Dec 6, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.