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

App crashes when view an item in the history #90

Closed
skull591 opened this issue May 20, 2019 · 7 comments
Closed

App crashes when view an item in the history #90

skull591 opened this issue May 20, 2019 · 7 comments

Comments

@skull591
Copy link

skull591 commented May 20, 2019

App version: 0.40
Android version: 5.0
Device: Nexux_5X
Step to reproduce:

  1. Import a dictionary
  2. Look up some random word
  3. Forget the dictionary
  4. Click the word in the History tab
  5. Click anything in the menu page

Expected behavior: do something or notify the dic is lost
Current behavior: the app crashes

@itkach
Copy link
Owner

itkach commented May 21, 2019

Can't reproduce so far, tried on Android 5.1.1 and 9.0 - no crashes

@skull591
Copy link
Author

I tried again on a 9.0 Android emulator (I donot have such a real device), and the crash is reproducable. Here's the stack trace if it helps...

05-21 20:48:04.570  4415  4415 E AndroidRuntime: java.lang.NullPointerException: Attempt to write to field 'boolean itkach.aard2.ArticleWebView.forceLoadRemoteContent' on a null object reference
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at itkach.aard2.ArticleFragment.onOptionsItemSelected(ArticleFragment.java:114)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.support.v4.app.Fragment.performOptionsItemSelected(Fragment.java:2212)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.support.v4.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:2295)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.support.v4.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:353)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:414)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1151)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:904)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:894)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:200)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.widget.AdapterView.performItemClick(AdapterView.java:310)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.widget.AbsListView.performItemClick(AbsListView.java:1145)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3042)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.widget.AbsListView$3.run(AbsListView.java:3879)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-21 20:48:04.570  4415  4415 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-21 20:48:04.571  1694  1939 W ActivityManager:   Force finishing activity itkach.aard2/.ArticleCollectionActivity

I notice that the itkach.aard2.ArticleFragment.onOptionsItemSelected(ArticleFragment.java:114) method is annotated deprecated, but it's still called.

@skull591
Copy link
Author

I was also able to reproduce the crash on a vivo NEX S phone. Same stack trace, and the app quickly relaunches.

@itkach
Copy link
Owner

itkach commented May 21, 2019

Ah, I see it now. I think I was not actually clicking menu items before... It crashes alright :) Thank you for the report, I'll fix it.

@itkach
Copy link
Owner

itkach commented May 23, 2019

Resolved in 42bf093. Menu is now hidden for missing articles since those actions have no meaning without content.

@itkach itkach closed this as completed May 23, 2019
@francwalter
Copy link

francwalter commented May 23, 2019

This seems fixed in 0.41 but I just noticed that on Google Play there is still vs.0.39 from last year.
Is there no update for Google Play?
I am even Beta tester there.

@itkach
Copy link
Owner

itkach commented May 23, 2019

just didn't get around to it, will publish in Play store soon

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