2017-02-24 105 views
12

我有一个带有直播功能的MediaPlayer应用程序。当我使用物理设备(API 22 Lollipop和API 23 Marshmallow)测试应用程序时,启动流时没有任何问题。 今天我想用模拟器(API 25牛轧糖)测试应用程序。流不工作,我得到以下错误:GsaIOException缓冲区溢出,没有可用空间

(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)  02-23 23:58:09.834 2166-3554/com.google.android.googlequicksearchbox:search 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) 

我只能认识到一件事,我认为它是重要的。

GsaIOException: Error code: 393238 | Buffer overflow, no available space

但我不知道它可能意味着什么。任何人都可以解释它是什么样的例外。并且我可以在代码中搜索以查找问题?

+0

不确定,但您是否在虚拟设备上安装了SD卡? – sschrass

回答

1

我确实收到了同样的问题,并且我做了以下事情以使此崩溃发生。 由于文件需要解析并保存在缓冲区中,因此我写了很少的api需要分配一些内存。我开始解析文件而不分配缓冲区,因此收到了该消息。 所以你可以看看类似的代码,你可能会做同样的事情。

1

我有一个类似的问题,对我来说,它也在设备上崩溃,同样的错误。这是我的固定它的设备:

<uses-permission android:name="android.permission.RECORD_AUDIO" /> 

更多细节在这里:Looping Error on Android Emulator

如果要对模拟器的应用程序的工作,从上面的链接应用此修复程序后,我必须创建一种新的基于模拟器在x86架构上(不像以前的x86_64),它工作。

0

我已经通过删除之前创建的apk文件解决了这个问题,它们仍然保留在Project Files列表中。