Skip to content

Commit 5b240d9

Browse files
Increase stack size to 32KB for camera
Perhaps this could be done on a per-app basis, where apps can specify in their manifest how much they would like?
1 parent f7a42f1 commit 5b240d9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • internal_filesystem/lib/mpos

internal_filesystem/lib/mpos/apps.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ def execute_script_new_thread(scriptname, is_file, is_launcher, is_graphical):
6666
try:
6767
# 168KB maximum at startup but 136KB after loading display, drivers, LVGL gui etc so let's go for 128KB for now, still a lot...
6868
# But then no additional threads can be created. A stacksize of 32KB allows for 4 threads, so 3 in the app itself, which might be tight.
69-
# 16KB allows for 10 threads in the apps, but seems too tight for urequests on unix (desktop) targets
69+
# 16KB allows for 10 threads in the apps, but seems too tight for urequests on unix (desktop) targets
70+
# 32KB seems better for the camera, but it forced me to lower other app threads from 16 to 12KB
7071
#_thread.stack_size(24576) # causes camera issue...
71-
_thread.stack_size(16384)
72+
#_thread.stack_size(16384)
73+
_thread.stack_size(32*1024)
7274
_thread.start_new_thread(execute_script, (scriptname, is_file, is_launcher, is_graphical))
7375
except Exception as e:
7476
print("main.py: execute_script_new_thread(): error starting new thread thread: ", e)

0 commit comments

Comments
 (0)