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

Crashes with CM theme #53

Closed
rugk opened this issue Mar 29, 2017 · 4 comments
Closed

Crashes with CM theme #53

rugk opened this issue Mar 29, 2017 · 4 comments
Labels

Comments

@rugk
Copy link
Contributor

rugk commented Mar 29, 2017

CM 13
It happens reproducibly when showing some questions (but not all) or e.g. sometimes when opening the opening hours input.

de.westnordost.streetcomplete.quests.road_name.AutoCorrectAbbreviationsEditText$1.run(AutoCorrectAbbreviationsEditText.java:58)
E/AndroidRuntime( 1904): FATAL EXCEPTION: Thread-5846
E/AndroidRuntime( 1904): Process: de.westnordost.streetcomplete, PID: 1904
E/AndroidRuntime( 1904): Theme: themes:{com.android.providers.downloads.ui=overlay:com.spastef.inversion, com.fsck.k9=overlay:com.chummy.jezebel.material.dark.regression, default=overlay:com.chummy.jezebel.material.dark.regression, iconPack:system, fontPkg:com.chummy.jezebel.material.dark, com.android.systemui=overlay:com.chummy.jezebel.material.dark.regression, com.android.systemui.navbar=overlay:com.chummy.jezebel.material.dark.regression}
E/AndroidRuntime( 1904): java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
E/AndroidRuntime( 1904): 	at de.westnordost.streetcomplete.data.meta.CurrentCountry.getLocale(CurrentCountry.java:77)
E/AndroidRuntime( 1904): 	at de.westnordost.streetcomplete.data.meta.CurrentCountry.getResources(CurrentCountry.java:51)
E/AndroidRuntime( 1904): 	at de.westnordost.streetcomplete.data.meta.MetadataModule.abbreviations(MetadataModule.java:16)
E/AndroidRuntime( 1904): 	at de.westnordost.streetcomplete.data.meta.MetadataModule_AbbreviationsFactory.get(MetadataModule_AbbreviationsFactory.java:19)
E/AndroidRuntime( 1904): 	at de.westnordost.streetcomplete.data.meta.MetadataModule_AbbreviationsFactory.get(MetadataModule_AbbreviationsFactory.java:8)
E/AndroidRuntime( 1904): 	at dagger.internal.DoubleCheck.get(DoubleCheck.java:46)
E/AndroidRuntime( 1904): 	at de.westnordost.streetcomplete.quests.road_name.AutoCorrectAbbreviationsEditText$1.run(AutoCorrectAbbreviationsEditText.java:58)
E/AndroidRuntime( 2035): FATAL EXCEPTION: main
E/AndroidRuntime( 2035): Process: de.westnordost.streetcomplete, PID: 2035
E/AndroidRuntime( 2035): Theme: themes:{com.android.providers.downloads.ui=overlay:com.spastef.inversion, com.fsck.k9=overlay:com.chummy.jezebel.material.dark.regression, default=overlay:com.chummy.jezebel.material.dark.regression, iconPack:system, fontPkg:com.chummy.jezebel.material.dark, com.android.systemui=overlay:com.chummy.jezebel.material.dark.regression, com.android.systemui.navbar=overlay:com.chummy.jezebel.material.dark.regression}
E/AndroidRuntime( 2035): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.app.Activity.findViewById(int)' on a null object reference
E/AndroidRuntime( 2035): 	at de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment.updateCloseButtonVisibility(AbstractQuestAnswerFragment.java:160)
E/AndroidRuntime( 2035): 	at de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment.access$000(AbstractQuestAnswerFragment.java:33)
E/AndroidRuntime( 2035): 	at de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment$1$1.run(AbstractQuestAnswerFragment.java:73)
E/AndroidRuntime( 2035): 	at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime( 2035): 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 2035): 	at android.os.Looper.loop(Looper.java:148)
E/AndroidRuntime( 2035): 	at android.app.ActivityThread.main(ActivityThread.java:5461)
E/AndroidRuntime( 2035): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2035): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/AndroidRuntime( 2035): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime( 2035): 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
E/AndroidRuntime( 2435): FATAL EXCEPTION: main
E/AndroidRuntime( 2435): Process: de.westnordost.streetcomplete, PID: 2435
E/AndroidRuntime( 2435): Theme: themes:{com.android.providers.downloads.ui=overlay:com.spastef.inversion, com.fsck.k9=overlay:com.chummy.jezebel.material.dark.regression, default=overlay:com.chummy.jezebel.material.dark.regression, iconPack:system, fontPkg:com.chummy.jezebel.material.dark, com.android.systemui=overlay:com.chummy.jezebel.material.dark.regression, com.android.systemui.navbar=overlay:com.chummy.jezebel.material.dark.regression}
E/AndroidRuntime( 2435): java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
E/AndroidRuntime( 2435): 	at de.westnordost.streetcomplete.data.meta.CurrentCountry.getLocale(CurrentCountry.java:77)
E/AndroidRuntime( 2435): 	at de.westnordost.streetcomplete.quests.opening_hours.OpeningHoursPerWeek.getWeekdaysSuggestion(OpeningHoursPerWeek.java:189)
E/AndroidRuntime( 2435): 	at de.westnordost.streetcomplete.quests.opening_hours.OpeningHoursPerWeek.add(OpeningHoursPerWeek.java:74)
E/AndroidRuntime( 2435): 	at de.westnordost.streetcomplete.quests.opening_hours.OpeningHoursPerWeek$1.onClick(OpeningHoursPerWeek.java:65)
E/AndroidRuntime( 2435): 	at android.view.View.performClick(View.java:5204)
E/AndroidRuntime( 2435): 	at android.view.View$PerformClick.run(View.java:21158)
E/AndroidRuntime( 2435): 	at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime( 2435): 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 2435): 	at android.os.Looper.loop(Looper.java:148)
E/AndroidRuntime( 2435): 	at android.app.ActivityThread.main(ActivityThread.java:5461)
E/AndroidRuntime( 2435): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2435): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/AndroidRuntime( 2435): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime( 2435): 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102
@westnordost westnordost added bug wontfix idea rejected because it is out of scope or because required work is not matching expected benefits labels Mar 29, 2017
@westnordost
Copy link
Member

Cool, thanks for the bug report, the trace is very helpful!

@westnordost westnordost removed the wontfix idea rejected because it is out of scope or because required work is not matching expected benefits label Mar 29, 2017
@westnordost
Copy link
Member

westnordost commented Mar 29, 2017

So this happens, when the app cannot determine in which country you are or if the country is invalid. It tries to determine this by:

  1. getting the country from the telephony provider or if it fails
  2. getting the country from the sim card (where it was bought)

Any normal telephony provider will provide this information or at least the SIM card will, so I guess Cyanogen blocks this perhaps? In any case, I guess I will have to make a fallback to the user's language then.

@westnordost
Copy link
Member

By the way, if you have the crash here, you will likely also have the crash in the "street name" quest, so no need to create another ticket for that.

@rugk
Copy link
Contributor Author

rugk commented Mar 30, 2017

It may just be blocked by XPrivacy, so thanks for the tip. Maybe I should unblock it. (However often XPrivacy often also just delivers fake data)

In any case the app souls not crash, but e.g. use a fallback.

So after enabling the things you mentioned in XPrivacy it works.

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

No branches or pull requests

2 participants