openevse_esp32_firmware icon indicating copy to clipboard operation
openevse_esp32_firmware copied to clipboard

bug/crash with scheduler api

Open KipK opened this issue 3 years ago • 3 comments

I'm in holiday I can't track it but seems I saw a bug if only one schedule is set ( for example a "disabled" schedule with id: 1 , without an "enabled" one )

Can't see if it's a crash or bug from here, but then common status data from create_rapi_json are not published on MQTT, I think it's the same with http, event_send is not called. Either it crashes before or something else.

KipK avatar Aug 10 '22 14:08 KipK

I did have an issue with something similar, thought I fixed it, will have a look.

jeremypoulter avatar Aug 10 '22 17:08 jeremypoulter

I see some events.getnext() in scheduler.cpp without checking if there's such next event first, could this be the culprit ?

KipK avatar Aug 31 '22 06:08 KipK

While working on the Timers part of the new GUI, I get this issue as the UX I'm doing is creating each timer separated.

I confirm the OpenEvse-wifi crash if there's only one timer. Module crash in the wollowing 30 secs.

It doesn't happend if there's more, whatever the enable/disable parity is respected or not.

KipK avatar Oct 10 '22 07:10 KipK

@jeremypoulter , do you have any hints on this issue yet ? I have no debugger here, and no access to the esp32 in production to fix that on my side.

KipK avatar Nov 12 '22 16:11 KipK

Sorry, I have not had a chance to look at it yet

jeremypoulter avatar Nov 12 '22 17:11 jeremypoulter

@jeremypoulter Just a hint as I'm looking at it, it's not the fact that we have only one timer, it seems to need booth an active and disabled timer. I've tried with 2 enabled or disabled timers, and it also crash the firmware. But I still don't know where it segfault, I need a stacktrace

KipK avatar Jan 28 '23 21:01 KipK