Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By SwordMaster
#47451 Hello,

i tried the BasicOTA scetch.
I can upload the scetch, and then i see the IP Adress of the NodeMCU unter the Port-Selection.

So far so good. But the Sketch seems to be very instable...
With different Versions of ESP SDKs. (Version 2.0.0; 2.1.0; 2.2.0).

But each Version, throws an other Exception.

Version 2.0.0
Exception (0):
epc1=0x40106556 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffd20 end: 3fffffb0 offset: 01a0

>>>stack>>>
3ffffec0: 40207205 00080000 3fffdb20 3ffeed5c
3ffffed0: 3fff0b68 3fff12c8 3ffeb478 40207416
3ffffee0: 3ffea194 000000e4 3ffea1ab 3ffea188
3ffffef0: 3fff0328 3ffea194 3ffea19e 3ffea1bc
3fffff00: 3fff0000 40208482 3ffecd60 3fff04ac
3fffff10: 3ffeb464 3fff04b0 3fff12c8 40207940
3fffff20: 00000002 3fff0b68 3fff0b68 3ffee540
3fffff30: 00000000 3fff12c8 0000001c 3fff0b68
3fffff40: 3ffeb456 00000000 3fff12c8 4020e039
3fffff50: 4c35a8c0 00000062 00000000 00000028
3fffff60: 00000002 00000018 402154c9 3ffecd60
3fffff70: 3ffeb430 000000f5 3ffe9388 3ffe9388
3fffff80: 40215465 3ffecd60 00000000 3fff0bc0
3fffff90: 3fffdc80 00000000 3fff12c8 4020ea8b
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42



Version 2.1.0
Exception (0):
epc1=0x40106cf6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffd80 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff20: 4021a29b 005e0001 4020fdbc 3ffec800
3fffff30: 3fff091c 00000001 4021a2da 4020fdd5
3fffff40: 4021a0e9 3fff0944 3fffff80 3fff05ec
3fffff50: 3ffe0000 3fff091c 3ffee300 4021aa9c
3fffff60: 3fff0944 3fff05ec 3ffe9d08 4021983b
3fffff70: 3fff05ec 00000014 40219de6 3fff0944
3fffff80: 3fff05ec 3fffdc80 3fff067c 3ffef070
3fffff90: 4022579f 3fff0944 00000000 402058f7
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld


Version 2.2.0
Exception (0):
epc1=0x40106752 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffd80 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff20: 402247d7 005e0001 4020e5d4 3ffec6f8
3fffff30: 3fff0664 00000001 40224816 4020e5ed
3fffff40: 40224625 3fff067c 3fffff80 3fff03fc
3fffff50: 3ffe0000 3fff0664 3ffeea70 40225014
3fffff60: 3fff067c 3fff03fc 3ffea21c 40223d77
3fffff70: 3fff03fc 00000014 40224322 3fff067c
3fffff80: 3fff03fc 3fffdc80 3fff047c 3ffeeee0
3fffff90: 4021bcc3 3fff067c 00000000 40205af3
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(1,6)


ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset




I also tried different versions of the Arduino IDE (1.6.4 or 1.6.8) without difference.
Does someone have experience with this Sketch? Maybe someone can help me to fix the issues, or describe me a stable version for OTA-Updates.

Kind Regards
Stefan
User avatar
By PaTricK GEOFFROY
#47923 Hello,
I have similar issue BasicOTA sketch:
OTA seem to work, but the 8266 restart every 1mn…

I tried with fresh install:
Arduino 1.6.7 Esp8266 2.0.0
Arduino 1.6.8 Esp8266 2.1.0
Arduino 1.6.9 Esp8266 2.2.0

And different hardware:
Simple ESP12 (with my own electronic)
Wemos D1 R2
Wemos D1 mini
Witty
NodeMCU V3

I have always the same trouble.

I use debug trace on serial, with a software which give some timestamps, and activate debug in Arduino:
I obtain that on serial:

24/05/2016 10:19:03.31 [RX] - Booting
24/05/2016 10:19:03.45 [RX] - wifi evt: 0
24/05/2016 10:19:06.14 [RX] - wifi evt: 3
24/05/2016 10:19:06.22 [RX] - OTA server at: esp8266-0fbde0.local:8266
Ready
IP address: 192.168.1.53
24/05/2016 10:19:13.44 [RX] - pm open,type:2 0
24/05/2016 10:19:16.66 [RX] - :urn 37
:urd 8, 37, 13
:urd 4, 37, 22
:urd 5, 37, 27
24/05/2016 10:19:16.94 [RX] - :urch 37, 37
:urd 8, 37, 13
:urd 4, 37, 22
:urd 5, 37, 27

24/05/2016 10:19:17.21 [RX] - :urch 37, 37
:urd 8, 37, 13
:urd 4, 37, 22
:urd 5, 37, 27
24/05/2016 10:19:39.61 [RX] - Fatal exception 0(IllegalInstructionCause):
epc1=0x40106992, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Exception (0):
epc1=0x401
24/05/2016 10:19:39.65 [RX] - 06992 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: sys
sp: 3ffffd80 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff20: 40224cdf 0f7fcf5c 4020eadc 3ffecda8
3fffff30: 3fff0e3c 00000001 40224d1e 4020eaf5
3fffff40: 40224b2d 3fff0e8c 3fffff80 3fff0b0c
3fffff50: 3ffe0000 3fff0e3c 3ffef120 4022551c
3fffff60: 3fff0e8c 3fff0b0c 3ffebb9a 4022427f
3fffff70: 3fff0b0c 00000014 4022482a 3fff0e8c
3fffff80: 3fff0b0c 3fffdc80 3fff0b84 3ffef590
3fffff90: 4021c1cb 3fff0e8c 00000000 40205ff3
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld
24/05/2016 10:19:39.98 [RX] - Booting

this repeat every minute:

24/05/2016 10:19:39.61 [RX] - Fatal exception 0(IllegalInstructionCause): 10:19:39,61
24/05/2016 10:20:39.63 [RX] - Fatal exception 0(IllegalInstructionCause): 10:20:39,63 01:00,02
24/05/2016 10:21:39.63 [RX] - Fatal exception 0(IllegalInstructionCause): 10:21:39,63 01:00,00
24/05/2016 10:22:39.64 [RX] - Fatal exception 0(IllegalInstructionCause): 10:22:39,64 01:00,01
24/05/2016 10:23:39.66 [RX] - Fatal exception 0(IllegalInstructionCause): 10:23:39,66 01:00,02
24/05/2016 10:24:39.61 [RX] - Fatal exception 0(IllegalInstructionCause): 10:25:39,63 01:59,97
24/05/2016 10:25:39.63 [RX] - Fatal exception 0(IllegalInstructionCause): 10:25:39,63 00:00,00
24/05/2016 10:26:39.71 [RX] - Fatal exception 0(IllegalInstructionCause): 10:26:39,71 01:00,08
24/05/2016 10:27:39.69 [RX] - Fatal exception 0(IllegalInstructionCause): 10:27:39,69 00:59,98
24/05/2016 10:28:39.75 [RX] - Fatal exception 0(IllegalInstructionCause): 10:28:39,75 01:00,06
24/05/2016 10:29:39.77 [RX] - Fatal exception 0(IllegalInstructionCause): 10:29:39,77 01:00,02
24/05/2016 10:30:39.80 [RX] - Fatal exception 0(IllegalInstructionCause): 10:30:39,80 01:00,03
24/05/2016 10:31:39.76 [RX] - Fatal exception 0(IllegalInstructionCause): 10:31:39,76 00:59,96
24/05/2016 10:32:39.77 [RX] - Fatal exception 0(IllegalInstructionCause): 10:32:39,77 01:00,01

When I pass Stack Dump into EspExceptionDecoder, I have the same decoding each time:

>>>stack>>>
3fffff20: 40224cdf 0f7fcf5c 4020eadc 3ffecda8
3fffff30: 3fff0e3c 00000001 40224d1e 4020eaf5
3fffff40: 40224b2d 3fff0e8c 3fffff80 3fff0b0c
3fffff50: 3ffe0000 3fff0e3c 3ffef120 4022551c
3fffff60: 3fff0e8c 3fff0b0c 3ffebb9a 4022427f
3fffff70: 3fff0b0c 00000014 4022482a 3fff0e8c
3fffff80: 3fff0b0c 3fffdc80 3fff0b84 3ffef590
3fffff90: 4021c1cb 3fff0e8c 00000000 40205ff3
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<


Decoding 12 results
0x40224cdf: igmp_tmr at ?? line ?
0x4020eadc: ieee80211_deliver_data at ?? line ?
0x40224d1e: igmp_tmr at ?? line ?
0x4020eaf5: ieee80211_deliver_data at ?? line ?
0x40224b2d: igmp_input at ?? line ?
0x4022551c: ip_input at ?? line ?
0x4022427f: etharp_find_addr at ?? line ?
0x4022482a: ethernet_input at ?? line ?
0x4021c1cb: ets_snprintf at ?? line ?
0x40205ff3: loop_task at C:\Users\Patrick\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\cores\esp8266/core_esp8266_main.cpp line 43

This indicate that:
int atexit(void (*func)()) {
return 0;
}

But It is not clear for me !!!