Skip to content
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

MatrixPortal S3: Crash into Safemode after initalizing RGB matrix #9891

Closed
RetiredWizard opened this issue Dec 16, 2024 · 4 comments
Closed

Comments

@RetiredWizard
Copy link

RetiredWizard commented Dec 16, 2024

CircuitPython version

S3 Bucket: 2024-12-06T15:01:20.000Z adafruit-circuitpython-adafruit_matrixportal_s3-en_US-20241206-main-PR9873-c41d452.uf2:
Adafruit CircuitPython 9.2.1-26-gc41d4527b1 on 2024-12-06; Adafruit MatrixPortal S3 with ESP32S3

Artifact from #9889:
Adafruit CircuitPython 9.2.1-33-gbb49f770a1 on 2024-12-15; Adafruit MatrixPortal S3 with ESP32S3

Code/REPL

import board, displayio, framebufferio, rgbmatrix

displayio.release_displays()

addrPins = [
        board.MTX_ADDRA,
        board.MTX_ADDRB,
        board.MTX_ADDRC,
        board.MTX_ADDRD
]

matrix = rgbmatrix.RGBMatrix(
    width=64,height=32, bit_depth=2,
    rgb_pins=[
        board.MTX_R1,
        board.MTX_G1,
        board.MTX_B1,
        board.MTX_R2,
        board.MTX_G2,
        board.MTX_B2
    ],
    addr_pins=addrPins,
    clock_pin=board.MTX_CLK,
    latch_pin=board.MTX_LAT,
    output_enable_pin=board.MTX_OE,
    tile=1, serpentine=True,
)

Behavior

Adafruit CircuitPython 9.2.1-33-gbb49f770a1 on 2024-12-15; Adafruit MatrixPortal S3 with ESP32S3
>>> import qmatrix
>>> 
>>> a

[12:35:00.454] Disconnected
[12:35:01.455] Warning: Could not open tty device (No such file or directory)
[12:35:01.455] Waiting for tty device..
[12:35:06.462] Connected
Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

Description

I actually didn't run the above code in code.py/main.py but manually imported from the REPL. I haven't tested yet what happens if the code is run from the REPL Putting the above program segment in code.py and then typing a random character into the REPL results in the same crash.

After importing a file with the above code, if you type a random character into the REPL, which would normally give a NameError, the board crashes into safe mode.

Additional information

No response

@jepler
Copy link
Member

jepler commented Dec 16, 2024

Is this new since 9.2.1? If so it could be #9865 which was supposed to fix a problem with an incorrect initialization leading to a crash, but maybe I got it wrong.

@RetiredWizard
Copy link
Author

Indeed, the problem starts with adafruit-circuitpython-adafruit_matrixportal_s3-en_US-20241205-main-PR9865-2bb9fc4.uf2. The build just prior to that one does not exhibit the issue.

@jepler
Copy link
Member

jepler commented Dec 16, 2024

Thanks for testing that. We may just want to revert that PR in its entirety, since it only caused problems when a mistake was made in matrix initialization, rather than breaking them entirely.

@RetiredWizard
Copy link
Author

I think this has been resolved and Dan reopened the issue that prompted the now reverted update so this issue can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants