k3b / APhotoManager

Manage local photos on Android: gallery, geotag with photomap, privacy, tags, find, sort, view, copy, send, ... .
GNU General Public License v3.0
224 stars 57 forks source link

Filter with Invalid Date on ScreenRotation #158

Closed anlalalu closed 4 years ago

anlalalu commented 4 years ago

Describe the bug A clear and concise description of what the bug is. error exists when operating in GaleeryFilterActivity

To Reproduce Steps to reproduce the behavior:

  1. tap 'more options'
  2. tap 'Filter'
  3. text in an invalid date
  4. tap 'date_from_history' and there should be a box with some history data to select
  5. rotate the screen

Expected behavior A clear and concise description of what you expected to happen.

no error logs during operation

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Crash Report If you report an app crash: Can you add the crash logfile to this ticket?

When APhotoManager crashes it tries to write a crash log file in the Error Log Folder.

For more details on Error Loging see diagnostic settings.

E/k3bFoto: GalF-'1334' is not a valid date. java.lang.RuntimeException: '1334' is not a valid date. at de.k3b.android.androFotoFinder.GalleryFilterActivity$FilterValue.convertDate(GalleryFilterActivity.java:730) at de.k3b.android.androFotoFinder.GalleryFilterActivity$FilterValue.getDateMin(GalleryFilterActivity.java:618) at de.k3b.io.GalleryFilterParameter.get(GalleryFilterParameter.java:66) at de.k3b.io.GalleryFilterParameter.get(GalleryFilterParameter.java:36) at de.k3b.android.androFotoFinder.GalleryFilterActivity.fromGui(GalleryFilterActivity.java:743) at de.k3b.android.androFotoFinder.GalleryFilterActivity.onSaveInstanceState(GalleryFilterActivity.java:132) at android.app.Activity.performSaveInstanceState(Activity.java:1153) at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1223) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3698) at android.app.ActivityThread.access$900(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) Caused by: java.text.ParseException: Unparseable date: "1334" (at offset 4) at java.text.DateFormat.parse(DateFormat.java:555) at de.k3b.android.androFotoFinder.GalleryFilterActivity$FilterValue.convertDate(GalleryFilterActivity.java:728)

E/WindowManager: android.view.WindowLeaked: Activity de.k3b.android.androFotoFinder.GalleryFilterActivity has leaked window android.widget.PopupWindow$PopupViewContainer{52a81e18 V.E..... ........ 0,0-424,226} that was originally added here at android.view.ViewRootImpl.(ViewRootImpl.java:346) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) at android.widget.PopupWindow.invokePopup(PopupWindow.java:1019) at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:925) at android.widget.ListPopupWindow.show(ListPopupWindow.java:625) at com.android.internal.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:148) at com.android.internal.view.menu.MenuPopupHelper.show(MenuPopupHelper.java:113) at android.widget.PopupMenu.show(PopupMenu.java:167) at de.k3b.android.widget.HistoryEditText$EditorHandler.showHistory(HistoryEditText.java:187) at de.k3b.android.widget.HistoryEditText$EditorHandler.onClick(HistoryEditText.java:254) at android.view.View.performClick(View.java:4438) at android.view.View$PerformClick.run(View.java:18422) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method)

k3b commented 4 years ago

Not a bug

Gui shows short tooltip (i.e. "//// is not a valid date") as expected.

Changed logging from log-error to log-info