element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
Apache License 2.0
1.72k stars 479 forks source link

Crash creating new DM when the new WYSIWYG is enabled #7689

Closed giomfo closed 9 months ago

giomfo commented 9 months ago

Steps to reproduce

Outcome

What did you expect?

open the pending DM

What happened instead?

the app crashes.

Additional info: Log: “Element/WysiwygInputToolbarView.swift:261: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value”

The crash occurs here: .environmentObject(AvatarViewModel(avatarService: AvatarService(mediaManager: toolbarViewDelegate.mediaManager())))

Your phone model

No response

Operating system version

No response

Application version

1.11.2

Homeserver

No response

Will you send logs?

No

giomfo commented 9 months ago

The crash is due to the deferred creation of the room. Indeed the DM creation is deferred when the first message is sent