adafruit / adafruit/Adafruit_IO_Arduino

Group IO causes crashes when run

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
222
Forks
109
PR merge metrics
No merged PRs in 30d

Description

- Arduino board: **Feather HUZZAH32**

- Arduino IDE version (found in Arduino -> About Arduino menu): **1.8.5**

- List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too):

Build **Adafruit_11_group_pub** and watch it crash and burn when executed (not to mention the huge number of warnings caused by unused local variables, etc. and syntactic and semantic nonsense producing fatal build errors in a couple places)

Note: I thought it might be caused by an uninitialized **AdafruitIO::_groupCallback** member, which is not set to a meaningful value in the method for **AdafruitIO_Group::_init**, but when I set it to **NULL** in the **_init**, the error did not go away.

### [update a couple hours later]
For some reason, the libraries are found in a directory **arduino_283704/libraries** instead of **arduino/libraries**. Silly me for assuming the libraries were in the place the documentation claimed they would be.

I set **_groupCallback** to **NULL** in **_init** in the correct source, and it now runs! Apparently the previous code depended on the (unknown) state of the allocation, which, by the greatest of luck, just happened to be 0. When the runtime was changed to "'erase" all of the allocated block to 0xFEFEFEFE, the source code was not prepared for a change to the (very carefully) unspecified behavior of the allocator, and now failed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by building and running Adafruit_11_group_pub on the Feather HUZZAH32 with Arduino IDE 1.8.5, then inspect AdafruitIO_Group::_init and the AdafruitIO::_groupCallback member. Done means the group IO example runs without crashing and the reported build errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.