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.
Related
I had an Native Crash In FCNT Arrows F-41B device. When I play Ad,This is follow error Stack
# CodecLooper(12543)
SIGSEGV(SEGV_MAPERR)
#00 pc 000000000001f2b4 /system/lib64/libmedia_omx.so (android::hardware::media::omx::V1_0::utils::LWOmxNode::freeNode()+52) [arm64-v8a::d6ca6ad0aa6b451025aea9b50df3a511]
#01 pc 000000000009cdc8 /system/lib64/libstagefright.so (android::ACodec::LoadedState::onShutdown(bool)+128) [arm64-v8a::3a0f159449aafa5318775893fbfa1be5]
3
java:
4
[Failed to get Java stack]`
Log printing before errors:
`12312-29 23:18:37.554 900 6264 E ACodec : signalError(omxError 0x80001001, internalError -2)
12412-29 23:18:37.554 900 6264 E ACodec : [c2.android.avc.decoder] configureCodec returning error -2
12512-29 23:18:37.554 900 6264 E ACodec : signalError(omxError 0x80001001, internalError -2)
12612-29 23:18:37.554 900 6263 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 3/CONFIGURING
12712-29 23:18:37.555 900 6263 D SurfaceUtils: disconnecting from surface 0xb40000709bb72c70, reason disconnectFromSurface
12812-29 23:18:37.555 900 6263 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 0/UNINITIALIZED
12912-29 23:18:37.555 900 2389 E MediaCodec: configure failed with err 0xfffffffe, resetting...
130--------- beginning of crash
13112-29 23:18:37.600 6268 6264 F libc : fdsan: attempted to close file descriptor 293, expected to be unowned, actually owned by unique_fd 0x6f2bbf50d4
13212-29 23:18:38.647 6270 6270 E chromium: [1229/231838.646784:ERROR:process_memory_range.cc(75)] read out of range
13412-29 23:18:39.369 900 900 I Choreographer: Skipped 101 frames! The application may be doing too much work on its main thread.
13912-29 23:18:39.389 900 6264 E npth : Native crash was detected!
All of the sudden, when trying to deploy and debug QT Android app that's what I get. The app gets deployed just fine and runs just fine however GDB dies. Already tried removing entire Android-SDK folder and redownloading. Is it really the time to wipe-out the entire QT installation (again) ?
Two message boxes are shown:
Title:"Executable Failed"
Msg: Command aborted"
Title: "Unexpected GDB Exit - QT Creator"
Msg: "The GDB process terminated unexpectedly (exit code 0)."
App log:
10:22:07: Debugging starts W main : type=1400 audit(0.0:86622):
avc: granted { read } for pid=18154 name="u:object_r:net_dns_prop:s0"
dev="tmpfs" ino=1835 scontext=u:r:untrusted_app_25:s0:c512,c768
tcontext=u:object_r:net_dns_prop:s0 tclass=file I ect.PROJECT_NAMEoke:
Late-enabling -Xcheck:jni E ect.PROJECT_NAMEoke: Unknown bits set in
runtime_flags: 0x8000 I ect.PROJECT_NAMEoke: Reinit property:
dalvik.vm.checkjni= false W re-initialized>: type=1400
audit(0.0:86623): avc: denied { read } for pid=18154
name="u:object_r:mmi_prop:s0" dev="tmpfs" ino=1831
scontext=u:r:untrusted_app_25:s0:c512,c768
tcontext=u:object_r:mmi_prop:s0 tclass=file permissive=0 E libc :
Access denied finding property "runtime.mmitest.isrunning" D
ActivityThread: Attach thread to application W ActivityThread:
Application org.qtproject.PROJECT_NAMEoken is waiting for the debugger
on port 8100... I System.out: Sending WAIT chunk I System.out:
Debugger has connected I System.out: waiting for debugger to settle...
I System.out: waiting for debugger to settle... Could not load shared
library symbols for 312 libraries, e.g.
/system/lib/libandroid_runtime.so. Use the "info sharedlibrary"
command to see the complete listing. Do you need "set
solib-search-path" or "set sysroot"?I System.out: debugger has settled
(7129) I ect.PROJECT_NAMEoke: The ClassLoaderContext is a special
shared library. I ect.PROJECT_NAMEoke: QarthPatchMonintor::Init 01-10
10:22:16.053 18154 18154 I ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::StartWatch 01-10 10:22:16.053 18154 18154 I
ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::WatchPackage: /data/hotpatch/fwkhotpatch/ 01-10
10:22:16.054 18154 18154 I ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::CheckAndWatchPatch:
/data/hotpatch/fwkhotpatch/org.qtproject.PROJECT_NAMEoken 01-10
10:22:16.054 18154 18154 I ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/all
01-10 10:22:16.054 18154 18154 I ect.PROJECT_NAMEoke: I
ect.PROJECT_NAMEoke: QarthPatchMonintor::Run 01-10 10:22:16.054 18154
18154 I ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::Reading 01-10 10:22:16.055 18154 18207 I
ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::CheckNotifyEvent 01-10 10:22:16.055 18154 18207 I
ect.PROJECT_NAMEoke: I ect.PROJECT_NAMEoke:
QarthPatchMonintor::CheckNotifyEvent before read 01-10 10:22:16.055
18154 18207 I ect.PROJECT_NAMEoke: I HwApiCacheMangerEx: apicache
path=/storage/emulated/0 state=mounted
key=org.qtproject.PROJECT_NAMEoken#10165#256 I HwApiCacheMangerEx:
apicache path=/storage/emulated/0 state=mounted
key=org.qtproject.PROJECT_NAMEoken#10165#0 I AwareBitmapCacher: init
processName:org.qtproject.PROJECT_NAMEoken pid=18154 uid=10165 V
ActivityThread: callActivityOnCreate W System : ClassLoader
referenced unknown path: E AwareLog: AtomicFileUtils: readFileLines
file not exist: android.util.AtomicFile#cb0695 V HwWidgetFactory: :
successes to get AllImpl object and return.... I
OverScrollerOptimization: start init SmartSlideOverScroller and get
the overscroller config I OverScrollerOptimization: get the
overscroller config W WindowDecorActionBar: should not do the
transition or the transition anim is null or it is running or the
mContainer view is null or mContainer view hasn't been drawn to screen
D HwGalleryCacheManagerImpl: mIsEffect:false D Qt JAVA : Class
org.qtproject.qt5.android.multimedia.QtMultimediaUtils does not
implement setActivity method I QtCore : Start I Qt : qt started
D ActivityThread: add activity client record, r=
ActivityRecord{7b59680 token=android.os.BinderProxy#fba4a25
{org.qtproject.PROJECT_NAMEoken/org.qtproject.qt5.android.bindings.QtActivity}}
token= android.os.BinderProxy#fba4a25 D HiTouch_PressGestureDetector:
onAttached, package=org.qtproject.PROJECT_NAMEoken, windowType=1,
mHiTouchRestricted=false I iGraphics: [0020080c] pn:
org.qtproject.PROJECT_NAMEoken, p: 18154 I iGraphics: [0030050c] PV 10
I iGraphics: [0030050c] no element 'igfx' I iGraphics: [0030050c]
LoadCloudParams lib file success. E Parcel : Reading a NULL string
not supported here. D mali_winsys: EGLint
new_window_surface(egl_winsys_display *, void *, EGLSurface,
EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000 W
Gralloc3: mapper 3.x is not supported E :
APS:IFLoad:importExternalFunctions, search function
createNewHwApsUtils failed, dlsym err:undefined symbol:
createNewHwApsUtils D : APS:importExternalFunctions OK I
HwViewRootImpl: removeInvalidNode jank list is null W System.err:
java.lang.ClassNotFoundException: Didn't find class
"org.qtproject.qt5.android.network.QtNetwork" on path:
DexPathList[[],nativeLibraryDirectories=[/system/lib]] W System.err:
at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
W System.err: at
java.lang.ClassLoader.loadClass(ClassLoader.java:379) W System.err:
at java.lang.ClassLoader.loadClass(ClassLoader.java:312) D
libPROJECT_NAMEoken_armeabi-v7a.so: QML Debugger: Waiting for
connection on port 16963... D libPROJECT_NAMEoken_armeabi-v7a.so:
About to request permissions D libPROJECT_NAMEoken_armeabi-v7a.so:
Permissions granted W libPROJECT_NAMEoken_armeabi-v7a.so:
qrc:/main.qml:176:5: QML Connections: Implicitly defined onFoo
properties in Connections are deprecated. Use this syntax instead:
function onFoo() { ... } W libEGL : EGLNativeWindowType
0xceced1c8 disconnect failed D mali_winsys: EGLint
new_window_surface(egl_winsys_display *, void *, EGLSurface,
EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000 D
mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *,
EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns
0x3000 I Camera : open camera: 0, package name:
org.qtproject.PROJECT_NAMEoken D HwFrameworkSecurityPartsFactory:
HwFrameworkSecurityPartsFactory in. I HwFrameworkSecurityPartsFactory:
add HwFrameworkSecurityPartsFactory to memory. I HwCameraUtil:
notifySurfaceFlingerCameraStatus : isFront = false , isOpend = true D
SensorManager: 0xb24f49c8 addFd fd=107 W Gralloc3: allocator 3.x is
not supported W libEGL : EGLNativeWindowType 0xb96c3008 disconnect
failed D mali_winsys: EGLint new_window_surface(egl_winsys_display *,
void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean)
returns 0x3000 D libPROJECT_NAMEoken_armeabi-v7a.so: needed to resize
D libPROJECT_NAMEoken_armeabi-v7a.so: size: 0 , new size: 6220800 D
AwareBitmapCacher: handleInit switch not opened pid=18154
The app runs fine as usually.
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!
I am trying this example app on qt's website. It builds without error and when I tried to run on a Samsung J7 with Android 8.1.0, it the white screen comes up and then the app crashes. In the Qt creator, this message shows as application output
E Zygote : isWhitelistProcess - Process is Whitelisted
E libpersona: scanKnoxPersonas
E libpersona: Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SM-G610F_8.1.0_0008, [-1 -1 -1 -1 0 1]
I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=org.qtproject.example.androidTest4
I zygote : Late-enabling -Xcheck:jni
D ActivityThread: Added TimaKeyStore provider
D MDO : MDO if sIsMdo=false, sIsCheckMdo=false, uid = 10234
D Proxy : mdoP is null: 10234
W System : ClassLoader referenced unknown path:
I QtCore : Start
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Qml.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Gui.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Quick.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Widgets.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Svg.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Sensors.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Xml.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5QuickParticles.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5QuickTemplates2.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5QuickControls2.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" has unsupported flags DT_FLAGS_1=0x81
I Qt : qt start
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/plugins/bearer/libqandroidbearer.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/plugins/sensors/libqtsensors_android.so" has unsupported flags DT_FLAGS_1=0x81
I Qt : Sensors start
I zygote : Do partial code cache collection, code=29KB, data=27KB
I zygote : After code cache collection, code=29KB, data=27KB
I zygote : Increasing code cache capacity to 128KB
D OpenGLRenderer: HWUI GL Pipeline
I zygote : Do partial code cache collection, code=60KB, data=59KB
I zygote : After code cache collection, code=60KB, data=59KB
I zygote : Increasing code cache capacity to 256KB
I zygote : Do full code cache collection, code=125KB, data=102KB
I zygote : After code cache collection, code=109KB, data=78KB
D : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
D InputTransport: Input channel constructed: fd=56
D ViewRootImpl#74fba6a[QtActivity]: setView = DecorView#fbadb5b[QtActivity] TM=true MM=false
W Activity: AppLock checkAppLockState locked:false verifying:false pkgName = org.qtproject.example.androidTest4 isInMultiWindowMode:false showWhenLocked:false
D ViewRootImpl#74fba6a[QtActivity]: dispatchAttachedToWindow
V Surface : sf_framedrop debug : 0x4f4c, game : false, logging : 0
D ViewRootImpl#74fba6a[QtActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 3756800000} changed=true
I zygote : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 2
D libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : org.qtproject.example.androidTest4
D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1
D OpenGLRenderer: eglCreateWindowSurface = 0xe1f0ebc0, 0xdfec3808
D ViewRootImpl#74fba6a[QtActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
D ViewRootImpl#74fba6a[QtActivity]: MSG_WINDOW_FOCUS_CHANGED 1
V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#aa71336 nm : org.qtproject.example.androidTest4 ic=null
D InputMethodManager: startInputInner - Id : 0
I InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D InputTransport: Input channel constructed: fd=65
D vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper#2.0-impl.so from current namespace instead of sphal namespace.
V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#2c1d237 nm : org.qtproject.example.androidTest4 ic=null
D InputMethodManager: startInputInner - Id : 0
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtSensors/libdeclarative_sensors.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.so" has unsupported flags DT_FLAGS_1=0x81
W libandroidTest4.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
W libandroidTest4.so: (null):0 ((null)): qrc:/main.qml:42 Cannot assign to non-existent property "footer"
08-23 11:53:51.290 11578 11648 W libandroidTest4.so:
D ViewRootImpl#74fba6a[QtActivity]: MSG_WINDOW_FOCUS_CHANGED 0
D InputTransport: Input channel destroyed: fd=65
D OpenGLRenderer: eglDestroySurface = 0xe1f0ebc0, 0xdfec3800
D ViewRootImpl#74fba6a[QtActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
"org.qtproject.example.androidTest4" died.
Since I have no prior experience in developing Android on Qt, I have no idea how to solve this issue. The setup in Qt for Android has the latest Android SDK, JRE inside the Android Studio folder and Android NDK version 17. Any guidance is appreciated.