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

Hexpansion removal during eeprom operation crashes badge. #188

Open
ChrisDick opened this issue Aug 4, 2024 · 1 comment
Open

Hexpansion removal during eeprom operation crashes badge. #188

ChrisDick opened this issue Aug 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ChrisDick
Copy link
Contributor

Describe the bug
unplugging an hexpansion with an eeprom during a read or write operation crashes the badge:

Hexpansion files: ['app.py']
Traceback (most recent call last):
File "main.py", line 43, in
File "system/scheduler/init.py", line 243, in run_forever
File "asyncio/core.py", line 1, in run_until_complete
File "asyncio/core.py", line 1, in run_until_complete
File "asyncio/core.py", line 1, in run_until_complete
File "system/scheduler/init.py", line 239, in _main
File "asyncio/funcs.py", line 1, in gather
File "asyncio/core.py", line 1, in run_until_complete
File "system/eventbus.py", line 101, in run
File "asyncio/funcs.py", line 1, in gather
File "asyncio/core.py", line 1, in run_until_complete
File "system/hexpansion/app.py", line 213, in handle_hexpansion_insertion
File "system/hexpansion/app.py", line 175, in _mount_eeprom
File "system/hexpansion/app.py", line 101, in _launch_hexpansion_app
File "eeprom_partition.py", line 14, in readblocks
File "bdevice.py", line 31, in getitem
File "bdevice.py", line 60, in _rslice
File "eeprom_i2c.py", line 102, in readwrite
OSError: [Errno 19] ENODEV
MicroPython v1.23.0-preview.379.gcfd5a8ea3.dirty on 2024-08-04; Tildagon with ESP32S3
Type "help()" for more information.

Version: v1.9.0

To Reproduce
insert a hexpansion with valid eeprom header and app then remove at just the wrong moment.

Expected behavior
badge aborts operation and continues

@ChrisDick ChrisDick added the bug Something isn't working label Aug 4, 2024
@Robotmad
Copy link
Contributor

I've also seen effectively the same crash happen at line 101: I'll do a PR for proposed fix through use of try except.

Hexpansion files: ['app.mpy']
Traceback (most recent call last):
File "main.py", line 43, in
File "system/scheduler/init.py", line 243, in run_forever
File "asyncio/core.py", line 1, in run_until_complete
File "asyncio/core.py", line 1, in run_until_complete
File "asyncio/core.py", line 1, in run_until_complete
File "system/scheduler/init.py", line 239, in _main
File "asyncio/funcs.py", line 1, in gather
File "asyncio/core.py", line 1, in run_until_complete
File "system/eventbus.py", line 101, in run
File "asyncio/funcs.py", line 1, in gather
File "asyncio/core.py", line 1, in run_until_complete
File "system/hexpansion/app.py", line 213, in handle_hexpansion_insertion
File "system/hexpansion/app.py", line 175, in _mount_eeprom
File "system/hexpansion/app.py", line 101, in _launch_hexpansion_app
File "eeprom_partition.py", line 14, in readblocks
File "bdevice.py", line 31, in getitem
File "bdevice.py", line 60, in _rslice
File "eeprom_i2c.py", line 101, in readwrite
OSError: [Errno 19] ENODEV
MicroPython 5114f2c-dirty on 2024-08-04; Tildagon with ESP32S3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants