-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Hard fault with Feather RP2350 + ST7789 display after resizing terminal followed by running a REPL command #10084
Comments
I get the same hard fault with these additional firmware versions:
|
Also, it's not necessary to wire up the display just to reproduce the fault:
|
Another data point (thanks to @ Neradoc on discord for mentioning this): If you register a release_displays atexit, like this:
it stops the hard fault when you use the REPL. But, if your goal was to continue using the 2x zoom after code.py ends so you can have it for the REPL (perhaps with USB keyboard), then releasing the display doesn't help. |
The I think you want a |
Yeah... I figured something might be going out of scope, but the hard fault message said to file an issue, so I did.
Is that a thing that's possible? I didn't find any mention of such things in the docs. |
oh... actually... I just realized that the latest vs stable Environment variable docs are different, and I was looking at stable. Will CIRCUITPY_DISPLAY_WIDTH and CIRCUITPY_DISPLAY_HEIGHT work on something that's not a picodvi display? The latest docs page implies perhaps not? |
Not yet but you could add it.
Issue is still good. It shouldn't crash regardless.
I don't think so. It depends on the board_init's display init code. |
@samblenny Are you planning on working up a PR on this? If not, I think I have an update in mind that would work, although I don't know if it's optimal. If you're working on something, I'll wait and see what you come up with 😁 |
I don't have any plans for a PR on this any time soon. Just stumbled across the hard fault as I was using CircuitPython to check wiring for a thing I'm doing with Zephyr. Mostly I'm focused on the Zephyr stuff. If you've got a plan for a way to make REPL text more legible on these little high res displays, or at minimum to just stop the hard fault, that sounds great. I'm curious to see what you come up with. |
I have to clean up the PR and properly document it, but if you want to give the attached firmware a try and let me know how it works that would be cool. Add a CIRCUITPY_TERMINAL_SCALE=2 to the settings.toml file. The setting won't take effect until a hard reset or power cycle. firmware.zip (adafruit_feather_rp2350) |
tannewt's opinion is probably more relevant than mine. I'm not super familiar with the core implementation. Looking at the code diff in your PR though, what you've done seems plausible. |
The PR adds the functionality you want but doesn't fix the crash. We can leave the issue open until a separate crash fix. |
I can confirm that I have the same crash on a M4 express CAN board when I somewhat circumvented the problem by removing the terminal from all groups before the program ends, but it's still crashing if I do a PS: this is mentionned on this adafruit learning guide, for the record |
You can use the import atexit
@atexit.register
def release():
some_group.remove(displayio.CIRCUITPYTHON_TERMINAL) |
Would someone like to try fixing it here:
It should set it as the root group even if it is in a group. (Maybe force it to false.) Or we need a finalizer for all group objects that remove the children from them. |
Note that framebuffer displays always set it:
|
I can start poking at it, but my time is spread pretty thin at the moment so it may take a while. If anyone else has an interest don't wait for me 😁 |
CircuitPython version and board name
Code/REPL
Behavior
1+1
,print("hello world")
, orimport board
, the board resets. The only exception I found is if I press Enter on a blank line. In that case, I get another>>>
prompt. A single space, a#
, or anything else I tried would trigger a reset.Description
Hardware setup:
Libraries:
Notes on Reproducer Code:
supervisor.reset_terminal(160, 120)
without changing anything about the root group, the display shows 4 tiled copies of the 160, 120 terminal. But, the characters look kinda glitched. It seems possible there might be some kind of buffer overflow thing going on.Additional information
No response
The text was updated successfully, but these errors were encountered: