Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponse

未关闭
#320 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Tarquinen 已经在做这个了。

开始于 2026年11月26日。

  • #327 来自 @Tarquinen —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
android, kotlin
领域
mobile

调研方向

Start by reading LiveTransport.kt at the reported onResponse location, line 117, and inspect the response body handling around ResponseBody.bytes(). Use the crash stack trace to trace how the response is consumed and look for a way to avoid loading an unbounded body into memory. Confirm the fix with a regression test for oversized responses; pull request #327 is already open against this issue.

由索引模型根据 Issue 内容生成。

描述

crash crash-triaged

Google Play reported this crash (Android vitals).

  • Exception: java.lang.OutOfMemoryError
  • Where: ai.opencode.server.live.LiveTransportKt$awaitResponse$2$2.onResponse
  • Last 7 days: 15 reports from about 2 users
  • Version codes: 380–1015
  • Android API levels: 33–36
  • Last seen: 2026-11-27
  • Sample: Oppo CPH2145, Android API 33, version code 380, commit 82079247e
Exception java.lang.OutOfMemoryError
  at okio.Buffer.readByteArray (Buffer.kt:1164)
  at okio.Buffer.readByteArray (Buffer.kt:1159)
  at okio.RealBufferedSource.readByteArray (RealBufferedSource.kt:267)
  at okhttp3.ResponseBody.bytes (ResponseBody.kt:125)
  at ai.opencode.server.live.LiveTransportKt$awaitResponse$2$2.onResponse (LiveTransport.kt:117)
  at okhttp3.internal.connection.RealCall$AsyncCall.run (RealCall.kt:584)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1154)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:652)
  at java.lang.Thread.run (Thread.java:1564)

Play Console (needs access):

主要语言
Kotlin
星标
146
派生
35
平均合并
7 小时 41 分钟
30 天内合并 PR
221

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode-android 的其他 Issue

查看 anomalyco/opencode-android 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。