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

Crash on Optionsmenu #42

Open
datenpunk opened this issue Jan 24, 2022 · 6 comments
Open

Crash on Optionsmenu #42

datenpunk opened this issue Jan 24, 2022 · 6 comments

Comments

@datenpunk
Copy link
Contributor

Hi

if I try to open the setting the app v3.0 crashes. v2.1 works though.

Android 11
LineageOS 18.1

java.lang.ClassCastException: androidx.preference.ListPreference cannot be cast to androidx.preference.SwitchPreference
	at io.github.subhamtyagi.ocr.SettingsActivity$a.A0(Unknown Source:17)
	at lh.O(:3)
	at ye.e(:1)
	at ye.k(:8)
	at se.E(:8)
	at se.Y(Unknown Source:84)
	at se.C(:4)
	at se.w(:3)
	at fe.onStart(:4)
	at d0.onStart(Unknown Source:0)
	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435)
	at android.app.Activity.performStart(Activity.java:8018)
	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3457)
	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
@SubhamTyagi
Copy link
Owner

Not reproducible at my device.
May be related to Custom Rom.

@SubhamTyagi
Copy link
Owner

Could you try this apk?

If this crash then send file(s) from '/Android/data/io.github.subhamtyagi.ocr.dev/files/crashReports/'

datenpunk added a commit to datenpunk/android-ocr that referenced this issue Feb 9, 2022
@datenpunk
Copy link
Contributor Author

Thanks for looking into it.

The Dev-Version did not help.
2022-02-09 19_28_59_crash.txt

However, I found the problem. My phone is set to german. If I switch it english it works. It seems like the non-translatable strings are duplicated in the localized string resource files. For me this results in empty strings. I'll prepare a pull request with a version which works for me.

SubhamTyagi added a commit that referenced this issue Feb 10, 2022
remove non-translatable strings from localized files (see issue #42)
@franconian
Copy link
Contributor

Can't confirm that anything is solved. App still crashes when opening the settings menu and system language isn't set to English (US).

@SubhamTyagi
Copy link
Owner

Can't confirm that anything is solved. App still crashes when opening the settings menu and system language isn't set to English (US).

This fix not yet available on f-droid due to some build problem.

@franconian
Copy link
Contributor

franconian commented Oct 11, 2022 via email

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

3 participants