Skip to content

displayio: Fix matrixportal crash #3507

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

Merged
merged 1 commit into from
Oct 3, 2020

Conversation

jepler
Copy link

@jepler jepler commented Oct 2, 2020

An RGBMatrix has no bus and no bus_free method. It is always possible to refresh the display.

This was not a problem before, but the fix I suggested (#3449) added a call to core_bus_free when a FramebufferDisplay was being refreshed. This was not caught during testing.

This is a band-aid fix and it brings to light a second problem in which a SharpDisplay + FrameBuffer will not have a 'bus' object, and yet does operate using a shared SPI bus. This kind of display will need a "bus-free" like function to be added, or it can have problems like #3309.

Closes: #3506

Testing performed: Used the 1-line reproducer from #3506 on my matrixportal.

An RGBMatrix has no bus and no bus_free method.  It is always possible
to refresh the display.

This was not a problem before, but the fix I suggested (adafruit#3449) added
a call to core_bus_free when a FramebufferDisplay was being refreshed.
This was not caught during testing.

This is a band-aid fix and it brings to light a second problem in which
a SharpDisplay + FrameBuffer will not have a 'bus' object, and yet does
operate using a shared SPI bus.  This kind of display will need a
"bus-free" like function to be added, or it can have problems like
adafruit#3309.
@siddacious
Copy link

I can confirm that this fixes the crash; got me some sweet werewolf eye action after building and flashing a uf2 from @jepler 's fork

@ladyada ladyada merged commit 9535edb into adafruit:main Oct 3, 2020
@jepler jepler deleted the issue3506-matrixportal-crash branch October 4, 2020 19:43
tyomitch pushed a commit to tyomitch/circuitpython that referenced this pull request Apr 30, 2021
These commented-out lines of code have been unused for a long time, so
remove them to avoid confusion as to why they are there.

mp_obj_dict_free() never existed, this line was converted from
mp_map_deinit() and commented out as soon as it was added.  The call to
mp_map_deinit(mp_loaded_modules_map) was commented in
1a1d11f.

Fixes issue adafruit#3507.

Signed-off-by: Damien George <damien@micropython.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MatrixPortal crashes into safe mode (CircuitPython core code crashed hard. Whoops!)
3 participants