Dirty LOG in MAC
Hi,
2025-03-23 12:01:35,747 [1] ERROR GssdDesktopClient.Maui.Helpers.UtillHelper - LoginCommand
System.NullReferenceException: Object reference not set to an instance of an object.
at GssdDesktopClient.Maui.Pages.LoginPage.OnHandlerChanged() in /Users/sasasoftware/Documents/GssdDesktopClient/GssdDesktopClient.Maui/Pages/LoginPage.xaml.cs:line 21
at Microsoft.Maui.Controls.Element.OnHandlerChangedCore()
at Microsoft.Maui.Controls.VisualElement.OnHandlerChangedCore()
at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at Microsoft.Maui.Handlers.ElementHandler.DisconnectHandler(Object platformView)
at Microsoft.Maui.Handlers.ElementHandler.Microsoft.Maui.IElementHandler.DisconnectHandler()
at Microsoft.Maui.ViewExtensions.DisconnectHandlers(IView view)
at Microsoft.Maui.Controls.Window.OnPageChanged(Page oldPage, Page newPage)
at Microsoft.Maui.Controls.Window.<>c.<.cctor>b__216_0(BindableObject b, Object o, Object n)
at Microsoft.Maui.Controls.BindableObject.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean didChange, Boolean willFirePropertyChanged)
at Microsoft.Maui.Controls.Element.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean changed, Boolean willFirePropertyChanged)
at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent)
at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity)
at Microsoft.Maui.Controls.BindableObject.SetValue(BindableProperty property, Object value)
at Microsoft.Maui.Controls.Window.set_Page(Page value)
at Microsoft.Maui.Controls.Application.set_MainPage(Page value)
at GssdDesktopClient.Maui.ViewModels.LoginViewModel.<InitCommands>b__94_0() in /Users/sasasoftware/Documents/GssdDesktopClient/GssdDesktopClient.Maui/ViewModels/LoginViewModel.cs:line 520
Update
//Override the method of the page
protected override void OnHandlerChanged()
{
base.OnHandlerChanged();
// Window.FlowDirection = FlowDirection.LeftToRight;
}
when I comment this row the log become clean why?