Are you invoking safeAddExercice asynchronously? If so, the EnvironmentObjects may not be set at the time the callback is applied because it is not happening during the lifecycle of the view.
You could instead pass the environment object at the point when you schedule the exercise, thereby guaranteeing that the object will be available. E.g.:
var body: some View {
		Button("Add Exercise") {
				let subman = self.subscriptionManager
				DispachQueue.main.async {
						safeAddExercice(subman)
				}
		}
}
func safeAddExercice(_ subman: SubscriptionManager) {
		// operate on subman rather than self.subscriptionManager
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: