[ST Edge] call_with_delay error messages

@psbarrett
I am using a call_with_delay function inside of my add lifecycle handler. It is working as expected, however I keep seeing this error show up in my log:

failed to cancel dropped timer, timer has leaked	Invalid timer ID

It doesn’t appear until about 15 seconds AFTER the timer triggered my function. My function executes as it should and just exits. This error message makes it sound like I was supposed to explicitly cancel the timer. For a one-shot timer, really??

I’ve also seen this error appear from other drivers that use that function. Possible bug?

That’s definitely a bug on our side.

When a timer is garbage collected we always call cancel on it and swallow errors for when the timer has already expired, but it looks like either the error message changed on that or I missed when implemented that check because I’m checking for "does not exist" instead of "Invalid timer ID".

Thanks for the report.

1 Like