#Corruption issue

1 messages · Page 1 of 1 (latest)

grave bane
#

I started to run into the issue after trying out CircuitPy.Dev linked a couple days ago. However at the same time I was also fiddling with the stack size via CIRCUITPY_PYSTACK_SIZE = 2048 or higher multiples of 4.

#

It seems like once I’m in a stack overflow state (usually caused by an error in code) I get “stuck” in it, eventually leading to the file corruption. The only thing that has rescued me has been a storage.erase_filesystem

#

If I get a stack overflow and the message says increase stack size, how should I go about doing that? What are the limits?

#

I only started fiddling with CircuitPy.dev after I was having issues with stack overflows that I thought might have been cause by the Mu Editor, but it turns out that is independent

warm magnet
#

Which version of CircuitPython are you using?

grave bane
#

9.2.8... looks like 10 is available though based on my last lib install?

PS C:\Users\kheir> circup install adafruit_bmp3xx
Version 2.1.2 of circup is outdated. Version 2.2.3 was released Tuesday August 19, 2025.
Found device feather_stm32f405_express at E:\, running CircuitPython 9.2.8.
A newer version of CircuitPython (10.0.0) is available.
Get it here: https://circuitpython.org/board/feather_stm32f405_express
Searching for dependencies for: ['adafruit_bmp3xx']
Ready to install: ['adafruit_bmp3xx', 'adafruit_bus_device']

Installed 'adafruit_bmp3xx'.
Installed 'adafruit_bus_device'.
grave bane
#

I’ll try version 10 today. If I’m still running into issues, is this thread the best place to continue to report back to?

warm magnet
#

Yes. Ideally, start with a clean filesystem:

import storage
storage.erase_filesystem()

so you will need to have a backup of your stuff.

grave bane
#

hmm, still seeing corruption issues, but much earlier now. noticed corruption while running circup, but maybe it happened even before that just during the code copy. it seems copying from WSL to D: drive and windows prompting to overwrite code.py might be the primary suspects.

#

actually no. it seems circup might be the latest problem? as soon as I trigger the install the explorer window reopens and I can see the broken filenames and such. hmm

warm magnet
#

in WSL, try typing sync. Have you used other than WSL?

grave bane
#

i'm constantly hitting stack overflows or file corruption. the latest stack overflow was I forgot to copy an imported file so cody.py was trying to import foo.py but foo.py wasn't there and everything just vomits. no useful error code. just stack overflow increase stack size and then i try to increase the stack size and no dice

#

this is on 10.0.1

grave bane
#

Is there a way to turn on debug mode and idk, watch the memory climb until overflow? Simple import errors causing stack overflows is really painful and has me wanting to switch to Arduino or try Rust again.

warm magnet
#

There is not such a debug mode. Do you have some other CircuitPython boards you can try? The STM32F405 is not used that much, so it would be good to see if the problems are isolated to that port.

grave bane
#

Hmm, copy. I have rp2040s. I need the built in CAN stuff though but maybe I can reproduce without it

grave bane
warm magnet
grave bane
#

Well sadly my friend fried one of our stm32’s and I don’t have my spare around anymore for development. Any chance Adafruit has more in stock soon? Digikey just ran out too. Semi-local microcenter claimed stock on website but didn’t have any

warm magnet
#

If you use Windows directly or use native Linux instead of WSL, does it help?