Open Lawrence-RedFern opened 1 year ago
Using Kflash to erase the whole board has fixed the bugged board, it now returns
free gc heap memory : 1418 KB
free sys heap memory: 924 KB
kpu.memtest(): None utils.heap_free(): 946176 utils.gc_heap_size(): 1500000 gc.mem_alloc(): 15904 gc.mem_free(): 1466592
but I would still like to know how this could have happened in the first place. If anyone has encountered this issue before please let me know :)
Describe the bug I had been running a script on a machine which would identify an image. Without changing anything, the script starting reporting
when trying to execute the line
img = image.Image(sd_image_path).resize(224,224)
at the start of the script I have the line
utils.gc_heap_size(1500000)
to ensure there is space in the GC ram to resize the image. Previously I had no issue with this, and the images that I have been testing with have not increased in file size or resolution.When running the lines after my call to
utils.gc_heap_size(1500000)
print("kpu.memtest(): " + str(kpu.memtest()))
print("utils.heap_free(): " + str(utils.heap_free()))
print("utils.gc_heap_size(): " + str(utils.gc_heap_size()))
print("gc.mem_alloc(): " + str(gc.mem_alloc()))
print("gc.mem_free(): " + str(gc.mem_free()))
The board now prints out
which shows that my call to
utils.gc_heap_size(1500000)
is not working.If I run the exact same script on a healthy board, the same script returns what I'd expect which is
I'm wondering if there is any solution to this bug? I've tried running the lines
gc.enable()
gc.collect()
machine.reset
and also deiniting the .kmodel I have been using
a = kpu.deinit(task)
, all to no avail on the bugged board. The healthy board does not have any issues.Please complete the following information