Android App freezes/crashes when too much Toasts are being displayed - android
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!
Related
FCNT Arrows F-41B device appear Native Crash In libmedia_omx.so
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!
Adreno: DequeueBuffer: dequeueBuffer failed BufferQueueProducer: [SurfaceView -] query: BufferQueue has been abandoned. App by Android&Unity black
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
Camera 2 api showing BufferQueue has been abandoned
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
BufferQueueProducer: [SurfaceTexture-0-9639-1066] dequeueBuffer: createGraphicBuffer failed
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.
mmap failed - GL error: Out of memory
Have a fragment implemented that has multiple horizontal scrollviews. When i scroll it multiple times it simply blacks out and on popback the complete application gets blacked out, until the system creates a new instance of activity. To be noted : Not using hardware accelerator Couldn't understand a thing given here. Tried to lookup solution not an option have to use scroll view LOGCAT 01-20 21:35:18.737 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 01-20 21:35:18.737 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <gsl_ldd_control:475>: ioctl fd 27 code 0x40080921 (IOCTL_KGSL_SHAREDMEM_FREE) failed: errno 22 Invalid argument 01-20 21:35:18.746 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2260>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory 01-20 21:35:18.748 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 01-20 21:35:18.757 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2260>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory 01-20 21:35:18.759 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 01-20 21:35:18.768 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2260>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory 01-20 21:35:18.770 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 01-20 21:35:18.770 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <gsl_ldd_control:475>: ioctl fd 27 code 0x40080921 (IOCTL_KGSL_SHAREDMEM_FREE) failed: errno 22 Invalid argument 01-20 21:35:18.778 29857-30181/com.amplitude.tron.volksradio22 E/OpenGLRenderer: GL error: Out of memory! 01-20 21:35:53.215 29857-29857/com.amplitude.tron.volksradio22 W/SplitWindow: update focus...
Got the OOM exception covered by adding this to the manifest : android:largeHeap="true"