Skip to content

Conversation

@spic17
Copy link
Contributor

@spic17 spic17 commented Jan 3, 2026

Version 1.5.0 does crash on my device (SAP6_IA) quite frequently. This happens particularly predictably when alternating correct measurements with errors (magnetic, laser). Debugging revealed that most frequently there occured memory errors in "create_big_text_group" followed by "measure" (pops up as an "outer memory error") and quite seldomly somewhere else, e.g. when opening the menu. Apparently, there is no real memory problem, but the crappy garbage collection of embedded python cannot handle the fast switches or some such. To reduce memory impact and so indirectly the gc problem, I replaced the most frequent error messages by images (you could of cause create an image with the message text - I did more like some pictograms :). The result is much better but not perfect. Therefore, I also put some try/catch around the memory intensive processes. this seems to come without any obvious penalty and does not impact sending measurements via bluetooth. Just there is no text displayed in case of a caught memory error and in most cases the gc seems to catch up then somewhere downstream. So with these two modifications my device now works like a charm, with no critical out of memory errors whatsoever, anymore. In case the described problem occurs for others, too, I propose to include these modifications in the main branch (or at least the image-part).

…s happens particularly predictably when alternating correct measurements with errors (magnetic, laser). Debugging revealed that most frequently there occured memory errors in "create_big_text_group" followed by "measure" (pops up as an "outer memory error") and quite seldomly somewhere else, e.g. when opening the menu. Apparently, there is no real memory problem, but the crappy garbage collection of embedded python cannot handle the fast switches or some such. To reduce memory impact and so indirectly the gc problem, I replaced the most frequent error messages by images (you could of cause create an image with the message text - I did more like some pictograms :). The result is much better but not perfect. Therefore, I also put some try/catch around the memory intensive processes. this seems to come without any obvious penalty and does not impact sending measurements via bluetooth. Just there is no text displayed in case of a caught memory error and in most cases the gc seems to catch up then somewhere downstream. So with these two modifications my device now works like a charm, with no critical out of memory errors whatsoever, anymore. In case the described problem occurs for others, too, I propose to include these modifications in the main branch (or at least the image-part).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant