Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Versa crashes and reboots often when side-loading my watch-face app

This happens inconsistently, but about once every three side-loads. Is there a way I can debug this / help you debug this? The only information I get in the console is not all that helpful:

 

[HOST][19:03:56]App closed on device, unloading companion in 3 seconds…

If I have to restart and reconnect to the server every three or so side-loads, development slows to a crawl. 😕

Some help would be appreciated!

 

Best Answer
6 REPLIES 6

This is really unbearable. Could I please get a reply to this?

Best Answer
0 Votes

PS: It also happens without explicitly side-loading. It happens more often when connected to the development server, but it has also happened twice while I was walking on the street. The watch mistakenly recognises a run, I close the exercise app, and it crashes.

 

Are logs / core-dumps being kept anywhere that could help anyone debug this behaviour?

Best Answer
0 Votes

I'm not making this up. Right after writing that last post, I got an e-mail notification on my watch, and it crashed and rebooted. It's like the slightest thing can set it off.

Best Answer
0 Votes

Could it be that your clockface is hogging the CPU for too long? IIRC, I've had Bad Things happen when doing that.

 

I'd approach debugging by progressively commenting out chunks of code.

 

Another way to debug things like this is to write diagnostic messages (eg, '4:30pm: starting loadFiles') to a file. After a crash, read the file so you can see what executed and what didn't.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thanks for your response. A custom clock-face is indeed what I'm working on. But it doesn't do anything CPU-intensive, let alone in a single thread. It is actually quite snappy.

 

The progressively-commenting-out-code / binary-search approach won't work here, because the crashes are not consistent. My intuition is that there's a memory leak, and the OS eventually gives up and reboots. But I have no way to verify it. What I'm hoping is that the system has internal logs or core-dumps that the actual FitBit developers could look at.

Best Answer
0 Votes

Inconsistent crashes are a pain to debug. Nevertheless, if it's crashing as often as you say, progressive commenting could still be of some value.

 

There is an API call for reporting available memory; you could trying using that to track behaviour.

Peter McLennan
Gondwana Software
Best Answer
0 Votes