You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found very disturbing behavior. I've been able to narrow the issue down to the following. This is with ESP8266. Using version 0.9.0 of AsyncMqttClient.
Essentially the code is of the form,
main.cpp
Class1 a = Class1();
AsyncMqttClient b = AsyncMqttClient();
....
voidonWifiConnect(...) {
b.connect();
}
The crazy behavior I'm observing is that the address of achanges after MQTT connects.
It looks like AsyncMqttClient is corrupting the data segment.
I changed to allocate AsyncMqttClient off the heap instead and a is no longer being corrupted, but I don't have confidence that its not just corrupting something else.
ie, AsyncMqttClient *b = AsyncMqttClient()
Is this known behavior? Is there a preferred way to allocate/construct AsyncMqttClient?
The text was updated successfully, but these errors were encountered:
I have found very disturbing behavior. I've been able to narrow the issue down to the following. This is with ESP8266. Using version 0.9.0 of AsyncMqttClient.
Essentially the code is of the form,
main.cpp
The crazy behavior I'm observing is that the address of
a
changes after MQTT connects.It looks like AsyncMqttClient is corrupting the data segment.
I changed to allocate AsyncMqttClient off the heap instead and
a
is no longer being corrupted, but I don't have confidence that its not just corrupting something else.ie,
AsyncMqttClient *b = AsyncMqttClient()
Is this known behavior? Is there a preferred way to allocate/construct AsyncMqttClient?
The text was updated successfully, but these errors were encountered: