Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on watchOS 10.0.1 #24

Open
reedes opened this issue Sep 27, 2023 · 12 comments
Open

Crash on watchOS 10.0.1 #24

reedes opened this issue Sep 27, 2023 · 12 comments

Comments

@reedes
Copy link
Contributor

reedes commented Sep 27, 2023

I used app for first time after three weeks, as rec center was closed for renovations.

Started workout. After a few minutes in exercise looked at watch to see it back on watch face. Clicked app where it appeared to be starting from scratch main (showing routine list screen), suggesting app had crashed and wasn't able to restore session.

Haven't seen again, nor had I collected any crash data.

If happens again I'll dig in further.

UPDATE: See suggested workaround below!

@reedes
Copy link
Contributor Author

reedes commented Sep 29, 2023

I can get it to happen repeatedly. Will investigate.

@reedes
Copy link
Contributor Author

reedes commented Oct 4, 2023

Testing with Xcode 15.0, app crashed with "Thread 1: signal SIGTERM" crash. Will try to reproduce and determine cause.

@reedes
Copy link
Contributor Author

reedes commented Oct 12, 2023

So far not crashing when running on new build in Xcode 15.0 on latest watchOS on my Ultra.

I'll work on fixing some of the cosmetic changes and test some more before posting a new release.

@reedes
Copy link
Contributor Author

reedes commented Oct 13, 2023

Cosmetic changes completed. Will test for a day before pushing new 1.11.0 release.

@reedes
Copy link
Contributor Author

reedes commented Oct 14, 2023

Additional changes necessary.

Seems likely it was a "scene-create" watchdog error, where during transition to .active it hung on the core data operation.

Tests okay since change, where I ran routine and then disrupted wi-fi connection to cause the error to occur.

Will leave open for a week or two to see if others experience crashes with the new release.

@reedes
Copy link
Contributor Author

reedes commented Oct 14, 2023

Apps submitted for review.

@reedes
Copy link
Contributor Author

reedes commented Oct 16, 2023

It's still an issue.

In some cases the app unloads from memory, returning to watch face, where the session is preserved.

In other cases the app appears to crash, where the session is lost.

Doesn't seem to matter whether wi-fi is enabled or not.

@reedes
Copy link
Contributor Author

reedes commented Oct 16, 2023

Appears to be motion related. Compare app stability when sitting versus walking or working out.

@reedes
Copy link
Contributor Author

reedes commented Oct 17, 2023

Examining system_logs.logarchive in sysdiagnose, it looks like a background task is running in excess of 30 seconds and is at risk of termination.

This could be the blocking of a network operation to sync the iCloud data. Will investigate further.

@reedes
Copy link
Contributor Author

reedes commented Oct 17, 2023

Ruled out the two callers of performBackgroundTask, namely storeRemoteChange in TrackerLib and handleTaskAction in GroutUI. (By commenting both out and reproducing problem.)

So it appears that there's something amiss with CloudKit syncing.

@reedes
Copy link
Contributor Author

reedes commented Oct 19, 2023

The cause of the watchdog terminations appears to be the CloudKit syncing background process, as described here: https://stackoverflow.com/questions/73401639/very-slow-sync-of-coredata-cloudkit-on-watchos

@reedes
Copy link
Contributor Author

reedes commented Dec 8, 2023

I'll suggest a workaround of modifying your wi-fi configuration on your watch to deter its attempts to sync its iCloud store.

Specifically, in Settings/Wi-Fi on the watch:

  1. In "Auto Hotspot Settings" configure as "Ask to Join"

  2. Select your network (eg, "My Fitness Club") and 'Forget this Network'

This isn't ideal, but should provide some stability until a longer-term solution is found and implemented.

Note that this isn't necessary if you're not seeing the crashes. (Your wi-fi is better than mine!)

Note that temporarily disabling wi-fi (on the watch) did not avoid the crashes for me, but you could try it!

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

No branches or pull requests

1 participant