Program keeps crashing when I call Firebase.RTDB.get(&firebaseData,"location/") #497
-
I cannot for the life of me figure out why this keeps causing my program to crash. It's the line listed in the title that causes the crash: Firebase.RTDB.get(&firebaseData,"location/") I am hoping for some help in figuring this out. Here are the relevant sections of my code:
At first, I thought it had something to do with not enough memory, but when I run the program, I get a heap size of Get free heap size: 12336 from the statement right before the database get request which I think is ok for the board I have (Node MCU v1) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If you see the example code, I wrote at line #77 which you should be aware of and avoid it in your programming logic. The callback is the same as interrupts that mcu exits from its running sequence instruction with current data stores in stack, calling time consuming task inside callback function can cause nested callback which leads to stack overflow. Any memory consuming task in the callback function can cause stack overflow too. |
Beta Was this translation helpful? Give feedback.
-
The callback function purpose is for event triggering or acknowledgement and exit immediately not for doing something that blocks inside. |
Beta Was this translation helpful? Give feedback.
The callback function purpose is for event triggering or acknowledgement and exit immediately not for doing something that blocks inside.