-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory allocation error on Raspberry Pi Pico W? #131
Comments
This is curious. It seems that the piece of code that is annotated with variable values in the forum in For Adafruit_CircuitPython_MiniMQTT/adafruit_minimqtt/adafruit_minimqtt.py Lines 912 to 913 in 4c0c770
Note that the line numbers do not match as I am using the latest code, but you get the idea. It would make sense to get the value of Anyhow, the code should be more resilient against internally inconsistent messages. |
There is some sort of problem when a MQTT message spans multiple TCP segments - at least in CPython. Only the data from the first segment is read in a single When connected to |
Nope, #132 merely prevents the problem from propagating to the point where allocation is attempted. |
Trying to debug the issue, I can see there are actually 2 functions named |
If CircuitPython on the Raspberry uses backward compatible socket implementation, then the root cause is clear: Adafruit_CircuitPython_MiniMQTT/adafruit_minimqtt/adafruit_minimqtt.py Lines 990 to 993 in 0e5bb0c
Unlike the ESP32 part (or the other |
There are some preexisting issues like #107 that share the symptoms (negative allocation count), however these seem to happen in the ESP32 branch in |
For the record, the double definition of
so perhaps running this in Github action for PRs is in order. |
I apologize if this is just an error on my part, but I am having trouble getting this library to work with a Raspberry Pi Pico W. Please see this thread for details. It appears that code is attempting to allocate a negative memory size, which is obviously a problem. I don't know enough about the MQTT protocol or debugging Wifi to find the issue.
Is this a bug in the MQTT library, or is my code the problem?
The text was updated successfully, but these errors were encountered: