Skip to content

Hard crash passing struct_time to alarm.time.TimeAlarm(epoch_time=xxx) #11158

Description

@bablokb

CircuitPython version and board name

Adafruit CircuitPython 10.2.1 on 2026-05-13; Adafruit MagTag with ESP32S2

(also on a Pico-W running 10.3.0.alpha3+)

Code/REPL

import time
import alarm
later_ts = time.localtime(time.time()+120)
ta = alarm.time.TimeAlarm(epoch_time=later_ts)

Behavior

Automatisches Neuladen ist deaktiviert.
Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt

Sie befinden sich im abgesicherten Modus, weil:
Der CircuitPython-Kerncode ist hart abgestürzt. Hoppla!
Harter Fehler: Speicherzugriff- oder Anweisungsfehler.
Reiche bitte ein Problem mit deinem Programm bei github.com/adafruit/circuitpython/issues ein.
Drücke Reset, um den Sicherheitsmodus zu beenden.

Drücke eine beliebige Taste um REPL zu betreten. Drücke STRG-D zum neuladen.

Description

Well, of course you shouldn't pass a struct_time where an int is expected. But the program should not hard crash.

Add type-checking to alarm_time_timealarm_make_new()?!

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions