Watch face changes when function buttons are used

I loaded a new face I made onto my Pebble Time 2.

https://apps.repebble.com/369c-bw_be04517dfcad479c9e001342

For some reason when I use one of the function buttons to launch an app, the watch face changes to another face in my list.

I tried this with a previous face I made, but when I use the single button to return from one of the menu buttons it displays again as expected.

I can load the face having this issue again, but it happens again.

What’s going on here?

1 Like

Another detail that may or may not be useful.

In the phone app I select start watchface for this face and it shows up on the watch. However, at some point on the phone I see a message that says watchface failed to load. The Start Watchface button turns red again.

1 Like

I see it on the watch. App says it is on the watch. But then -

1 Like

Bit difficult to know without seeing the code

1 Like

Didn’t think I did anything different in there, but I’m not sure I’d recognize it if I did.

See if this link works for you - http://tudza.org/369c_digital_bw.zip

1 Like

Does it change to the default analog face? i think it’s called TicToc? If so, that’s because your watchface is crashing and then it switches to the default system face.

1 Like

It switches to whatever face is in the line up next, like the color version of this same face, or to TicToc. The face runs happily for as long as I don’t push a menu button, so why is it crashing at that point?

1 Like

Check your window_unload code. If you check the watch logs, it should show you if it throws an error. Maybe you’re double-freeing a pointer or something like that?

1 Like

Oh you’re using JS. Could be a bug in Alloy, I would still check the logs and nee if it’s throwing an error or something.

1 Like

The emulator comes up and runs the watch face. All that comes up in the log of the build is

"[VERBOSE] xsHost.c:155: Found mod “pebble.moddable.tech”

Which is usual.

I do not recall seeing any warnings coming up. The overview screen of the four watch face projects says “Successful” highlighted in green for all of them.

1 Like

I mean logs when you run it on actual hardware. Presumably the same face-switching issue doesn’t show up in emulator?

1 Like

Where would I find logs from running it on my Pebble?

1 Like

Turn on the dev connection and run the pebble logs command with --cloudpebble. Or if you’re using Cloudpebble there might be a way to get logs through that

1 Like

I built your source locally with the latest sdk and it’s working normally, while with the store version it did revert to my previous watchface so I’d suspect it’s something wrong with cloudpebble’s build

1 Like

kilrah

Thank you very much for trying that out.

I’ve been avoiding going deeper into the tools than CloudPebble. Maybe I ought to have a look at the SDK sooner than later.

1 Like