ktor: New crash in 1.3.1 on iOS in ReleaseHeapRefStrict

Ktor Version and Engine Used (client or server and name) Common client (HttpClient { … } so default engine) on iOS (arm64) version 1.3.1

Describe the bug Upgrading from 1.3.0 to 1.3.1 introduces a new fatal error which crashes the app, with very little details.

To Reproduce I don’t have a reproducer, but the error really looks like #1380. It somehow happens 100% of the time when my app starts, but not on the first request. Weird.

Screenshots

Main thread when the crash occurs: image Associated line of code: JSON_INDENTED.stringify(JsonElementSerializer, Json.plain.parseJson(maybeJson)) JSON_INDENTED is Json(JsonConfiguration(prettyPrint = true, indent = " ")) maybeJson is a String representation of the received body, which I’m about to log. It’s a custom request Logging feature. Note that I did not change the version of kotlinx.serialization

Thread inside which the crash occurred: image You can see references to ReleaseHeapRefStrict like in #1380.

I also see these logs in 1.3.0, I don’t see them in 1.3.1 and I feel like it crashes before they appear

2020-02-14 15:25:55.352209+0100 MyTarget[4159:1595620] [] tcp_input [C44.1:3] flags=[R] seq=295735571, ack=0, win=0 state=LAST_ACK rcv_nxt=295735571, snd_una=390992163
2020-02-14 15:25:55.354843+0100 MyTarget[4159:1595620] [] tcp_input [C44.1:3] flags=[R] seq=295735571, ack=0, win=0 state=CLOSED rcv_nxt=295735571, snd_una=390992163

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 17 (16 by maintainers)

Most upvoted comments

The bug reproduced, and the fix is mostly done. Sorry for the delay.