Wouterdek/NodeNetwork

Crashes with latest stable ReactiveUI

Const-me opened this issue · 7 comments

With the latest stable ReactiveUI 11.5.17, crashes somewhere deep inside.

Here's some info from VS debugger:

$exception	{"Method not found: 'System.Windows.Controls.ControlEvents System.Windows.Controls.EventExtensions.Events(System.Windows.Controls.Control)'."}	System.MissingMethodException
block	{Method = {Void <SetupConnections>b__30_0(System.Reactive.Disposables.CompositeDisposable)}}	System.Action<System.Reactive.Disposables.CompositeDisposable>

Block:

block	{Method = {Void <SetupConnections>b__30_0(System.Reactive.Disposables.CompositeDisposable)}}	System.Action<System.Reactive.Disposables.CompositeDisposable>
Method	{Void <SetupConnections>b__30_0(System.Reactive.Disposables.CompositeDisposable)}	System.Reflection.MethodInfo {System.Reflection.RuntimeMethodInfo}
Target	{NodeNetwork.Views.NetworkView}	object {NodeNetwork.Views.NetworkView}
_invocationCount	0x0000000000000000	System.IntPtr
_invocationList	null	object
_methodBase	{Void <SetupConnections>b__30_0(System.Reactive.Disposables.CompositeDisposable)}	object {System.Reflection.RuntimeMethodInfo}
_methodPtr	0x00007ffe82b6ae00	System.IntPtr
_methodPtrAux	0x0000000000000000	System.IntPtr
_target	{NodeNetwork.Views.NetworkView}	object {NodeNetwork.Views.NetworkView}

I’ve downgraded 3 nuget packages ReactiveUI, ReactiveUI.WPF, and ReactiveUI.Events.WPF to the version 11.1.20 that you list as “>=”, and it worked fine afterwards without any other changes.

Using WPF in .NET framework 4.7.2.

Any ReactiveUI update results in IBitmap not found in Endpoint.cs and NodeViewModel.cs when running any of the example apps.

Installing Splat.Drawing resolves this and "partially" works in that it runs. However after drawing a connection between nodes, one is left in its place when moving the one of the nodes. Additionally there is some glitchy behavior.

All versions up to 11.3.8 work, you need to add ReactiveUI.Drawing 11.3.8 or Splat.Drawing 9.4.5 too as IBitmap was moved from Splat to Splat.Drawing. These are the packages I have tested with successfully
ReactiveUI.Events.WPF Version="11.3.8"
ReactiveUI.WPF Version="11.3.8"
Splat.Drawing Version="9.4.5"
Anything newer than this doesn't work. Using the cutline after removing then redrawing, results in a non connected line that is not removable.

The crashes are indeed due to a move of IBitmap from Splat to Splat.Drawing, which can be fixed by adding a reference to the new package and importing the correct namespace.
The other glitches are due to commit 2402 in ReactiveUI. The transitions were renamed, which breaks the ViewModelViewHostNoAnimations class in this project. That commit should have been marked as a breaking change and therefore have bumped the ReactiveUI major version number.

Anyway, I'll fix both issues.

Excellent, appreciate you addressing this.

I think that's why I bumped from 11.3 to 11.4 series btw, just generally I don't consider XAML as major change.

That whole transition thing might be going through a revamp btw even further since it's a constant theme with our users complaining about it to give you a heads up.

That whole transition thing might be going through a revamp btw even further since it's a constant theme with our users complaining about it to give you a heads up.

Thanks for the heads up. Is there a recommended way to disable animations on a ViewModelViewHost?

That's the complaint by some users with the ViewModelViewHost that you can't turn on/off the animation easily.

I'm considering making a global way to change what control it uses as part of this change.