-
-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Description
Describe the bug
The app crashes when configured to display custom events (with before/after offset) whenever the event does not occur. This can be reproduced reliably by configuring the app to polar latitudes that experience midnight sun.
To Reproduce
Steps to reproduce the behavior:
: -> Set Location
and configure to an extreme north or south latitude (e.g. +-85 degrees).: -> Settings -> User Interface -> Manage Events
and add a custom event for any negative angle.- Restart the app and verify that the custom event is now displayed and that the card displays typical output for polar day (i.e. event times show
none
). : -> Settings -> User Interface -> Mange Events
and edit the previously created event.- Click
at
and add any offset to the event (e.g. 5 minutes before). Save it. - Attempt to restart the app - it now crashes!
Version Info:
- App Version: 0.16.7
Additional context
2025-06-05 20:23:41.009 2846-2846/com.forrestguice.suntimeswidget E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.forrestguice.suntimeswidget, PID: 2846
java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.Calendar.add(int, int)' on a null object reference
at com.forrestguice.suntimeswidget.calculator.SuntimesRiseSetData.calculate(SuntimesRiseSetData.java:419)
at com.forrestguice.suntimeswidget.calculator.SuntimesRiseSetDataset.calculateData(SuntimesRiseSetDataset.java:161)
at com.forrestguice.suntimeswidget.cards.CardAdapter.createData(CardAdapter.java:146)
at com.forrestguice.suntimeswidget.cards.CardAdapter.initData(CardAdapter.java:121)
at com.forrestguice.suntimeswidget.cards.CardAdapter.initData(CardAdapter.java:108)
at com.forrestguice.suntimeswidget.SuntimesActivity.calculateData(SuntimesActivity.java:1876)