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

[Bug] 2.16.4: java.lang.Long cannot be cast to java.lang.Integer #14348

Closed
david-allison opened this issue Aug 29, 2023 · 6 comments · Fixed by #14398
Closed

[Bug] 2.16.4: java.lang.Long cannot be cast to java.lang.Integer #14348

david-allison opened this issue Aug 29, 2023 · 6 comments · Fixed by #14398
Labels
2.16 Bug Good First Issue! Help Wanted Requesting Pull Requests from volunteers
Milestone

Comments

@david-allison
Copy link
Member

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
	at android.app.SharedPreferencesImpl.getInt(SharedPreferencesImpl.java:302)
	at org.acra.startup.LimiterStartupProcessor.processReports(SourceFile:55)
	at org.acra.startup.StartupProcessorExecutor.processReports$lambda$6$lambda$5(SourceFile:104)
	at org.acra.startup.StartupProcessorExecutor.a(Unknown Source:0)
	at n.a.run(Unknown Source:6)
	at java.lang.Thread.run(Thread.java:764)

https://ankidroid.org/acra/app/1/bug/70522/report/c5932e9a-3d95-4282-8dd9-85fbf968aff6

@david-allison
Copy link
Member Author

david-allison commented Aug 29, 2023

@mikehardy this looks like ACRA/acra#1233, fixed in ACRA/acra@c193e35, tagged as acra-5.11.1

This should have gone into AnkiDroid 2.16.4 with d708267, but something is fishy

@david-allison
Copy link
Member Author

I have very limited time here

Current possibility: is the code in ACRA/acra@c193e35 catching the Kotlin ClassCastException, and does this also handle java.lang.ClassCastException

@mikehardy
Copy link
Member

That does look like the issue you linked, and I just did my best to check through the code (looked in the APK, looked in the source code tag that was built, checked web UI here), I came to the same conclusion you did. We appear to be using ACRA 5.11.1 already in the version of our app that crashed. Very strange!

@mikehardy
Copy link
Member

Seems we have the opposite of the upstream original problem, somehow (I don't understand it, to be honest...) but the upstream issue is reopened and I've proposed a maybe-good-enough PR. Anyway, it's got eyes on it

@mikehardy
Copy link
Member

FIxed upstream in 5.11.2 🥂

@mikehardy
Copy link
Member

🤔 hmm - doesn't seem to be showing up from dependabot (yet?) and either way the gradle files have changed pretty radically now. Needs a specific bump on main and on release-2.16 branch I believe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.16 Bug Good First Issue! Help Wanted Requesting Pull Requests from volunteers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants