Notecard stuck: cannot allocate memory

I am getting an error where the notecard is stuck in cannot allocate memory:

ERROR panic: PanicInfo { payload: Any { .. }, message: Some(called `Result::unwrap()` on an `Err` value: NotecardErr("cannot allocate 9220 bytes {memory}")), location: Location { file: "src/main.rs", line: 94, col: 55 }, can_unwind: true }

hard resetting notecard seems to fix the issue.

Hi @gauteh. What firmware version are you running? 3.2.1? Also, do you happen to know exactly what causes this? A note.add or something else?

Any additional details you can share about your host app, MCU, the notecard library you’re using, etc. Will help us get you sorted.

This happened on note.template. version 2.1, I’ve upgraded now. This happens relatively seldom. But it maybe indicates a memory leak somewhere.

https://github.com/gauteh/sfy/blob/main/sfy-buoy/src/note.rs#L93

Library: https://github.com/gauteh/notecard-rs/blob/main/src/note.rs#L55

Thanks, Gaute

lør. 19. feb. 2022, 15:33 skrev Brandon Satrom via Blues Wireless Community <blues@discoursemail.com>:

Ah good to know. We made a number of template-based improvements for 3.2.1, so you shouldn’t see this happen again. Please let us know if it does, though.

Ok, good to hear. Let’s consider this solved.