gpt4 book ai didi

android - 缓冲区溢出 - Android 中没有可用空间崩溃

转载 作者:太空狗 更新时间:2023-10-29 14:40:48 25 4
gpt4 key购买 nike

因此,我经常遇到此缓冲区溢出崩溃 (393238)。

我刚刚修复的一个例子是,当我运行 Log.d("test", null) 时,我遇到了崩溃。

如果我删除这行代码,就不会发生崩溃。

据我所知,我的代码中的每一个错误,无论是 ArrayOutOfBounds、不正确的类型、空异常等等,都会导致缓冲区溢出崩溃。

我不知道为什么会这样。为什么 Android 不能优雅地处理和返回异常消息,而不是一直用缓冲区溢出消息使程序崩溃?

此外,我已经尝试通过 usb 调试、Nexus 模拟器等在我自己的手机上运行。仍然发生。

这是确切的信息:

W/ErrorProcessor: onFatalError, processing error from engine(4)
com.google.android.apps.gsa.shared.speech.a.g: Error reading from input stream
at com.google.android.apps.gsa.staticplugins.recognizer.i.a.a(SourceFile:342)
at com.google.android.apps.gsa.staticplugins.recognizer.i.a$1.run(SourceFile:1367)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
at com.google.android.apps.gsa.speech.audio.Tee.g(SourceFile:2531)
at com.google.android.apps.gsa.speech.audio.ap.read(SourceFile:555)
at java.io.InputStream.read(InputStream.java:101)
at com.google.android.apps.gsa.speech.audio.al.run(SourceFile:362)
at com.google.android.apps.gsa.speech.audio.ak$1.run(SourceFile:471)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
at java.lang.Thread.run(Thread.java:761) 
at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85) 

最佳答案

我也遇到过这种情况。我的应用程序在我的主计算机上从 android studio 在真正的 android 平板电脑和平板电脑模拟器上运行良好。当我在我的笔记本电脑上做完全相同的事情时,我遇到了这个崩溃,对于真实设备和模拟器。

我最终通过删除项目构建目录并执行“工具”->“AVD 管理器”->“操作删除数据”来“修复它”。然后我重建/运行了项目并且它工作了。去图...

关于android - 缓冲区溢出 - Android 中没有可用空间崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48597547/

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