I am using camera 2 api in my application by following the google sample link
For the first time it is working properly. If you go back and come again many times, then the app is getting crashed saying -
[CAM_ID(0)][PREVIEW_BUF]-ERR(m_bufferCollectorThreadFunc[3196]):dequeueBuffer
failed, dequeue(5), collected(5) 2019-09-20 17:33:12.208 3250-4904/?
E/BufferQueueProducer: [SurfaceView -
com.example/com.example.FaceTrackerActivityPayment#7edb372#0#0]
dequeueBuffer: BufferQueue has been abandoned 2019-09-20 17:33:12.208
3405-15497/? E/ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer
failed 2019-09-20 17:33:12.208 3250-4904/? E/BufferQueueProducer:
[SurfaceView -
com.example/com.example.FaceTrackerActivityPayment#7edb372#0#0]
dequeueBuffer: BufferQueue has been abandoned 2019-09-20 17:33:12.208
3405-15497/? E/ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer
failed 2019-09-20 17:33:12.208 3250-4904/? E/BufferQueueProducer:
[SurfaceView -
com.example/com.example.FaceTrackerActivityPayment#7edb372#0#0]
dequeueBuffer: BufferQueue has been abandoned 2019-09-20 17:33:12.208
3405-15497/? E/ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer
failed 2019-09-20 17:33:12.208 3250-4904/? E/BufferQueueProducer:
[SurfaceView -
com.example/com.example.FaceTrackerActivityPayment#7edb372#0#0]
dequeueBuffer: BufferQueue has been abandoned 2019-09-20 17:33:12.208
3405-15497/? E/ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer
failed 2019-09-20 17:33:12.209 3250-4904/? E/BufferQueueProducer:
[SurfaceView -
com.example/com.example.FaceTrackerActivityPayment#7edb372#0#0]
dequeueBuffer: BufferQueue has been abandoned 2019-09-20 17:33:12.209
3405-15497/? E/ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer
failed 2019-09-20 17:33:12.209 3405-15497/?
E/ExynosCameraMemoryAllocator: ####ERR(alloc):*bufHandle == NULL
failed 2019-09-20 17:33:12.209 3405-15497/?
E/ExynosCameraMemoryAllocator: ERR(dequeueBuffer):alloc failed
Related
enter image description here
This is an peoject imported from Mediapipe's git :project:https://github.com/google/mediapipe/tree/master/mediapipe/examples/android/solutions
There're three modes:static image, video, live-camera. Only static image mode can run successfully, video mode and live mode will crash and have erros like this:
`*E/BufferQueueProducer: [SurfaceTexture-1-4220-0](id:107c00000000,api:4,p:431,c:4220) dequeueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [SurfaceTexture-1-4220-0](id:107c00000000,api:4,p:431,c:4220) queueBuffer: BufferQueue has been abandoned
D/GlThread: Stopping GL thread ExternalTextureConverter
E/AndroidRuntime: FATAL EXCEPTION: ExternalTextureConverter
Process: com.google.mediapipe.apps.hands, PID: 4220
java.lang.RuntimeException: Framebuffer not complete, status=36054
at com.google.mediapipe.glutil.GlThread.bindFramebuffer(GlThread.java:114)
at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.createFrame(ExternalTextureConverter.java:477)
at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.nextOutputFrame(ExternalTextureConverter.java:506)
at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.renderNext(ExternalTextureConverter.java:434)
at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.lambda$onFrameAvailable$0$com-google-mediapipe-components-ExternalTextureConverter$RenderThread(ExternalTextureConverter.java:386)
at com.google.mediapipe.components.ExternalTextureConverter$RenderThread$$ExternalSyntheticLambda0.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at com.google.mediapipe.glutil.GlThread.run(GlThread.java:141)
E/BufferQueueProducer: [SurfaceTexture-1-4220-0](id:107c00000000,api:4,p:431,c:4220) queueBuffer: BufferQueue has been abandoned*`
Is there anybody who has met this erro?And how to solve it.
after open and forceStopPackage an android app(which use openGL-es and NativeActivity 'void android_main(struct android_app* app)') in the other main Unity App many times, got this error, and the whole screeen is black...
4321-22222/? I/Adreno: DequeueBuffer: dequeueBuffer failed
123-1111/? E/BufferQueueProducer: [SurfaceView - com.xxx/com.xxx.UnityAppActivity#1] query: BufferQueue has been abandoned
123-1111/? E/BufferQueueProducer: [SurfaceView - com.xxx/com.xxx.UnityAppActivity#1] dequeueBuffer: BufferQueue has been abandoned
I'm debugging an issue with android > 7 (didn't manage to get the issue on android 6), where an application built as a launcher would result in a black screen on home key press.
I created a simple QtQuick application, with just an ApplicationWindow and a Rectangle, nothing special, just to have something visual.
In AndroidManifest.xml (generated by Qt), I added :
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
and set android:launchMode to "singleInstance" (also tried singleTask).
Tried building the app with: Qt 5.12.5/15.13.2/5.15.1, NDK 19/21 and in 99% of the builds I just get a black screen when pressing home key.
There are some rare cases where the home key works and it will open the launcher as it should (after manually launching another activity) , when that happens it keeps working till I reinstall it again.
I can't find any solution to this issue, or what could be the possible reason that in rare cases it works. Only thing I could conclude so far is that there must be a difference in execution order when the application is launched.
This are the adb logs when I launch Youtube then press home key:
09-10 14:29:05.229 4531 4600 I chromium: [4531:4600:INFO:mdns_app_filter.cc(1531)] MdnsAppFilter: Done announcing.
09-10 14:29:07.087 3184 3298 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
09-10 14:29:07.839 13637 13637 I AVUtils : createInstance(32bit) : _ZN7android19createExtendedUtilsEv
09-10 14:29:07.859 13637 13637 I AVUtils : createInstance(32bit) : _ZN7android19createExtendedUtilsEv
09-10 14:29:07.860 13637 13637 I AVUtils : Opened libavenhancements.so
09-10 14:29:07.860 13637 13637 I AVUtils : symbol _ZN7android19createExtendedUtilsEv found: (null)
09-10 14:29:07.860 13637 13637 I AVUtils : CREATE function success
09-10 14:29:07.860 13637 13637 I AVUtils : Opened libavenhancements.so
09-10 14:29:07.860 13637 13637 I AVUtils : symbol _ZN7android19createExtendedUtilsEv found: (null)
09-10 14:29:07.860 13637 13637 I AVUtils : CREATE function success
09-10 14:29:07.865 13637 13637 I AVUtils : createInstance(32bit) : _ZN7android19createExtendedUtilsEv
09-10 14:29:07.865 13637 13637 I AVUtils : symbol _ZN7android19createExtendedUtilsEv found: (null)
09-10 14:29:07.865 13637 13637 I AVUtils : CREATE function success
09-10 14:29:07.868 13637 13637 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
09-10 14:29:08.255 13637 13637 W app_process: Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
09-10 14:29:08.268 13637 13637 I app_process: The ClassLoaderContext is a special shared library.
09-10 14:29:08.376 13637 13637 D AndroidRuntime: Calling main entry com.android.commands.input.Input
09-10 14:29:08.377 13637 13637 I Input : injectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_HOME, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=9786662, downTime=9786662, deviceId=-1, source=0x101 }
09-10 14:29:08.382 13637 13637 I Input : injectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_HOME, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=9786662, downTime=9786662, deviceId=-1, source=0x101 }
09-10 14:29:08.387 3184 3261 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity (has extras)} from uid 1000
09-10 14:29:08.407 3328 3328 I vol.Events: writeEvent dismiss_dialog volume_controller
09-10 14:29:08.413 13567 13567 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy#ce7a413
09-10 14:29:08.420 13637 13637 D AndroidRuntime: Shutting down VM
09-10 14:29:08.446 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:29:08.494 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:29:08.494 2987 3068 E gralloc : ioctl c0144900 failed with code -1: Operation not permitted
09-10 14:29:08.641 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:29:08.642 2987 3068 E gralloc : ioctl c0144900 failed with code -1: Operation not permitted
09-10 14:29:08.646 13567 13567 E Qt JAVA : Surface 1 not found!
09-10 14:29:08.652 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:29:08.655 2987 3068 E gralloc : ioctl c0144900 failed with code -1: Operation not permitted
09-10 14:29:08.663 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:29:08.663 2987 3068 E gralloc : ioctl c0144900 failed with code -1: Operation not permitted
09-10 14:29:08.673 3318 3318 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3160
09-10 14:29:08.679 3318 3318 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1829
09-10 14:29:08.727 3184 3290 W HdmiCecController: Failed to send <Text View On> src: 4, dst: 0 with errorCode=1
09-10 14:29:08.743 3184 3207 I ActivityManager: Displayed org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity: +310ms (total +5s740ms)
09-10 14:29:08.903 3004 4033 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen org.qtproject.testlauncher#0
09-10 14:29:08.903 3004 4033 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen org.qtproject.testlauncher#0
09-10 14:29:08.925 7169 7169 I starboard: Prepare to suspend
09-10 14:29:08.926 7169 7169 I starboard_media: Media focus: none
09-10 14:29:08.927 4531 4531 D WargCastTvAppManager: com.google.android.youtube.tv's active state now is : false
09-10 14:29:08.927 4531 4531 D WargCastTvAppManager: Cast TV app is inactive now: com.google.android.youtube.tv
09-10 14:29:08.927 4531 4531 D WargCastTvAppManager: Cast TV app is disconnected now: com.google.android.youtube.tv
09-10 14:29:08.938 4531 4531 D WargServiceStub: TV app is closed: com.google.android.libraries.cast.tv.warg.service.internal.CastTvApp#bfa4d3f
09-10 14:29:08.939 4531 4531 I chromium: [4531:4531:INFO:application_manager_impl.cc(1532)] App stopping: AndroidNativeApp (YouTube), session_id=e0898d4e-696d-4ffb-aed7-910ddceb8a24
09-10 14:29:08.939 4531 4531 I chromium: [4531:4531:INFO:application_manager_impl.cc(1536)] App stopped: AndroidNativeApp (YouTube), session_id=e0898d4e-696d-4ffb-aed7-910ddceb8a24
09-10 14:29:08.940 4531 4531 I chromium: [4531:4531:INFO:resource_manager_impl.cc(244)] All resources released for app AndroidNativeApp (YouTube), session_id=e0898d4e-696d-4ffb-aed7-910ddceb8a24
09-10 14:29:08.940 4531 4531 E chromium: [4531:4531:ERROR:hash_util.cc(101)] Unknown app_id AndroidNativeApp
09-10 14:29:08.940 4531 4531 E chromium: [4531:4531:ERROR:cast_metrics_helper.cc(129)] No start time for app: app_id=E8C28D3C
09-10 14:29:08.940 4531 4531 I chromium: [4531:4531:INFO:application_manager_impl.cc(1791)] Focusing foreground application: session=312d0999-4abe-4b47-b2d4-6a0a87f460f7
09-10 14:29:08.941 4531 4531 I chromium: [4531:4531:INFO:api_reboot.cc(286)] active_activities count=0
09-10 14:29:08.941 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=local-client.457): CastV2.Connection.Connect.In
09-10 14:29:08.941 4531 4531 E chromium: [4531:4531:ERROR:media_classifier_manager.cc(89)] No mixer control available
09-10 14:29:08.942 4531 4531 W chromium: [4531:4531:WARNING:media_control_handler.cc(49)] Unknown player state:
09-10 14:29:08.943 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=local-client.458): CastV2.Connection.Connect.In
09-10 14:29:08.943 4531 4531 D cr_CastToNative: [NativeApplication.java:224] onDestroyed
09-10 14:29:08.944 4531 4600 I chromium: [4531:4600:INFO:mdns_cast_service.cc(780)] Device discovery state is idle
09-10 14:29:08.947 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.456): CastV2.Connection.Close.Out
09-10 14:29:08.948 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.70): CastV2.Connection.Close.Out
09-10 14:29:08.948 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.70): CastV2.Connection.Close.Out
09-10 14:29:08.949 4531 4601 E chromium: [4531:4601:ERROR:v2_transport.cc(1018)] Invalid connection: e0898d4e-696d-4ffb-aed7-910ddceb8a24:local-client.455:mediacontrol-0
09-10 14:29:08.949 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=local-client.455): CastV2.Connection.Close.Out
09-10 14:29:08.949 4531 4601 I chromium: [4531:4601:INFO:v2_transport.cc(472)] Removed Cast V2 endpoint: id=e0898d4e-696d-4ffb-aed7-910ddceb8a24
09-10 14:29:08.950 4531 4601 I chromium: [4531:4601:INFO:v2_transport.cc(1212)] Heartbeat for V2TransportImpl stopping
09-10 14:29:09.067 4531 4601 E chromium: [4531:4601:ERROR:connection_namespace_handler.cc(214)] Connection not found: e0898d4e-696d-4ffb-aed7-910ddceb8a24:ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.456:com.google.android.gms-308
09-10 14:29:09.070 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.456): CastV2.Connection.Close.In.NotFound
09-10 14:29:09.108 4531 4601 I chromium: [4531:4601:INFO:v2_ssl_socket.cc(356)] Stop reading on pending closed socket
09-10 14:29:09.180 7169 7169 W ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs.
09-10 14:29:09.208 3184 3290 W HdmiCecController: Failed to send <Give Device Power Status> src: 4, dst: 0 with errorCode=1
09-10 14:29:09.194 7169 7169 I chatty : uid=10041(com.google.android.youtube.tv) identical 4 lines
09-10 14:29:09.197 7169 7169 W ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs.
09-10 14:29:09.307 7309 7317 W System : A resource failed to call close.
09-10 14:29:09.354 3184 3193 I system_server: Background concurrent copying GC freed 30729(1568KB) AllocSpace objects, 9(372KB) LOS objects, 19% free, 8MB/10MB, paused 326us total 204.430ms
09-10 14:29:09.398 7169 7240 W ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs.
I believe this is the main issue E Qt JAVA : Surface 1 not found! as it's not outputted in case when the home key works.
Then there is this case when I just press home key while having only launcher open:
09-10 14:35:43.408 14291 14291 I AVUtils : createInstance(32bit) : _ZN7android19createExtendedUtilsEv
09-10 14:35:43.418 14291 14291 I AVUtils : createInstance(32bit) : _ZN7android19createExtendedUtilsEv
09-10 14:35:43.418 14291 14291 I AVUtils : Opened libavenhancements.so
09-10 14:35:43.419 14291 14291 I AVUtils : symbol _ZN7android19createExtendedUtilsEv found: (null)
09-10 14:35:43.419 14291 14291 I AVUtils : CREATE function success
09-10 14:35:43.419 14291 14291 I AVUtils : Opened libavenhancements.so
09-10 14:35:43.419 14291 14291 I AVUtils : symbol _ZN7android19createExtendedUtilsEv found: (null)
09-10 14:35:43.419 14291 14291 I AVUtils : CREATE function success
09-10 14:35:43.419 14291 14291 I AVUtils : createInstance(32bit) : _ZN7android19createExtendedUtilsEv
09-10 14:35:43.419 14291 14291 I AVUtils : symbol _ZN7android19createExtendedUtilsEv found: (null)
09-10 14:35:43.419 14291 14291 I AVUtils : CREATE function success
09-10 14:35:43.419 14291 14291 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
09-10 14:35:43.484 4531 4600 I chromium: [4531:4600:INFO:mdns_app_filter.cc(2604)] MdnsAppFilter: responses sent in 40 seconds: 8
09-10 14:35:43.645 14291 14291 W app_process: Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
09-10 14:35:43.650 14291 14291 I app_process: The ClassLoaderContext is a special shared library.
09-10 14:35:43.718 14291 14291 D AndroidRuntime: Calling main entry com.android.commands.input.Input
09-10 14:35:43.719 14291 14291 I Input : injectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_HOME, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=10182003, downTime=10182003, deviceId=-1, source=0x101 }
09-10 14:35:43.723 14291 14291 I Input : injectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_HOME, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=10182003, downTime=10182003, deviceId=-1, source=0x101 }
09-10 14:35:43.727 3328 3328 I vol.Events: writeEvent dismiss_dialog volume_controller
09-10 14:35:43.728 3184 3261 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity (has extras)} from uid 1000
09-10 14:35:43.729 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.482): CastV2.Connection.Connect.In
09-10 14:35:43.747 14291 14291 D AndroidRuntime: Shutting down VM
09-10 14:35:43.751 4531 4601 E chromium: [4531:4601:ERROR:v2_transport.cc(853)] Not supported namespace: namespace=urn:x-cast:com.google.cast.multizone, conn=receiver-ad21cedb-cca5-1e11-0a29-1be0dd74fbc7:ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.482:com.google.android.gms-334
09-10 14:35:43.777 14155 14155 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy#1336c23
09-10 14:35:43.781 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:35:43.781 2987 3068 E gralloc : ioctl c0144900 failed with code -1: Operation not permitted
09-10 14:35:43.804 4531 4601 I chromium: [4531:4601:INFO:v2_ssl_socket.cc(356)] Stop reading on pending closed socket
09-10 14:35:43.821 2987 3068 I [Gralloc]: framebuffer hal alread move to hwcomposer
09-10 14:35:43.821 2987 3068 E gralloc : ioctl c0144900 failed with code -1: Operation not permitted
09-10 14:35:43.912 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.912 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.913 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.913 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.914 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.915 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.915 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.918 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.919 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.920 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.920 14155 14195 W libtestlauncher.so: QEGLPlatformContext: eglSwapBuffers failed: 300d
09-10 14:35:43.921 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.921 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.921 3004 3053 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.922 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.924 3004 3259 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.924 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.924 3004 3056 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.925 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.925 3004 3259 E BufferQueueProducer: [SurfaceView - org.qtproject.testlauncher/org.qtproject.qt5.android.bindings.QtActivity#0] dequeueBuffer: BufferQueue has been abandoned
09-10 14:35:43.926 14155 14195 E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
09-10 14:35:43.926 14155 14195 W libtestlauncher.so: QEGLPlatformContext: eglSwapBuffers failed: 300d
09-10 14:35:44.069 3184 3290 W HdmiCecController: Failed to send <Text View On> src: 4, dst: 0 with errorCode=1
09-10 14:35:44.548 3184 3290 W HdmiCecController: Failed to send <Give Device Power Status> src: 4, dst: 0 with errorCode=1
09-10 14:35:46.135 4531 4601 I chromium: [4531:4601:INFO:metrics_recorder.cc(261)] Cast v2 action(socket_id=ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.483): CastV2.Connection.Connect.In
09-10 14:35:46.154 4531 4601 E chromium: [4531:4601:ERROR:v2_transport.cc(853)] Not supported namespace: namespace=urn:x-cast:com.google.cast.multizone, conn=receiver-ad21cedb-cca5-1e11-0a29-1be0dd74fbc7:ad21cedb-cca5-1e11-0a29-1be0dd74fbc7.483:com.google.android.gms-335
09-10 14:35:46.172 4531 4601 I chromium: [4531:4601:INFO:v2_ssl_socket.cc(356)] Stop reading on pending closed socket
Different behaviour, but I guess the main issue here is E [EGL-ERROR]: __egl_platform_dequeue_buffer:1817: failed to dequeue buffer from native window 0xd21a0808; err = -19, buf = 0x0,max_allowed_dequeued_buffers 3
Is there any way to fix this, as it seems like an Android/Qt issue? I'm all out of ideas what to try any more.
SCROLL DOWN TO SEE THE ERROR MESSAGE
On occasion my app expects input from the user. When he does enter something, I use Toasts to display that the input was accepted.
And so far... this worked great! But eventually I noticed, when I started spamming the input button the app would freeze.
After some trial and error, I noticed, the problem was neither the button spamming nor the creation of Toasts.
So you can follow my conclusion, I am gonna list here the most important points.
(On a side note: I am working in Kotlin and haven't tried other languages)
Spamming a button with the following onClickListener freezes the app
myButton.setOnClickListener {
Toast.makeText(this, "myText", Toast.LENGTH_SHORT).show()
}
At first I thought there might be a problem with my button, but in the end there was nothing wrong with it. (I am not gonna post code from the button, since you can use an auto-generated one)
I then came to the conclusion that the problem may come from the generation of Toasts. After all, according to the error message, there seems to be a buffer overflow.
So I tried creating only one toast and display that one.
class... {
val toast = Toast.makeText(this, "myText", Toast.LENGTH_SHORT)
override fun onCreate(savedInstanceState: Bundle?) {
...
myButton.setOnClickListener{
toast.show()
}
}
}
I still get the same error:
2019-03-15 18:41:08.128 5098-5122/project.path E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -2147483646
2019-03-15 18:41:08.551 779-779/? E/Fence: merge: sync_merge("StatusBar#0:0", 831, 865) returned an error: Too many open files (-24)
2019-03-15 18:41:08.586 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:08.586 779-1025/? E/BufferQueueProducer: [Toast#115] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:08.587 779-779/? E/Fence: merge: sync_merge("Toast#83:2", 831, 1008) returned an error: Too many open files (-24)
2019-03-15 18:41:08.620 779-779/? E/Fence: merge: sync_merge("Toast#83:2", 787, 943) returned an error: Too many open files (-24)
2019-03-15 18:41:08.638 779-869/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:08.638 779-869/? E/BufferQueueProducer: [Toast#116] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:08.649 779-869/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.649 779-869/? E/BufferQueueProducer: [Toast#115] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.651 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.651 779-1025/? E/BufferQueueProducer: [Toast#115] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.652 779-869/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.652 779-869/? E/BufferQueueProducer: [Toast#115] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.654 779-779/? E/Fence: merge: sync_merge("Toast#83:2", 787, 974) returned an error: Too many open files (-24)
2019-03-15 18:41:08.663 779-869/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.663 779-869/? E/BufferQueueProducer: [Toast#116] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.665 779-869/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.665 779-869/? E/BufferQueueProducer: [Toast#116] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.666 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.666 779-1025/? E/BufferQueueProducer: [Toast#116] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.687 779-779/? E/Fence: merge: sync_merge("Toast#85:2", 974, 888) returned an error: Too many open files (-24)
2019-03-15 18:41:08.720 779-779/? E/Fence: merge: sync_merge("Toast#85:2", 807, 814) returned an error: Too many open files (-24)
2019-03-15 18:41:08.754 779-779/? E/Fence: merge: sync_merge("Toast#85:2", 807, 831) returned an error: Too many open files (-24)
2019-03-15 18:41:08.771 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:08.771 779-1025/? E/BufferQueueProducer: [Toast#117] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:08.787 779-779/? E/Fence: merge: sync_merge("Toast#85:2", 807, 847) returned an error: Too many open files (-24)
2019-03-15 18:41:08.821 779-779/? E/Fence: merge: sync_merge("Toast#85:2", 807, 875) returned an error: Too many open files (-24)
2019-03-15 18:41:08.824 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:08.824 779-2417/? E/BufferQueueProducer: [Toast#118] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:08.832 779-779/? E/Fence: merge: sync_merge("Toast#114:2", 880, 991) returned an error: Too many open files (-24)
2019-03-15 18:41:08.835 779-869/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.835 779-869/? E/BufferQueueProducer: [Toast#117] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.836 779-869/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.836 779-869/? E/BufferQueueProducer: [Toast#117] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.837 779-869/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.837 779-869/? E/BufferQueueProducer: [Toast#117] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.849 779-869/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.849 779-869/? E/BufferQueueProducer: [Toast#118] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.851 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 857) returned an error: Too many open files (-24)
2019-03-15 18:41:08.851 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 857) returned an error: Too many open files (-24)
2019-03-15 18:41:08.851 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.851 779-2417/? E/BufferQueueProducer: [Toast#118] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.851 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:08.851 779-2417/? E/BufferQueueProducer: [Toast#118] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:08.871 779-779/? E/Fence: merge: sync_merge("Toast#85:2", 855, 991) returned an error: Too many open files (-24)
2019-03-15 18:41:08.904 779-779/? E/Fence: merge: sync_merge("Toast#87:2", 991, 909) returned an error: Too many open files (-24)
2019-03-15 18:41:08.937 779-779/? E/Fence: merge: sync_merge("Toast#87:2", -1, 814) returned an error: Too many open files (-24)
2019-03-15 18:41:08.938 779-779/? E/Fence: merge: sync_merge("Toast#88:2", 991, 814) returned an error: Too many open files (-24)
2019-03-15 18:41:08.976 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:08.976 779-867/? E/BufferQueueProducer: [Toast#119] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:08.977 3669-3684/? E/FusionService: is80211dEnabled true
2019-03-15 18:41:09.001 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 932) returned an error: Too many open files (-24)
2019-03-15 18:41:09.001 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 932) returned an error: Too many open files (-24)
2019-03-15 18:41:09.002 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 932) returned an error: Too many open files (-24)
2019-03-15 18:41:09.008 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.008 779-1025/? E/BufferQueueProducer: [Toast#120] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.020 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.020 779-1025/? E/BufferQueueProducer: [Toast#119] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.021 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.021 779-1025/? E/BufferQueueProducer: [Toast#119] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.022 779-2417/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.023 779-2417/? E/BufferQueueProducer: [Toast#119] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.028 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.028 779-2417/? E/BufferQueueProducer: [Toast#120] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.036 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.037 779-2417/? E/BufferQueueProducer: [Toast#120] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.038 779-867/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.038 779-867/? E/BufferQueueProducer: [Toast#120] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.038 779-779/? E/Fence: merge: sync_merge("Toast#87:2", 814, 949) returned an error: Too many open files (-24)
2019-03-15 18:41:09.052 779-779/? E/Fence: merge: sync_merge("Toast#107:2", 958, 982) returned an error: Too many open files (-24)
2019-03-15 18:41:09.069 779-779/? E/Fence: merge: sync_merge("Toast#108:2", 982, 831) returned an error: Too many open files (-24)
2019-03-15 18:41:09.083 2571-5992/? E/NetworkScheduler: Invalid component specified.
2019-03-15 18:41:09.085 779-779/? E/Fence: merge: sync_merge("Toast#109:2", 982, 1006) returned an error: Too many open files (-24)
2019-03-15 18:41:09.122 779-779/? E/Fence: merge: sync_merge("Toast#87:2", 958, 973) returned an error: Too many open files (-24)
2019-03-15 18:41:09.139 2571-5991/? E/NetworkScheduler: Invalid component specified.
2019-03-15 18:41:09.158 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.158 779-867/? E/BufferQueueProducer: [Toast#121] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.184 779-779/? E/HwcComposer: executeCommands failed because of Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
2019-03-15 18:41:09.184 779-779/? E/HWComposer: presentAndGetReleaseFences: failed for display 0: NoResources (6)
2019-03-15 18:41:09.185 779-779/? E/Fence: merge: sync_merge("Toast#101:2", 847, 880) returned an error: Too many open files (-24)
2019-03-15 18:41:09.190 779-867/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.191 779-867/? E/BufferQueueProducer: [Toast#122] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.196 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.196 779-867/? E/BufferQueueProducer: [Toast#121] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.197 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.197 779-867/? E/BufferQueueProducer: [Toast#121] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.197 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.197 779-1025/? E/BufferQueueProducer: [Toast#121] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.204 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.204 779-1025/? E/BufferQueueProducer: [Toast#122] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.205 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.205 779-1025/? E/BufferQueueProducer: [Toast#122] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.206 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.206 779-1025/? E/BufferQueueProducer: [Toast#122] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.222 779-779/? E/Fence: merge: sync_merge("Toast#88:2", 814, 845) returned an error: Too many open files (-24)
2019-03-15 18:41:09.223 779-779/? E/Fence: merge: sync_merge("Toast#102:2", 880, 814) returned an error: Too many open files (-24)
2019-03-15 18:41:09.304 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.304 779-1025/? E/BufferQueueProducer: [Toast#123] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.322 779-779/? E/Fence: merge: sync_merge("Toast#89:2", 814, 847) returned an error: Too many open files (-24)
2019-03-15 18:41:09.358 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.358 779-1025/? E/BufferQueueProducer: [Toast#124] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.369 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.369 779-867/? E/BufferQueueProducer: [Toast#123] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.370 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.370 779-867/? E/BufferQueueProducer: [Toast#123] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.372 779-867/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.372 779-867/? E/BufferQueueProducer: [Toast#123] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.385 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.385 779-2417/? E/BufferQueueProducer: [Toast#124] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.386 779-1025/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.387 779-1025/? E/BufferQueueProducer: [Toast#124] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.387 779-2417/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.387 779-2417/? E/BufferQueueProducer: [Toast#124] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.389 779-779/? E/Fence: merge: sync_merge("Toast#89:2", 814, 831) returned an error: Too many open files (-24)
2019-03-15 18:41:09.508 779-1025/? E/GraphicBufferAllocator: Failed to allocate (224 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.508 779-1025/? E/BufferQueueProducer: [Toast#125] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.539 779-779/? E/Fence: merge: sync_merge("Toast#91:2", 963, 831) returned an error: Too many open files (-24)
2019-03-15 18:41:09.543 779-867/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 900: 5
2019-03-15 18:41:09.543 779-867/? E/BufferQueueProducer: [Toast#126] allocateBuffers: failed to allocate buffer (0 x 0, format 0, usage 0)
2019-03-15 18:41:09.570 779-779/? E/HwcComposer: executeCommands failed because of Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
2019-03-15 18:41:09.570 779-779/? E/HWComposer: presentAndGetReleaseFences: failed for display 0: NoResources (6)
2019-03-15 18:41:09.570 779-779/? E/Fence: merge: sync_merge("Toast#91:2", -1, 831) returned an error: Too many open files (-24)
2019-03-15 18:41:09.570 779-779/? E/Fence: merge: sync_merge("Toast#92:2", 963, 831) returned an error: Too many open files (-24)
2019-03-15 18:41:09.583 779-2542/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.583 779-2542/? E/BufferQueueProducer: [Toast#126] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.584 779-2542/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.584 779-2542/? E/BufferQueueProducer: [Toast#126] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.585 779-867/? E/GraphicBufferAllocator: Failed to allocate (623 x 98) layerCount 1 format 1 usage 10000900: 5
2019-03-15 18:41:09.585 779-867/? E/BufferQueueProducer: [Toast#126] dequeueBuffer: createGraphicBuffer failed
2019-03-15 18:41:09.601 779-779/? E/HwcComposer: executeCommands failed because of Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
2019-03-15 18:41:09.601 779-779/? E/HWComposer: presentAndGetReleaseFences: failed for display 0: NoResources (6)
2019-03-15 18:41:09.602 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 1006) returned an error: Too many open files (-24)
2019-03-15 18:41:09.602 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 1006) returned an error: Too many open files (-24)
2019-03-15 18:41:09.614 779-779/? E/GLConsumer: [project.path/activity.exampleClass#0] doGLFenceWait: error dup'ing fence fd: 24
2019-03-15 18:41:09.614 779-779/? E/Surface: dequeueBuffer: error duping fence: 24
2019-03-15 18:41:09.619 779-779/? E/HwcComposer: executeCommands failed because of Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
2019-03-15 18:41:09.619 779-779/? E/HWComposer: presentAndGetReleaseFences: failed for display 0: NoResources (6)
2019-03-15 18:41:09.619 779-779/? E/Fence: merge: sync_merge("FramebufferSurface:2", 1006, 875) returned an error: Too many open files (-24)
2019-03-15 18:41:09.619 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 1008) returned an error: Too many open files (-24)
2019-03-15 18:41:09.620 779-779/? E/Fence: merge: sync_merge("LayerRelease", -1, 1008) returned an error: Too many open files (-24)
Now to the question: Did somebody else encounter this error and found a fix? My workaround so far is to disable the button spamming.
I also tried displaying Toasts in their own UI-Thread, but that didn't work. (The tip came from here: Toast is crashing Application, even inside thread)
Maybe this fix works for one of you, which means, I must have done a mistake.
Thanks for your help in advance!
There is a RecyclerView in my page and filled with TextureViews:
Activity page capture in my demo
I use eglCreateWindowSurface() to create EGLSurface for every TextureViews(SurfaceTexture), and use eglDestroySurface() to destroy them when the
Activity is not visible (Stopped).
When i launch several Activities like this, i get an exception as below:
E Parcel : dup() failed in Parcel::read, i is 1, fds[i] is -1, fd_count is 2, error: Too many open files
E BufferQueueProducer: [SurfaceTexture-0-9639-1066] dequeueBuffer: createGraphicBuffer failed
E Parcel : dup() failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 2, error: Too many open files
E BufferQueueProducer: [SurfaceTexture-0-9639-1066] dequeueBuffer: createGraphicBuffer failed
E Parcel : dup() failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 2, error: Too many open files
E BufferQueueProducer: [SurfaceTexture-0-9639-1066] dequeueBuffer: createGraphicBuffer failed
E Parcel : dup() failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 2, error: Too many open files
E BufferQueueProducer: [SurfaceTexture-0-9639-1066] dequeueBuffer: createGraphicBuffer failed
....
E Surface : dequeueBuffer: error duping fence: 24
E Parcel : dup() failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 2, error: Too many open files
E Surface : dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -22
E Parcel : dup() failed in Parcel::read, i is 1, fds[i] is -1, fd_count is 2, error: Too many open files
E Surface : dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -22
E Parcel : dup() failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 2, error: Too many open files
E Surface : dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -22
E Surface : dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -2147483646
E GLConsumer: [SurfaceTexture-0-9639-1084] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1085] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1086] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1087] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1088] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1089] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1090] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
E GLConsumer: [SurfaceTexture-0-9639-1091] syncForReleaseLocked: error dup'ing native fence fd: 0x3000
E OpenGLRenderer: Failed to detach SurfaceTexture from context -2147483648
Does anyone have suggestions for solving this problem?
Thanks.