Skip to content
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

JsonRead java.lang.AssertionError #1089

Closed
wangkaitutu opened this issue Jan 21, 2019 · 15 comments
Closed

JsonRead java.lang.AssertionError #1089

wangkaitutu opened this issue Jan 21, 2019 · 15 comments

Comments

@wangkaitutu
Copy link

The version I used is 2.5.4, and there are the following problems. I have checked the question bank and found similar problems, but I did not explicitly say whether they have been solved.

01-21 10:44:37.221 29312 29503 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #4

13901-21 10:44:37.221 29312 29503 E AndroidRuntime: Process: com.esky.echat, PID: 29312
14001-21 10:44:37.221 29312 29503 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
14101-21 10:44:37.221 29312 29503 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:353)
14201-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
14301-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
14401-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271)
14501-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
14601-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
14701-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
14801-21 10:44:37.221 29312 29503 E AndroidRuntime: Caused by: java.lang.AssertionError
14901-21 10:44:37.221 29312 29503 E AndroidRuntime: at android.util.JsonReader.peek(JsonReader.java:363)
15001-21 10:44:37.221 29312 29503 E AndroidRuntime: at android.util.JsonReader.expect(JsonReader.java:308)
15101-21 10:44:37.221 29312 29503 E AndroidRuntime: at android.util.JsonReader.beginObject(JsonReader.java:293)
15201-21 10:44:37.221 29312 29503 E AndroidRuntime: at com.airbnb.lottie.parser.LottieCompositionParser.parse(Unknown Source:44)
15301-21 10:44:37.221 29312 29503 E AndroidRuntime: at com.airbnb.lottie.LottieComposition$Factory.fromJsonSync(Unknown Source:0)
15401-21 10:44:37.221 29312 29503 E AndroidRuntime: at com.airbnb.lottie.parser.AsyncCompositionLoader.doInBackground(Unknown Source:3)
15501-21 10:44:37.221 29312 29503 E AndroidRuntime: at com.airbnb.lottie.parser.AsyncCompositionLoader.doInBackground(Unknown Source:2)
15601-21 10:44:37.221 29312 29503 E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:333)
15701-21 10:44:37.221 29312 29503 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
15801-21 10:44:37.221 29312 29503 E AndroidRuntime: ... 3 more

@gpeal
Copy link
Collaborator

gpeal commented Jan 25, 2019

@wangkaitutu Please attach the animation

@wangkaitutu
Copy link
Author

Only some mobile phones have this problem, and the mobile version is basically above 8.0

1 similar comment
@wangkaitutu
Copy link
Author

Only some mobile phones have this problem, and the mobile version is basically above 8.0

@gpeal
Copy link
Collaborator

gpeal commented Jan 28, 2019

@wangkaitutu What pattern/specific brands, etc?

@muchen1
Copy link

muchen1 commented Feb 11, 2019

@gpeal ,I have the same problem。My version is 2.5.5.1,the crash was happened on Andorid 8.1 and 8.0。Will this problem resolve if I upgrade the version to 2.6.0? #667

@gpeal
Copy link
Collaborator

gpeal commented Feb 11, 2019

@muchen1 Will you try 3.0.0-beta1?

@wangkaitutu
Copy link
Author

@ muchen1你会尝试 3.0.0-beta1吗?

The highest version is 2.8.0, not seen 3.0.0-beta1

@muchen1
Copy link

muchen1 commented Feb 11, 2019

@muchen1 Will you try 3.0.0-beta1?
But our supports projects have not been migrated to androidx,we can't upgrade the version above 2.8.0。Only upgrade 3.0.0-beta1 can resolve this problem?

@muchen1
Copy link

muchen1 commented Feb 11, 2019

@muchen1 Will you try 3.0.0-beta1?

Or can you tell me how to find the place that cause the problem in my animation files?

@gpeal
Copy link
Collaborator

gpeal commented Feb 11, 2019

@muchen1 It is on maven central

@gpeal
Copy link
Collaborator

gpeal commented Feb 16, 2019

I'm pretty sure that this is related to multiple reads of the same file at the same time. 2.6.0 and above will join existing composition tasks and I'm pretty sure this problem will go away. Let me know if you see this on 3.0.0-beta1 (beta2 coming out soon).

@gpeal gpeal closed this as completed Feb 16, 2019
@Abelzzg
Copy link

Abelzzg commented Feb 21, 2019

I'm pretty sure that this is related to multiple reads of the same file at the same time. 2.6.0 and above will join existing composition tasks and I'm pretty sure this problem will go away. Let me know if you see this on 3.0.0-beta1 (beta2 coming out soon).

My project has the same crash with v2.7.0,but my project hasn't migrate to Androidx,how can i fix this problem with v2.7.0?

@gpeal
Copy link
Collaborator

gpeal commented Feb 21, 2019

Duplicate of #667

@gpeal gpeal marked this as a duplicate of #667 Feb 21, 2019
@1wayticket
Copy link

I'm pretty sure that this is related to multiple reads of the same file at the same time. 2.6.0 and above will join existing composition tasks and I'm pretty sure this problem will go away. Let me know if you see this on 3.0.0-beta1 (beta2 coming out soon).

My project has the same crash with v2.7.0,but my project hasn't migrate to Androidx,how can i fix this problem with v2.7.0?

We have the same problem with you. We have three LottieAnimationView in the same Xml. So can you tell me have you found the solution? Whatever,Thank you very much.

@galihuotui
Copy link

mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants