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 crash when clicking the "Open Calendar" button. #43

Closed
YYYSSSHHH opened this issue Aug 9, 2021 · 1 comment · Fixed by #45
Closed

App crash when clicking the "Open Calendar" button. #43

YYYSSSHHH opened this issue Aug 9, 2021 · 1 comment · Fixed by #45
Labels
bug Something isn't working

Comments

@YYYSSSHHH
Copy link

Environment Info:
APK Version: 0.5.4 (14)
Android version: 6.0.1

Expected behavior:
The app pop up a dialog, which prompts that ”The device lacks a calendar application“.

Repro Steps:

  1. The calendar application is not installed in the device.
  2. Click the “Navigation” button in the top right-hand corner of app.
  3. Click the “Open Calendar” button, then the app will crash.
    33

The stack trace:
FATAL EXCEPTION: main
Process: com.forrestguice.suntimescalendars, PID: 2120
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=content://com.android.calendar/time/1628498624827 flg=0x10000000 }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
at android.app.Activity.startActivityForResult(Activity.java:3942)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
at android.app.Activity.startActivityForResult(Activity.java:3902)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
at android.app.Activity.startActivity(Activity.java:4231)
at android.app.Activity.startActivity(Activity.java:4199)
at com.forrestguice.suntimeswidget.calendar.SuntimesCalendarActivity.onOptionsItemSelected(SuntimesCalendarActivity.java:494)
at android.app.Activity.onMenuItemSelected(Activity.java:2926)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:408)
at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:195)
at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:113)
at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:113)
at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:69)
at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:206)
at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:776)
at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969)
at android.support.v7.view.menu.MenuPopup.onItemClick(MenuPopup.java:127)
at android.widget.AdapterView.performItemClick(AdapterView.java:310)
at android.widget.AbsListView.performItemClick(AbsListView.java:1145)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3066)
at android.widget.AbsListView$3.run(AbsListView.java:3903)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)

Do you confirm this bug? Thank you.

@forrestguice
Copy link
Owner

An exception is expected in this case, but the relevant block of code appears to be missing its try/catch.

Thanks for the report. This will be fixed in the next patch.

@forrestguice forrestguice added the bug Something isn't working label Aug 9, 2021
forrestguice added a commit that referenced this issue Nov 13, 2021
prevent crash when calendar app isn't installed (#43)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants