-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
UART.read() MemoryError #8018
Comments
Definitely sounds like a bug on iMX RT. |
880kb is an absurd amount of data. I can't even begin to fathom what kind of bug caused such an allocation. |
we tried to correct a related problem in #5541 -- in that case, it was reported that the returned value could be negative. It looks like there must still be a case where the returned value can unexpectedly be an erroneously positive number instead. I think #5541 is probably a mistaken change; the comment above the original
It might be worth copying the content of It's funny-sad how the sdk comment refers to a field that doesn't seem to exist:
|
Please retry this with absolute latest and document what characters you send in. The example code also looks incomplete because it doesn't loop. Thanks! |
CircuitPython version
Code/REPL
Behavior
One of two things occasionally happens:
MemoryError: memory allocation failed, allocating 880342 bytes
for the line marked in the code snippet. The allocation amount varies, but is always quite large and larger then the amount of free memory.Both can be caught with a try...except for the marked line and then the program continues normally. I feel like the program crashes much more often without the try...except than the amount of errors that would be caught, but I may be imagining that.
Description
No response
Additional information
Might be specific to the Teensy 4.0. I'm using mostly the same code on a Pico W with CP 8.0.5 and haven't seen any issues there.
The text was updated successfully, but these errors were encountered: