gpt4 book ai didi

android - 出队缓冲区 : can't dequeue multiple buffers without setting the buffer count

转载 作者:行者123 更新时间:2023-12-01 23:05:59 30 4
gpt4 key购买 nike

我在 Android 4.4.2 Moto X 2013 WebView 应用程序中的 Rhomobile 5.0.2 上收到以下错误。该应用程序使用 SDK 19minAPI 17 编译。

经过一些研究,这似乎是 Snapdragon 800 / Adreno GPU devices 的问题:

herehere 谷歌问题跟踪器 上此问题的链接

禁用硬件加速并不是一个真正的选择,因为它会使 WebView 非常缓慢。

由于错误是:

dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

如何在 com.rhomobile.rhodes.RhodesActivity 中设置缓冲区计数?
11-08 18:28:31.227: I/SFPerfTracer(238):      triggers: (rate: 0:0) (423387 sw vsyncs) (0 skipped) (0:361861 vsyncs) (2:863582)
11-08 18:28:31.328: W/Adreno-EGLSUB(4749): <DequeueBuffer:593>: dequeue native buffer fail: Unknown error 2147483646, buffer=0x61213afc, handle=0x0
11-08 18:28:31.331: W/Adreno-EGLSUB(4749): <SwapBuffers:1343>: Invalid native buffer. Failed to queueBuffer
11-08 18:28:31.331: W/Adreno-EGLSUB(4749): <updater_thread:456>: native buffer is NULL
11-08 18:28:31.346: E/BufferQueue(238): [com.myapp.myapp/com.rhomobile.rhodes.RhodesActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
11-08 18:28:31.346: W/Adreno-EGLSUB(4749): <DequeueBuffer:593>: dequeue native buffer fail: Invalid argument, buffer=0x61213afc, handle=0x0
11-08 18:28:31.347: W/Adreno-ES20(4749): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY
11-08 18:28:31.347: W/Adreno-EGL(4749): <qeglDrvAPI_eglSwapBuffers:3596>: EGL_BAD_SURFACE
11-08 18:28:31.347: W/HardwareRenderer(4749): EGL error: EGL_BAD_SURFACE
11-08 18:28:31.352: W/HardwareRenderer(4749): Mountain View, we've had a problem here. Switching back to software rendering.
11-08 18:28:31.478: D/qdgralloc(4749): Invalid gralloc handle (at 0x0): ver(-1/12) ints(-1/12) fds(-1/2) magic(????/gmsm)
11-08 18:28:31.478: W/GraphicBufferMapper(4749): lock(...) failed -22 (Invalid argument)
11-08 18:28:31.478: W/Surface(4749): failed locking buffer (handle = 0x0)
11-08 18:28:31.531: E/ViewRootImpl(4749): Could not lock surface
11-08 18:28:31.531: E/ViewRootImpl(4749): java.lang.IllegalArgumentException
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.Surface.nativeLockCanvas(Native Method)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.Surface.lockCanvas(Surface.java:243)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2466)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2440)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2284)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1914)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1024)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5796)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.Choreographer.doFrame(Choreographer.java:544)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.os.Handler.handleCallback(Handler.java:733)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.os.Handler.dispatchMessage(Handler.java:95)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.os.Looper.loop(Looper.java:136)
11-08 18:28:31.531: E/ViewRootImpl(4749): at android.app.ActivityThread.main(ActivityThread.java:5102)
11-08 18:28:31.531: E/ViewRootImpl(4749): at java.lang.reflect.Method.invokeNative(Native Method)
11-08 18:28:31.531: E/ViewRootImpl(4749): at java.lang.reflect.Method.invoke(Method.java:515)
11-08 18:28:31.531: E/ViewRootImpl(4749): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
11-08 18:28:31.531: E/ViewRootImpl(4749): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
11-08 18:28:31.531: E/ViewRootImpl(4749): at dalvik.system.NativeStart.main(Native Method)

最佳答案

这是一个内存不足问题,如下所示:

11-08 18:28:31.347: W/Adreno-ES20(4749): <gl2_surface_swap:43>:GL_OUT_OF_MEMORY

android.view.Surface正在进行更多更新,然后 GPU 可以处理。我不确定您是否可以尝试捕获这个。
我还相信,在许多没有崩溃的设备上,用户偶尔会遇到 UI 延迟。
几年前我也遇到过类似的问题。就我而言,主要是滞后,但我相信问题是一样的。
为了解决这个问题,我添加了一个计数器来测量帧速率。我看到帧率很高,但突然它下降得很厉害,所以我应用了平衡逻辑来搜索不会滞后的最高 FPS。
  • 以 60 FPS 开始
  • 如果滞后,将 FPS 除以 2
  • 如果不是,则将其设置为最后一个值和当前值之间的平均值。
  • 重复直到你开心;)

  • 它基本上是对完美 FPS 的二分搜索。
    在您的情况下,这有点棘手,因为您会遇到崩溃,因此您必须保留 FPS 计数器,并且在搜索时更加小心。
    将 FPS 日志发送到您的服务器。一旦你有足够的数据,你可以更聪明地使用每个设备模块的 FPS 起点。
    至于把你的手放在 WebView SurfaceView 上,我想这也不是微不足道的,但我们谈论的是 Android 4.4.2,所以你不能用反射做任何事情 :)

    关于android - 出队缓冲区 : can't dequeue multiple buffers without setting the buffer count,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26823953/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com