Graphics OK in emulator but crashing on watch #5364
Replies: 1 comment
-
Posted at 2022-11-09 by @fanoush it is interesting that the display is 240x240 (bangle 1) and 176x176 (b2) and yet you use coordinates like Posted at 2022-11-09 by BillV Well, my first version only drew five lines which does fit on a Bangle 2 - I increased it to 100 just to see if I could make it break on the emulator (and I couldn't). So far as I can tell the graphics system happily ignores coordinates outside the visible bounds, but anyway my problem occurs when trying to draw within the visible area. The attached image shows the device (black image) breaking partway through the final line, whereas the emulator (white) completes the last line. Attachments: Posted at 2022-11-11 by @gfwilliams I think your problem is just that you're uploading the code and executing it immediately. What happens is the IDE uploads the code, and then checks to see if the watch is responding. It's not because it's spending so long executing the code, so it tries to send commands to break out of execution. What you need is to execute your code after a delay - try this:
Posted at 2022-11-13 by BillV Many thanks, Gordon, that fixes the problem in my test app. I haven't yet got it working in the clock for which this was a prototype, but I will persevere! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-11-09 by BillV
I want to draw lines of varying width and attach my test app. This runs fine in the emulator up to at least 100 iterations (see line 34), although it is slow. On my watch , however, it breaks while drawing the fourth line and the console shows:
Process.memory() shows usage pretty steady at about 250 with 11750 free so if there is a memory leak I'm not seeing it.
Any ideas how I can fix this? Thanks.
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions