Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ReactiveUI.Maui latest version on MAUI .net 8 App is getting carshed with below error #3930

Open
RAMESHKUMAR502 opened this issue Nov 6, 2024 · 0 comments
Labels

Comments

@RAMESHKUMAR502
Copy link

RAMESHKUMAR502 commented Nov 6, 2024

Describe the bug 🐞

Update to ReactiveUI.Maui latest version on MAUI .net 8 App is getting carshed with below error

Step to reproduce

Upgarded to the latest ReactiveUI.Maui App is getting carshed with below error with below Error

2024-11-06 08:39:39.062997+0530 lsmobile[92093:2133653] Unhandled managed exception: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread. (UIKit.UIKitThreadAccessException)
   at UIKit.UIApplication.EnsureUIThread() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 111
   at UIKit.UIViewController.get_View() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/UIKit/UIViewController.g.cs:line 3288
   at Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer.get_NativeView()
   at Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer.Microsoft.Maui.IElementHandler.get_PlatformView()
   at Microsoft.Maui.Handlers.ViewHandler.MapInvalidateMeasure(IViewHandler handler, IView view, Object args)
   at Microsoft.Maui.CommandMapper`2.<>c__DisplayClass6_0[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.IViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IElementHandler h, IElement v, Object o)
   at Microsoft.Maui.CommandMapper.InvokeCore(String key, IElementHandler viewHandler, IElement virtualView, Object args)
   at Microsoft.Maui.CommandMapper.Invoke(IElementHandler viewHandler, IElement virtualView, String property, Object args)
   at Microsoft.Maui.Controls.Handlers.Compatibility.ViewHandlerDelegator`1[[Microsoft.Maui.Controls.NavigationPage, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].Invoke(String command, Object args)
   at Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer.Microsoft.Maui.IElementHandler.Invoke(String command, Object args)
   at Microsoft.Maui.Controls.VisualElement.InvalidateMeasureOverride()
   at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IView.InvalidateMeasure()
   at Microsoft.Maui.Controls.VisualElement.InvalidateMeasureInternal(InvalidationTrigger trigger)
   at Microsoft.Maui.Controls.Page.InternalChildrenOnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCollectionChanged(NotifyCollectionChangedEventArgs )
   at System.Collections.ObjectModel.ObservableCollection`1[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCollectionChanged(NotifyCollectionChangedAction , Object , Int32 )
   at System.Collections.ObjectModel.ObservableCollection`1[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].InsertItem(Int32 , Element )
   at System.Collections.ObjectModel.Collection`1[[Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].Add(Element item)
   at Microsoft.Maui.Controls.NavigationPage.PushPage(Page page)
   at Microsoft.Maui.Controls.NavigationPage.PushAsyncInner(Page page, Boolean animated)
   at Microsoft.Maui.Controls.NavigationPage.PushAsync(Page page, Boolean animated)
   at ReactiveUI.Maui.RoutedViewHost.<>c__DisplayClass3_0.<<-ctor>b__8>d.MoveNext() in c:\temp\releaser\ReactiveUI\src\ReactiveUI.Maui\RoutedViewHost.cs:line 94
--- End of stack trace from previous location ---
   at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception )
   at System.Reactive.ExceptionHelpers.Throw(Exception )
   at System.Reactive.Stubs.<>c.<.cctor>b__2_1(Exception ex)
   at System.Reactive.AnonymousSafeObserver`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnError(Exception )
   at System.Reactive.Sink`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ForwardOnError(Exception )
   at System.Reactive.Linq.ObservableImpl.SelectMany`2.TaskSelector._[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCompletedTask(Task`1 )
   at System.Reactive.Linq.ObservableImpl.SelectMany`2.TaskSelector._[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnNext(Page )
   at System.Reactive.Sink`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ForwardOnNext(Page )
   at System.Reactive.Linq.ObservableImpl.SelectMany`2.ObservableSelector._.InnerObserver[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnNext(Page )
   at System.Reactive.Linq.ObservableImpl.ReturnImmediate`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].Run(IObserver`1 )
   at System.Reactive.BasicProducer`1.<>c[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<SubscribeRaw>b__1_0(ValueTuple`3 tuple)
   at System.Reactive.Concurrency.Scheduler.<>c__76`1[[System.ValueTuple`3[[System.Reactive.BasicProducer`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Reactive, Version=6.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263],[System.Reactive.Disposables.SingleAssignmentDisposable, System.Reactive, Version=6.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263],[System.IObserver`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<ScheduleAction>b__76_0(IScheduler _, ValueTuple`2 tuple)
   at System.Reactive.Concurrency.CurrentThreadScheduler.Schedule[ValueTuple`2](ValueTuple`2 , TimeSpan , Func`3 )
   at System.Reactive.Concurrency.LocalScheduler.Schedule[ValueTuple`2](ValueTuple`2 , Func`3 )
   at System.Reactive.Concurrency.Scheduler.ScheduleAction[ValueTuple`3](IScheduler , ValueTuple`3 , Func`2 )
   at System.Reactive.BasicProducer`1[[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SubscribeRaw(IObserver`1 , Boolean )
   at System.ObservableExtensions.SubscribeSafe[Page](IObservable`1 , IObserver`1 )
   at System.Reactive.Linq.ObservableImpl.SelectMany`2.ObservableSelector._[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SubscribeInner(IObservable`1 )
   at System.Reactive.Linq.ObservableImpl.SelectMany`2.ObservableSelector._[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnNext(IRoutableViewModel )
   at System.Reactive.Sink`1[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null]].ForwardOnNext(IRoutableViewModel )
   at System.Reactive.ObserveOnObserverLongRunning`1[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null]].Drain()
   at System.Reactive.ObserveOnObserverLongRunning`1.<>c[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null]].<.cctor>b__17_0(ObserveOnObserverLongRunning`1 self, ICancelable cancelable)
   at System.Reactive.Concurrency.DefaultScheduler.LongRunning.LongScheduledWorkItem`1.<>c[[System.Reactive.ObserveOnObserverLongRunning`1[[ReactiveUI.IRoutableViewModel, ReactiveUI, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null]], System.Reactive, Version=6.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263]].<.ctor>b__3_0(Object thisObject)
   at System.Reactive.Concurrency.ConcurrencyAbstractionLayerImpl.<>c.<StartThread>b__8_0(Object itemObject)
   at System.Threading.Thread.StartCallback()

=================================================================
Native Crash Reporting

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

=================================================================
Native stacktrace:

	0x10cf29445 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
	0x10cec7e4e - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_handle_native_crash
	0x10d0c2b08 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : sigabrt_signal_handler.cold.1
	0x10cf28d80 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_runtime_setup_stat_profiler
	0x1159c9fdd - /usr/lib/system/libsystem_platform.dylib : _sigtramp
	0x0 - Unknown
	0x114548d1c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
	0x10c7410a7 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libxamarin-dotnet-debug.dylib : xamarin_unhandled_exception_handler
	0x10cfc6ce4 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
	0x10cec7a4f - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
	0x10cec5a95 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_handle_exception
	0x10cf3d839 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : interp_throw
	0x10cf3b98c - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : interp_throw_ex_general
	0x10cf35bb5 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_interp_exec_method
	0x10cf2acd3 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : interp_runtime_invoke
	0x10d0112d8 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : mono_runtime_invoke_checked
	0x10d02af52 - /Users/KUMARR2/Library/Developer/CoreSimulator/Devices/DDB27EB2-FFC3-42BF-AFD1-5208A8CEE16E/data/Containers/Bundle/Application/4C06532D-8D93-450A-9D69-312A5F11D923/lsmobile.app/libmonosgen-2.0.dylib : start_wrapper
	0x115b5818b - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
	0x115b53ae3 - /usr/lib/system/libsystem_pthread.dylib : thread_start

=================================================================
Basic Fault Address Reporting

Memory around native instruction pointer (0x115a60db6):0x115a60da6  ff ff c3 90 90 90 b8 48 01 00 02 49 89 ca 0f 05  .......H...I....
0x115a60db6  73 08 48 89 c7 e9 20 9a ff ff c3 90 90 90 b8 53  s.H... ........S
0x115a60dc6  00 00 02 49 89 ca 0f 05 73 08 48 89 c7 e9 08 9a  ...I....s.H.....
0x115a60dd6  ff ff c3 90 90 90 b8 83 01 00 02 49 89 ca 0f 05  ...........I....

=================================================================
Managed Stacktrace:

=================================================================

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

This should happen...

Screenshots 🖼️

No response

IDE

No response

Operating system

IOS

Version

20.1.63

Device

Iphone

ReactiveUI Version

20.1.63

Additional information ℹ️

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant