-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sntp.sync: callback esp crashes when there is no server after 2nd try #2699
Comments
Other than being vaguely about SNTP, this appears unrelated to #2622. It is possible that this is related to #2553. It's also possible that the lines https://github.com/nodemcu/nodemcu-firmware/blob/master/app/modules/sntp.c#L209 and 210 are reversed; I don't see any reason why we should be cleaning up before calling back into the Lua VM, but @TerryE might know more. Failing either of the above, you may be able to get more information with a debug build. |
It's me again.
does this help any further? Thanks Nik |
I think I see what is going on. Sigh. I'll open a PR. In the interim, if you replace |
* list_ref can become LUA_REFNIL, because that's what rawgeti returns for LUA_NOREF. Defensively guard for this, rather than falling into the sntp_dolookups loop with nil on the stack. * set_repeat_mode should not call itself, but should rather always do what it's going to do and then optionally do the rest if directed. * sntp_sync should not try to special case the single string argument: we should be queueing that name for DNS resolution, too. Towards that end, if we are given a single string, build a table and make that the list_ref and call off to sntp_dolookups, just like we otherwise do. FIXES: nodemcu#2699
* list_ref can become LUA_REFNIL, because that's what rawgeti returns for LUA_NOREF. Defensively guard for this, rather than falling into the sntp_dolookups loop with nil on the stack. * set_repeat_mode should not call itself, but should rather always do what it's going to do and then optionally do the rest if directed. * sntp_sync should not try to special case the single string argument: we should be queueing that name for DNS resolution, too. Towards that end, if we are given a single string, build a table and make that the list_ref and call off to sntp_dolookups, just like we otherwise do. FIXES: nodemcu#2699
Hi nwf, uff, don't ask for how long i had these sporadic restarts and absolutely no clue what it could be. In the end i used a second esp to read the uart and send it to a logserver. Thank you so much. Nik
|
Checking SNTP autocall failures with set_sntp2('168.1.23.122')
Checking with set_sntp2({'168.1.23.122'})
If an otherwise unchanged NodeMCU build is updated with the sntp.c of Issue C W Rose |
* list_ref can become LUA_REFNIL, because that's what rawgeti returns for LUA_NOREF. Defensively guard for this, rather than falling into the sntp_dolookups loop with nil on the stack. * set_repeat_mode should not call itself, but should rather always do what it's going to do and then optionally do the rest if directed. * sntp_sync should not try to special case the single string argument: we should be queueing that name for DNS resolution, too. Towards that end, if we are given a single string, build a table and make that the list_ref and call off to sntp_dolookups, just like we otherwise do. FIXES: nodemcu#2699
* list_ref can become LUA_REFNIL, because that's what rawgeti returns for LUA_NOREF. Defensively guard for this, rather than falling into the sntp_dolookups loop with nil on the stack. * set_repeat_mode should not call itself, but should rather always do what it's going to do and then optionally do the rest if directed. * sntp_sync should not try to special case the single string argument: we should be queueing that name for DNS resolution, too. Towards that end, if we are given a single string, build a table and make that the list_ref and call off to sntp_dolookups, just like we otherwise do. FIXES: nodemcu#2699
* list_ref can become LUA_REFNIL, because that's what rawgeti returns for LUA_NOREF. Defensively guard for this, rather than falling into the sntp_dolookups loop with nil on the stack. * set_repeat_mode should not call itself, but should rather always do what it's going to do and then optionally do the rest if directed. * sntp_sync should not try to special case the single string argument: we should be queueing that name for DNS resolution, too. Towards that end, if we are given a single string, build a table and make that the list_ref and call off to sntp_dolookups, just like we otherwise do. FIXES: nodemcu#2699
* list_ref can become LUA_REFNIL, because that's what rawgeti returns for LUA_NOREF. Defensively guard for this, rather than falling into the sntp_dolookups loop with nil on the stack. * set_repeat_mode should not call itself, but should rather always do what it's going to do and then optionally do the rest if directed. * sntp_sync should not try to special case the single string argument: we should be queueing that name for DNS resolution, too. Towards that end, if we are given a single string, build a table and make that the list_ref and call off to sntp_dolookups, just like we otherwise do. FIXES: #2699
Hi all,
as already mentioned in 'SNTP success callback function runs when sync not successful #2622', this looks like a problem to me.
Sorry to bring this up again, but somehow this does not work for me either.
When i block the ntp address on my dsl, the esp crashes after 1000sec, after the 2nd try for ntp.
this is my code:
and this is the output:
is this only me having this problem, or doesn't this code work for others either?
Thanks & Regards
Nik
NodeMCU version
My last snapshot is from about october 2018.
Hardware
esp wroom
The text was updated successfully, but these errors were encountered: