Latest SDK emulator aborts

Since installing the latest SDK update the emulator consistently aborts after about 2 min. It would also sometimes hang or abort on the previous release but typically ran longer, now it always aborts after a short time. Would be nice if it would keep running so I can look at it while making tweaks. Can capture a screenshot, but that’s static and extra steps.

(I’m running default Ubuntu in Windows WSL)

1 Like

If you run pebble kill && pebble wipe and try running the emu again, does it still crash like that?

1 Like

The normal emulator command to start it works fine. On the previous build I did sometimes need to use the kill and wipe commands, but on the latest one it restarts fine after the abort. I just timed it and it runs for just over 2 min, then this, and the VmmemWSL process ramps up CPU until I close it.

1 Like

Can you share the exact command order that you’re running to reproduce this bug? Does it happen 100% of the time?

If you switch back to the older SDK and run the exact same test, does it fail?

1 Like

Full disclosure. I’m using Claude to do the coding. I asked and here’s what it says is being executed to start the emulator. It also clarified, “The the flash file delete is done before each launch to avoid boot hangs from a corrupted state.”

pkill -f qemu
sleep 2
find ~/.pebble-sdk -name “qemu_spi_flash.bin” -delete
cd ~/Round2_test && pebble install --emulator gabbro

Yes, since the latest update the abort happens 100% of the time after about 2 min. I was running the previous SDK version and this consistent abort was not happening. It would run much longer. It would sometimes hang but only sporadically.

1 Like

You should be using pebble killand pebble wipe instead.

But regardless, I’ve seen a couple people have issues with the emulator bleaking like this. I would make sure you’re on the latest Ubuntu (not LTS) and try again.

1 Like

Ok. I’ll use those commands, and check on the Ubuntu release. One more observation, the Q key brightens the display when it dims. I tried holding down the Q key and the emulator kept running past the time it would typically abort. Maybe that’s a clue.

1 Like

I’m on Ubuntu 24.04.4 LTS, which I’m told is the latest release.

1 Like

Q key is the back button. If you’re making a watchface itwon’t close the face and will only brighten the screen (represents the backlight being on) and yes 24.04’s the latest.

1 Like

So, the emulator screen brightening prevents the abort. It does go through a couple of cycles after initially displaying the face where the face goes away, “Pebble” appears on a black screen, then the face comes back on. After a few of those it aborts. I did change the code (or Claude did) to use “pebble kill” and “pebble wipe”, but the abort still happens.

One more ? Is there way to have the emulator simulate each of the button presses with the keyboard or mouse? Some keys interact with it but I don’t see where all the buttons are mapped to keys or mouse clicks. Thx.

1 Like

Q is back, W is up, S is select, and X is down. I believe arrow keys tork as well. The letter keys are chosen to mirror the rough button layout of the actual watch on a qwerty keyboard.

As for the face, does this happen with a default project too? It’s possible (though quite unlikely) that your app is actually crashing the emulator.

1 Like

Sorry if this is basic, but my understanding is the right 3 buttons are available for watchface options when it’s running. If I use W, S or X in the emulator it exits the face display. Is that how it should work? (Arrow keys do the same, exit the face).

1 Like

Yes, that’s correct. The right-side buttons can be captured by apps but not faces.

1 Like

Ok, I’ll need to rework my watchface designs. Is there any way to use buttons to toggle face options? Also I ran these commands, and the emulator aborted, so don’t think it’s my app causing it.

pebble kill

pebble wipe

cd ~/default_test

pebble install --emulator gabbro

1 Like

Default_test is a default project?

And no. Watchfaces do not have access to the buttons at all. Presumably they will have access to touchscreen whenever that eventually gets added to the SDK. The only input as of now is the accelerometer. It’s common to trigger actions using the accel_tap handler. If you want further customisation, use the @rebble/clay NPM package to make a settings page.

1 Like

Sorry, I’m the middle man here, but trying to learn, and help if possible. Here’s Claude’s response when I asked if default_test is a default project:

“Yes, it’s a default project — pebble new-project default_test generates a completely stock template with no custom code whatsoever. It’s the simplest possible Pebble app the SDK can create. That’s exactly what they’d mean by “default project.”“

So, at some point the touchscreen can be used for face input to trigger options without exiting the face? Looking into clay and a settings page.

1 Like

Re: the touchscreen, yes. There’s not been any confirmation of that AFAIK but everyone I’ve spaken to assumes that touch will be accessible for watchfaces.

The default project crashing means it’s not your other app that’s the issue. I don’t know how to debug further without debugging qemu itself, unfortunately

1 Like

Ok, thanks. I’ll look forward to touchscreen and ponder clay options. Persistent emulator runs would be good, but I can work around it.

1 Like

(Thanks @Flynn for providing all this help!)

1 Like

I have an update and some good news. I did a BIOS update yesterday and started doing designs and emulator runs today, and it’s not aborting. Seems like an odd connection, but perhaps some MOBO, CPU, memory, etc. timing issues were the cause and have now been fixed. In any case wanted to let you know.

1 Like