Skip to content

[Bug]: Calling WithFallbackConverter results in a stack overflow #4293

@meld-cp

Description

@meld-cp

Describe the bug 🐞

Calling WithFallbackConverter results in a StackOverflow

Step to reproduce

Try to run:

var app = RxAppBuilder.CreateReactiveUIBuilder()
	.WithWpf()
	.WithFallbackConverter( new DefaultFallbackConverter() )
	.BuildApp()
;

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

A default fallback converter being used and no stack overflow

Screenshots 🖼️

No response

IDE

Visual Studio 2022

Operating system

Windows

Version

No response

Device

No response

ReactiveUI Version

23.1.1

Additional information ℹ️

WPF Stacktrace:

[System.StackOverflowException unhandled]
ReactiveUI!ReactiveUI.Helpers.ArgumentExceptionHelper.ThrowIfNull(object argument, string paramName) Line 25
	at /_/src/ReactiveUI/Helpers/ArgumentExceptionHelper.cs(25)
ReactiveUI!ReactiveUI.Builder.BuilderMixins.WithFallbackConverter(ReactiveUI.Builder.IReactiveUIBuilder builder, ReactiveUI.IBindingFallbackConverter converter) Line 1278
	at /_/src/ReactiveUI/Mixins/BuilderMixins.cs(1278)
ReactiveUI!ReactiveUI.Builder.BuilderMixins.WithFallbackConverter(ReactiveUI.Builder.IReactiveUIBuilder builder, ReactiveUI.IBindingFallbackConverter converter) Line 1279
	at /_/src/ReactiveUI/Mixins/BuilderMixins.cs(1279)
[The 1 frame(s) above this were repeated 32060 times]
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(nint hwnd, int msg, nint wParam, nint lParam, ref bool handled)
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(nint hwnd, int msg, nint wParam, nint lParam, ref bool handled)
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg)
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(nint hwnd, int msg, nint wParam, nint lParam)
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)
MyApp.dll!MyApp.Wpf.App.Main()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions