From d387e3983084f4ca1ead6bcc083339de1a1c4096 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 20 Apr 2025 00:13:03 +0200 Subject: [PATCH] Bigger stack size for apps --- appstore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appstore.py b/appstore.py index 7720194a..465f5746 100644 --- a/appstore.py +++ b/appstore.py @@ -415,6 +415,7 @@ import _thread # Function to execute the child script as a coroutine def execute_script(script_source, lvgl_obj): + print(f"Thread identifier: {_thread.get_ident()}") try: script_globals = { 'lv': lv, @@ -483,7 +484,7 @@ def app_main(): gc.collect() print("Free memory before loop:", gc.mem_free()) try: - _thread.stack_size(8192) + _thread.stack_size(131072) # 168KB maximum at startup but 136KB after loading display, drivers, LVGL gui etc so let's go for 128KB for now, still a lot... _thread.start_new_thread(execute_script, (script_buffer, subwindow)) print("Event loop started in background thread") except Exception as e: