reactiveui/splat

[Bug]: Router randomly stops showing views on navigation

Leon99 opened this issue ยท 9 comments

Leon99 commented

Describe the bug ๐Ÿž

Routing stops showing views on the second (and further) navigation to the same view instance.

Reproduction repository

https://github.com/Leon99/AvaRxUI.git

Expected behavior

Routing shows views on the second (and further) navigation to the same view instance.

Screenshots ๐Ÿ–ผ๏ธ

AvaRxUI_cJYj9zGyv9

IDE

Rider Windows

Operating system

Windows 11

ReactiveUI Version

19.4.1

Additional information โ„น๏ธ

Same code works fine using Avalonia's built-in routing.
Same code works fine if view instances are not reused (registered as not a singleton).
Same code works fine when using Splat service locator.

You find all the fun Avalonia bugs hey :)

Leon99 commented

You're welcome :)

Leon99 commented

Works fine when not using MS DI or DryIoc. Should've tried it before reporting... Apparently there's more to #1024. @ChrisPulman ๐Ÿ‘‹

I think I know what the issue is, Avalonia have their own locator, when using ReactiveUI there's a merge that happens from the Avalonia Locator to the Splat locator, however when we use yet another effective locator i.e. DryIoc we're introducing a 3rd locator into the mix.

I will try identity when the Avalonia to Splat merge happens so we can ensure that we then merge forward again after this has happened otherwise we will be missing a few of the Avalonia services in the 3rd locator. They may be in the Splat locator but that's not the way we intend it to work.

As discussed in #1028 this is a known Avalonia bug. Follow up there.

Leon99 commented

Thanks for the investigation @ChrisPulman!
I'm confused though - if AvaloniaUI/Avalonia#12333 is the root cause, then how come the issue is not reproduced when using TransitioningContentControl directly, and also not reproduced when only Splat is used for IoC?

Leon99 commented

...with that said, setting PageTransition="{x:Null}" fixes the issue.

I was able to reproduce the error when using any of the DI's the page transition animation is the root of the issue, there's an open bug in Avalonia which matches the exact issue being observed. If you set the transition to null this will disable the transition and therefore not fail.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.