simonpoole / OpeningHoursFragment

Android UI element for displaying and editing an opening hours value
MIT License
9 stars 2 forks source link

Removing of non-valid time-time range causes crashing of app #21

Closed kudlav closed 6 years ago

kudlav commented 6 years ago

Vespucci Version

Vespucci 0.9.10b1324

Device (Manufacturer and Model)

Samsung Galaxy A3 (SM-A300FU)

Android Version

Android 6.0.1

Behaviour/Symptoms/Expected Behaviour/How to recreate

  1. Add opening our tag to an object
  2. Open OpeningHours editor
  3. Remove everything existing (three dots -> Delete)
  4. Add Time-Time range
  5. Set End time to something not valid (using top line and SW keyboard add third digit)
  6. Save that and open editing tool again.
  7. Try to remove rules using three dots -> Delete button
  8. After pressing Delete button, app crashes.

Crash dump submitted (no or yes + date)

12.12.2017 (20:35 UTC+1) report containig email adress xxxxxx and this content

Any other potentially relevant information

Language: cs_CZ

kudlav commented 6 years ago

For example try to Delete this value: screenshot_2017-12-12-20-23-16

simonpoole commented 6 years ago

Fixed in https://github.com/simonpoole/OpeningHoursFragment/commit/ddda384fa36e23bc97fb7d6e8ebd589455742d31 (btw I assume the app doesn't crash just the opening hours editor?)

kudlav commented 6 years ago

Repeat same procedure, but press Refresh button instead of Delete button. Reported 13.12.2017 (18:20), containing email adress xxxxxxxxx

simonpoole commented 6 years ago

I went over all the code that might cause issues and have now I hope caught all potential trouble spots https://github.com/simonpoole/OpeningHoursFragment/commit/d242e8906167adb096a54ff15be4060cde102b30 The root cause being that when parsing fails on the first rule, there is not Collection of rules to delete or to use for a refresh.