-
Notifications
You must be signed in to change notification settings - Fork 761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory overflow while parsing json #1600
Comments
Does your JSON contain a 124MiB string or something? I think an OOM here is a perfectly reasonable behavior, and it should be fully recoverable. |
The json string is very short, less than 100 in length, and only contains strings. I cannot repeat this problem. It is an online bug, how should I fix it? DefaultIfNullFactory.java class DefaultIfNullFactory : JsonAdapter.Factory {
} |
It looks like the heap is wildly fragmented, but Moshi is trying to append an item to a list that it's creating which is growing in size and instantiating a 124MiB backing array. That indicates a huge JSON payload. |
Fatal Exception: java.lang.OutOfMemoryError Failed to allocate a 124606360 byte allocation with 50331648 free bytes and 80MB until OOM, target footprint 503225168, growth limit 536870912 com.squareup.moshi.CollectionJsonAdapter.fromJson
The text was updated successfully, but these errors were encountered: