1

I am experiencing an unusual issue with my code. I have a LOLIN WEMOS D1 mini Lite and I am using the Arduino IDE to upload the sketch. The version of the board is 3.0.2 for ESP8266.

The problem is with the following line of code:

unsigned long n = (this->configuration)->getOffset();

There is a class Aggregator which has a private member variable named configuration which is a pointer to another object of class Configuration which is initialized as a global instance. The above line of code is contained in one of the methods of Aggregator. Basically, it is trying to access a member getter method of a Configuration object and the pointer to this object is set in one of the private members of the Aggregator class. This pointer is initialized in the constructor of the Aggregator class.

When the code is uploaded, the Serial prints out some garbage values and when the Serial Monitor of the Arduino IDE is set to 115200 Baud then the output is:

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v00052b80
~ld

Whenever this line is commented out, the code works fine and the Serial console displays the actual messages and expected lines. It seems that with the above line of code, the board seems to restart in a loop.

1
  • 2
    Print out the addresses of this->configuration and your global configuration object and see if they match...
    – Majenko
    Mar 21 at 14:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.