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

Using a date format with day of the week causes app to crash #495

Open
theOperand opened this issue Jul 12, 2020 · 14 comments
Open

Using a date format with day of the week causes app to crash #495

theOperand opened this issue Jul 12, 2020 · 14 comments
Labels

Comments

@theOperand
Copy link

I get this bug on LineageOS 17.1. Reproduction is fairly simple on my device: Just go to settings, choose a date format with day of the week, e.g. "Thursday - 22:00", and go back to have the app crash.

I don't know how to provide logs, but will provide them if somebody tells me how :)

@hplewis
Copy link

hplewis commented Jul 12, 2020

Also having this issue. Just installed today and running version 1.10.2.

It also makes the app unusable until I clear all storage related to it.

@robinpaulson
Copy link
Contributor

robinpaulson commented Jul 14, 2020

@hplewis Would you mind installing F-droid and using the version from there? v1.10.2 is over a year old, I believe we might have fixed a bug related to this since then

@theOperand
which version are you using?

@theOperand
Copy link
Author

theOperand commented Jul 14, 2020 via email

@robinpaulson
Copy link
Contributor

@theOperand Did you use one of the predefined date codes, or one you put together yourself? We added a date code very recently, I wonder if there was a bug in it? #477

@hplewis
Copy link

hplewis commented Jul 15, 2020

Updating to 1.15.1 seems to have fixed the crashes for me at least. I was/am using a custom string.

@theOperand
Copy link
Author

theOperand commented Jul 15, 2020 via email

@robinpaulson
Copy link
Contributor

robinpaulson commented Jul 16, 2020

@theOperand This does not fix the problem at all, however they may help you understand how "simple date format" works:
https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
https://developer.android.com/reference/java/text/SimpleDateFormat

They are written from a developer's format, so may be slightly arcane to the average person. In that case, this may be slightly more intelligible:

http://www.java2s.com/Tutorial/Java/0040__Data-Type/SimpleDateFormat.htm

@robinpaulson
Copy link
Contributor

robinpaulson commented Jul 16, 2020

The way we handle dates and times is weird, the hyphen in the middle causes problems for many unwary users (discussed many times). I recall we talked about using a built-in library rather than doing it ourselves. #287 (comment)
Also #272
Interestingly, it appears we may have fixed the missing-hyphen bug with #365

@robinpaulson
Copy link
Contributor

@theOperand Where are you at with this, could you give us an update? Cheers

@theOperand
Copy link
Author

I upgraded my LineageOS finally, which seems to have fixed the issue. Thanks for your help!

@robinpaulson
Copy link
Contributor

@theOperand Did you reinstall forcastie from scratch, or take a backup and use that?

@theOperand
Copy link
Author

I reinstalled everything from scratch.

However, there is still a bug. The short day of the week formats (eg Sun, Mon, etc) don't cause a crash, but the full days of the week (Sunday, Monday, etc) do.

@robinpaulson
Copy link
Contributor

I reinstalled everything from scratch.

I guess something was reset to a safe, default value.

The short day of the week formats (eg Sun, Mon, etc) don't cause a crash, but the full days of the week (Sunday, Monday, etc) do.

This is interesting, it narrows the bug slightly. thanks for the feedback

@robinpaulson robinpaulson pinned this issue Sep 18, 2020
@trymeouteh
Copy link

I am having this issue too on LineageOS with the latest version

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

4 participants