InfiniTime/src
ljahn dbe8820834
Alarm: Simplify alarm alerting screen (#2211)
Simplify alarm alerting screen and fix bug with
alerting on time value change

SetAlerting creates an lv_task to automatically call StopAlerting after one minute. This task will call an invalid function reference and lead to a crash under the following condition:

All exit paths but the time value change (so not considering this fix) call StopAlerting themselves, which also terminates the lv_task.
However, the value change callback only calls DisableAlarm, because its normal use case is for setting up an alarm, where you have to re-confirm enabling the alarm after every change you make.
DisableAlarm still sets isAlerting in the alarmController to false, probably because someone thought a currently alerting but also disabled alarm makes no sense, this was introduced in a0cd439.
That causes the destructor of Alarm to think there is nothing to do regarding the alerting when the alarm screen is dismissed.
Therefore it does not call StopAlerting and the lv_task is left with an invalid function pointer, because Alarm does not exist anymore once the lv_task finally goes to call the callback function
2025-01-21 09:10:41 +01:00
..
buttonhandler ButtonHandler: includes relative to src dir 2022-01-16 20:59:49 +01:00
components Alarm: Simplify alarm alerting screen (#2211) 2025-01-21 09:10:41 +01:00
displayapp Alarm: Simplify alarm alerting screen (#2211) 2025-01-21 09:10:41 +01:00
drivers 8hz idle 2024-10-27 16:56:47 +01:00
FreeRTOS Use all free RAM for FreeRTOS heap 2024-12-09 00:10:09 +00:00
heartratetask Atomic HRS reads (#1845) 2024-09-22 00:29:15 +02:00
libs Use all free RAM for FreeRTOS heap 2024-12-09 00:10:09 +00:00
logging Format header files 2023-01-09 21:41:21 +01:00
resources cmake: fix python path with use multi-version python 2024-11-17 23:36:22 +00:00
systemtask Remove OnTouchEvent 2024-10-27 19:51:01 +01:00
touchhandler TouchHandler: Do not store touch panel reference 2023-02-24 00:05:21 +02:00
utility motioncontroller: Add functions for analysis 2023-08-17 21:21:22 +02:00
BootErrors.h Automatic error detection 2021-08-18 15:23:30 +03:00
BootloaderVersion.cpp Fix InfiniTime compiler warnings 2022-06-19 13:41:33 +03:00
BootloaderVersion.h Fix InfiniTime compiler warnings 2022-06-19 13:41:33 +03:00
CMakeLists.txt Use all free RAM for FreeRTOS heap 2024-12-09 00:10:09 +00:00
FreeRTOSConfig.h Use all free RAM for FreeRTOS heap 2024-12-09 00:10:09 +00:00
main.cpp Remove OnTouchEvent 2024-10-27 19:51:01 +01:00
main.h Enable malloc error and stack overflow error detection in FreeRTOS. Count them and display them in the SystemInfo app. 2023-05-18 19:58:09 +02:00
recoveryLoader.cpp Use functional abstraction for hooks 2024-05-01 16:13:47 +02:00
sdk_config.h Switch to freertos timers (#1095) 2022-06-06 17:47:43 +02:00
stdlib.c Use all free RAM for FreeRTOS heap 2024-12-09 00:10:09 +00:00
Version.h.in Add missing standard includes 2021-11-15 22:02:49 +01:00