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

Hard crash when connecting to Code Editor using BLE over Mobile #5511

Closed
makermelissa opened this issue Oct 25, 2021 · 3 comments · Fixed by #5524
Closed

Hard crash when connecting to Code Editor using BLE over Mobile #5511

makermelissa opened this issue Oct 25, 2021 · 3 comments · Fixed by #5524
Assignees
Milestone

Comments

@makermelissa
Copy link
Collaborator

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit CLUE nRF52840 Express with nRF52840

Code/REPL

[Disconnected]
[Connected]
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
[Disconnected]
[Connected]
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Attempted heap allocation when VM not running.
Please file an issue with the contents of your CIRCUITPY drive at 
https://github.com/adafruit/circuitpython/issues

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

Behavior

Upon pairing and connecting, while a serial terminal is connected, I get the above output.

Description

This does not happen when connecting using the Chrome Browser over MacOS

Additional information

No response

@tannewt
Copy link
Member

tannewt commented Oct 25, 2021

What device are you testing from?

@makermelissa
Copy link
Collaborator Author

The Samsung Galaxy Tab A7 Lite.

@tannewt
Copy link
Member

tannewt commented Oct 28, 2021

The issue is that the listdir entry struct is now 28 bytes with the uint64_t timestamp that was added. BLE packets will be 20 bytes at their smallest. The crash was due to packet buffer raising an exception when trying to write a 28 byte packet over a connection with a 20 byte packet size (MTU.)

dhalbert pushed a commit that referenced this issue Oct 29, 2021
when the MTU of the BLE connection is smaller than the 28 bytes of
the header. (The smallest possible MTU is 20.)

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

Successfully merging a pull request may close this issue.

3 participants