I wrote a debugging aid which I introduced here: viewtopic.php?f=18&t=2651
If you get "Fatal Exception" when using dsleep this may help to gather more information.
Hope this is useful,
Carsten
Explore... Chat... Share...
Eyal wrote:There is Good news and there is Bad news...
The Good New first.
I did a few builds from the period 20150118-24, going back in time.
I am running the dsleep loop I presented yesterday at a test. It proved to be a good stress test so far, crashing within a few minutes.
The image from the end of the 24rd crashes. We knew this.
The image from the end of the 23rd crashes.
The image from the end of the 22nd works. (a few hours later it was shows as dates the 23rd...)
I then tested the other patches from the 23rd. The last patch that works reliably isVIP6(xingyuewang,http://517513.cn) commit si7021 module.
https://github.com/nodemcu/nodemcu-firm ... e81d8c0b8b
The first one that fails ismerge mqtt branch to master and build pre_build bin
https://github.com/nodemcu/nodemcu-firm ... dd54cadedd
The Bad News:
I cannot see how this patch causes the failure. However, maybe the addition of a large module was enough to breach some memory map rule?
I am now testing the failing patch but with mqtt deselected in user_config.h. So far so good... 15 minutes... 20m...30m...[later]...1h... [even later] stopped after 2 hours (about 3000 loops).
Recall: this test does 25 dsleep/wakeup cycles per minute.
Closing Remarks
My app does not use mqtt (and still crashes) so the issue is probably not related specifically to this module. Furthermore. we do not know if the failure in January is the same as today, we only know that the same exception occurs at the same location intermittently.
Next step: is there anyone reading this that has the skills to take this issue further?Now is the time to chime in...
Thanks
now = tmr.now()/1000000
heap = node.heap()
count = collectgarbage("count")*1024
print (string.format("%.3f: used %d, heap %d", now, count, heap))
magic_pin = 1 -- gpio5, LOW on this pin will stop the program
gpio.mode (magic_pin, gpio.INPUT, gpio.PULLUP);
if 0 == gpio.read (magic_pin) then
print ("aborting by magic")
else
print ("will wake up in 2s\n")
node.dsleep(2*1000000, 4)
end
0.082: used 8060, heap 15856
0.102: used 8015, heap 10936
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]