Repository navigation
BufferQueue has no connected producer #763
Description
Activity
I tried to use Hybrid composition as descripted here: https://flutter.dev/docs/development/platform-integration/platform-views
This works very well, map keeps visible after orientation change.
BUT: docs say that < Android 10 this method results in bad performance (have not tested this). Therefore you could maybe use this only in newer Android versions and prior Android 10 use the current AndroidView solution. Just an idea.Test code (android only!):
@override Widget buildView(Map<String, dynamic> creationParams, OnPlatformViewCreatedCallback onPlatformViewCreated, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers) { return PlatformViewLink( viewType: "plugins.flutter.io/mapbox_gl", surfaceFactory: (BuildContext context, PlatformViewController controller) { return AndroidViewSurface( controller: controller as AndroidViewController, gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{}, hitTestBehavior: PlatformViewHitTestBehavior.opaque, ); }, onCreatePlatformView: (PlatformViewCreationParams params) { return PlatformViewsService.initSurfaceAndroidView( id: params.id, viewType: "plugins.flutter.io/mapbox_gl", layoutDirection: TextDirection.ltr, creationParams: creationParams, creationParamsCodec: StandardMessageCodec(), onFocus: () { params.onFocusChanged(true); }, ) ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) ..create(); }, ); }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.
@tobrun We're also experiencing this issue - could it possibly be reopened?
Also experiencing this issue...
should be fixed by #916
Reacted by Levente MorvaThis 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.
Could we have a status on this ? Or a quick fix maybe ? Our clients are experiencing this issue. Thanks
you can try testing with flutter 2.13 beta as well as turning on hybrid composition
Thanks for the quick answer, how do I turn on hybrid composition in mapbox 15.0?
Using hybrid composition makes the map come on top of the page when coming back from background just like in #954
Same issue here, the whole map goes black or white (depends on the project). Black screen (real project) / White screen (minimal project).
It appear that we reproduce this issue only on Android 12.Is there someone who have a work around ? Or a fix ?
We tried with the latest commit of the master branch of Mapbox but still having this black/white screen.
Log error are spamming this :
E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producer E/BufferQueueProducer( 4219): [SurfaceTexture-0-4219-2](id:107b0000000c,api:0,p:-1,c:4219) dequeueBuffer: BufferQueue has no connected producerWe managed to reproduce this white screen with our minimal project also. But it is random, sometimes it is when we do too much work with the app (click, move, resize, ...), and sometimes it is when we launch the app:
double dynamicHeight = 10; void _otherAction() async { _resize(); } Future<void> _resize() async { setState(() { // This call to setState tells the Flutter framework that something has // changed in this State, which causes it to rerun the build method below // so that the display can reflect the updated values. If we changed // _counter without calling setState(), then the build method would not be // called again, and so nothing would appear to happen. if (dynamicHeight > 100) dynamicHeight = 20; dynamicHeight = dynamicHeight * 2; }); } Widget build(BuildContext context) { return Scaffold( body: Column( children: [ Container( height: dynamicHeight, width: 50, color: Colors.pink, ), Expanded( child: Stack( children: [ MapboxMap( accessToken: <ACCESS_TOKEN>, styleString: <MAP_STYLE>, minMaxZoomPreference: MinMaxZoomPreference(3, 22), initialCameraPosition: CameraPosition( target: LatLng(46.227, 2.213), zoom: 6, ), onMapCreated: (controller) { mapboxMapController = controller; }, ), Align( alignment: Alignment.bottomLeft, child: FloatingActionButton( child: const SizedBox( height: 40, width: 40, ), onPressed: () { _otherAction(); }, ), ), ], ), ), Container( height: dynamicHeight, width: 50, color: Colors.pink, ), ], ), ); }Here is a video of the issue, Pixel 4 Android 12 :
https://user-images.githubusercontent.com/53431511/173813441-8d9ce31c-9568-4c08-abdf-e77a0fb50c22.mp4@felix-ht can we get a status on this ? Right now we have to choose between this bug and the crash when turning on hybrid composition
Reacted by Kelven GalvãoAny status on this?
Found out that in [#0feb12bce79da96e5e54c1c422cebc9f2dee799c](0feb12b) the line
.textureMode(true)was removed.Adding this line again resolves the issue for me. Though my logcat gets flooded with
E/FrameEvents(30825): updateAcquireFence: Did not find frame.messages.Any objections to adding this line again to the MapboxBuilder?
I can reproduce this 100% on Galaxy S8 with Android 9, and randomly on Galaxy S10 with Android 12

running example app I get this after orientation change:
map disappears. Just white container.
After some more changes of orientation map comes back visible.
This happens on Google Pixel 6