Closed zencow closed 4 years ago
It should be worth noting that the Group and Feeds were created automatically and a "0" was published for each Feed on each reboot of the device. The program always crashed during the 2nd call to io.run() before it got the chance to publish any incremented values.
Second stack trace for crash/reset on group publishing, from the Adafruit IO Forum: https://forums.adafruit.com/viewtopic.php?f=56&t=164450
Same error on HUZZAH32 w/example group sub and group pub:
Adafruit IO connected.
sending example.count-1 -> 0
sending example.count-2 -> 0
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d2308 PS : 0x00060830 A0 : 0x800d23b0 A1 : 0x3ffb1ee0
A2 : 0xfefefefe A3 : 0x3ffcc73c A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d2164 A9 : 0x3ffb1eb0
A10 : 0x3ffcc73c A11 : 0x7fffffff A12 : 0x00000000 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0xfefefefe LBEG : 0x400012c5 LEND : 0x400012d5 LCOUNT : 0xfffffff7
Backtrace: 0x400d2308:0x3ffb1ee0 0x400d23ad:0x3ffb1f00 0x400d2a3c:0x3ffb1f50 0x400d1ffa:0x3ffb1f70 0x400d1cf0:0x3ffb1f90 0x400d5d49:0x3ffb1fb0 0x400883ed:0x3ffb1fd0
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:8740
load:0x40080400,len:5788
entry 0x4008069c
Connecting to Adafruit IO............
decoded stack trace
PC: 0x400d2308
EXCVADDR: 0xfefefefe
Decoding stack results
0x400d2308: AdafruitIO_Group::call(AdafruitIO_Data*) at /Users/brentrubell/Documents/Arduino/libraries/Adafruit_IO_Arduino/src/AdafruitIO_Group.cpp line 230
0x400d23ad: AdafruitIO_Group::subCallback(char*, unsigned short) at /Users/brentrubell/Documents/Arduino/libraries/Adafruit_IO_Arduino/src/AdafruitIO_Group.cpp line 275
0x400d2a3c: Adafruit_MQTT::processPackets(short) at /Users/brentrubell/Documents/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp line 443
0x400d1ffa: AdafruitIO::run(unsigned short) at /Users/brentrubell/Documents/Arduino/libraries/Adafruit_IO_Arduino/src/AdafruitIO.cpp line 184
0x400d1cf0: loop() at /Users/brentrubell/Documents/Arduino/adafruitio_11_group_pub/adafruitio_11_group_pub.ino line 58
0x400d5d49: loopTask(void*) at /Users/brentrubell/Library/Arduino15/packages/esp32/hardware/esp32/1.0.3/cores/esp32/main.cpp line 19
0x400883ed: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143
@zencow This is the same error as https://github.com/adafruit/Adafruit_IO_Arduino/issues/111 and I didn't understand why this was crashing until I looked at the group subscription sketch closely.
The comparison if (strcmp(cur_cb->feed, d->feedName()) == 0 || cur_cb->feed == NULL{
fails due to the callback attempting to obtain the feed's name (cur_cb->feed
) because the _groupCallback
callback was never properly init'd since the setup()
in adafruitio_11_group_pub.ino
never calls onMessage, which is used to initialize the _groupCallback
(https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/src/AdafruitIO_Group.cpp#L309).
Also, _groupCallback
is never NULL
, so the check within onMessage
which initialzes _groupCallback
also fails. This is why the subscribe example fails in the same part of the code, while it properly sets up the message handler.
I'll create a PR for this today.
I tested the patch at "Fix ESP32 Groups Crash #115" and it worked for me. No more crashes.
I got the latest library update (v 3.5.0) from the Arduino IDE and it ran 10 cycles before I killed it. ;) Kudos!
Hi...
I attempted troubleshooting on the discord server about this, but upon looking further, I found that the error applies to the stock example as well as my more complex and messy code. ;)
I used a plain Huzzah32 Feather connected only to an Adafruit Lipo and the USB connection to my computer for programming with the Arduino tools.
Arduino board: Adafruit HUZZAH32 – ESP32 Feather Board https://www.adafruit.com/product/3405
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.12
List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too):
Serial output:
Decoded panic data:
Note: I noticed there's another issue open for example 12 ("group sub", which is the complimentary example to this one which is the "group pub" example): https://github.com/adafruit/Adafruit_IO_Arduino/issues/111