Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

NRE in Compositor.RequestCompositionUpdate

Open ejongejans opened this issue 2 years ago • 22 comments

Describe the bug

A rare condition but occuring frequently (couple of times a day with full time usage with some users) at users of our software.

  • happens at random; sometimes just looking through our user control toolbar with icons
  • sometimes clicking a button

It's hard for me to figure out what is causing it as it's only avalonia stacktrace it seems.

Stack trace:

at Avalonia.Rendering.Composition.Compositor.RequestCompositionUpdate(Action action) at Avalonia.Rendering.Composition.CompositingRenderer.AddDirty(Visual visual) at Avalonia.Reactive.LightweightObservableBase1.PublishNext(T value) at Avalonia.AvaloniaObject.RaisePropertyChanged[T](AvaloniaProperty1 property, Optional1 oldValue, BindingValue1 newValue, BindingPriority priority, Boolean isEffectiveValue) at Avalonia.PropertyStore.EffectiveValue1.SetAndRaiseCore(ValueStore owner, StyledProperty1 property, T value, BindingPriority priority, Boolean isOverriddenCurrentValue, Boolean isCoercedDefaultValue) at Avalonia.PropertyStore.EffectiveValue1.SetAndRaise(ValueStore owner, IValueEntry value, BindingPriority priority) at Avalonia.PropertyStore.ValueStore.ReevaluateEffectiveValues(IValueEntry changedValueEntry) at Avalonia.PropertyStore.ValueStore.OnFrameActivationChanged(ValueFrame frame) at Avalonia.Styling.StyleInstance.Avalonia.Styling.Activators.IStyleActivatorSink.OnNext(Boolean value) at Avalonia.Styling.Activators.StyleActivatorBase.ReevaluateIsActive() at Avalonia.Styling.Activators.StyleClassActivator.Avalonia.Controls.IClassesChangedListener.Changed() at Avalonia.Controls.Classes.NotifyChanged() at Avalonia.Controls.Classes.Avalonia.Controls.IPseudoClasses.Remove(String name) at Avalonia.Input.InputElement.UpdatePseudoClasses(Nullable1 isFocused, Nullable1 isPointerOver) at Avalonia.Input.InputElement.OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) at Avalonia.Controls.Control.OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) at Avalonia.Controls.ContentControl.OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) at Avalonia.Controls.Button.OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) at Avalonia.Animation.Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs change) at Avalonia.Input.InputElement.<>c.<.cctor>b__32_6(InputElement x, PointerEventArgs e) at Avalonia.Reactive.LightweightObservableBase1.PublishNext(T value) at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Input.PointerOverPreProcessor.SetPointerOverToElement(IPointer pointer, IInputRoot root, IInputElement element, UInt64 timestamp, Point position, PointerPointProperties properties, KeyModifiers inputModifiers) at Avalonia.Input.PointerOverPreProcessor.SetPointerOver(IPointer pointer, IInputRoot root, IInputElement element, UInt64 timestamp, Point position, PointerPointProperties properties, KeyModifiers inputModifiers) at Avalonia.Input.PointerOverPreProcessor.OnNext(RawInputEventArgs value) at Avalonia.Reactive.LightweightObservableBase1.PublishNext(T value) at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e) at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg) at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken) at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl) at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action1 lifetimeBuilder) at FAvalonia.Program.Launch(String[] args) at FAvalonia.Do.Launch(String[] args) at FAvaloniaLauncher.Program.Main(String[] args)

To Reproduce

We can't reproduce it ourselves.

I have however found other software (coincidentally also in 3d printing space) where users reported the same bug: https://github.com/sn4k3/UVtools/issues/797

This was an older report: https://github.com/AvaloniaUI/Avalonia/issues/13608

Expected behavior

No response

Avalonia version

11.0.9

OS

Windows

Additional context

No response

ejongejans avatar Apr 04 '24 07:04 ejongejans

  1. we need a repo
  2. better to use with latest version 11.0.10 or even better 11.1 beta as the issue may have been fixed.
  3. most likely a threading issue

timunie avatar Apr 04 '24 07:04 timunie

Ok thx for your quick responses.

I will update to 11.0.10 first with the client that has the issues and ask him to run some usage tests. It doesn't happen on my development PC's of course otherwise i wouldn't post ;) As such it's hard to reproduce a repo that has the problem without finding it first.

For context. The entire code base also runs on windows forms; with the same backend code. The controls are programmatically created and injected with a factory pattern in both winforms and avalonia projects. Because of this; i know that code accessing controls other than from the UI thread should be non-existent. As in windows forms that throws direct invoke exceptions. The windows forms solution has lots of daily users. That's what worries me a bit if I don't see errors reports there.. Still it could be a mistake on my side of course; as i'm relatively new to avalonia.

ejongejans avatar Apr 04 '24 08:04 ejongejans

I am seeing this error when setting Popup.IsOpen to false.

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Avalonia.Base
  StackTrace:
   at Avalonia.Rendering.Composition.Compositor.RequestCompositionUpdate(Action action)

		StackTrace	"   at Avalonia.Rendering.Composition.Compositor.RequestCompositionUpdate(Action action)"	string

 	Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCompositionUpdate(System.Action action)	Unknown
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.RecalculateChildren(Avalonia.Visual visual)	Unknown
 	Avalonia.Base.dll!Avalonia.Collections.AvaloniaList<Avalonia.LogicalTree.ILogical>.NotifyRemove(Avalonia.LogicalTree.ILogical item, int index)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.ContentControl.ContentChanged(Avalonia.AvaloniaPropertyChangedEventArgs e)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.WindowBase.OnPropertyChanged(Avalonia.AvaloniaPropertyChangedEventArgs change)	Unknown
 	Avalonia.Base.dll!Avalonia.Animation.Animatable.OnPropertyChangedCore(Avalonia.AvaloniaPropertyChangedEventArgs change)	Unknown
 	Avalonia.Base.dll!Avalonia.AvaloniaObject.RaisePropertyChanged<object>(Avalonia.AvaloniaProperty<object> property, Avalonia.Data.Optional<object> oldValue, Avalonia.Data.BindingValue<object> newValue, Avalonia.Data.BindingPriority priority, bool isEffectiveValue)	Unknown
 	Avalonia.Base.dll!Avalonia.PropertyStore.EffectiveValue<object>.SetAndRaiseCore(Avalonia.PropertyStore.ValueStore owner, Avalonia.StyledProperty<object> property, object value, Avalonia.Data.BindingPriority priority, bool isOverriddenCurrentValue, bool isCoercedDefaultValue)	Unknown
 	Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetLocalValue<object>(Avalonia.StyledProperty<object> property, object value)	Unknown
 	Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetValue<object>(Avalonia.StyledProperty<object> property, object value, Avalonia.Data.BindingPriority priority)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.Primitives.Popup.CloseCore()	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.Primitives.Popup.IsOpenChanged(Avalonia.AvaloniaPropertyChangedEventArgs<bool> e)	Unknown
 	Avalonia.Base.dll!Avalonia.Reactive.LightweightObservableBase<Avalonia.AvaloniaPropertyChangedEventArgs<bool>>.PublishNext(Avalonia.AvaloniaPropertyChangedEventArgs<bool> value)	Unknown
 	Avalonia.Base.dll!Avalonia.AvaloniaObject.RaisePropertyChanged<bool>(Avalonia.AvaloniaProperty<bool> property, Avalonia.Data.Optional<bool> oldValue, Avalonia.Data.BindingValue<bool> newValue, Avalonia.Data.BindingPriority priority, bool isEffectiveValue)	Unknown
 	Avalonia.Base.dll!Avalonia.PropertyStore.EffectiveValue<bool>.SetAndRaiseCore(Avalonia.PropertyStore.ValueStore owner, Avalonia.StyledProperty<bool> property, bool value, Avalonia.Data.BindingPriority priority, bool isOverriddenCurrentValue, bool isCoercedDefaultValue)	Unknown
 	Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetValue<bool>(Avalonia.StyledProperty<bool> property, bool value, Avalonia.Data.BindingPriority priority)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.Primitives.Popup.IsOpen.set(bool value)	Unknown
>	Play.dll!Play.Views.CrewMonthPlanView.PMonthGantt_PointerExited(object sender, Avalonia.Input.PointerEventArgs e) Line 89	C#
 	Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEventImpl(Avalonia.Interactivity.RoutedEventArgs e)	Unknown
 	Avalonia.Base.dll!Avalonia.Interactivity.Interactive.RaiseEvent(Avalonia.Interactivity.RoutedEventArgs e)	Unknown
 	Avalonia.Base.dll!Avalonia.Input.PointerOverPreProcessor.SetPointerOverToElement(Avalonia.Input.IPointer pointer, Avalonia.Input.IInputRoot root, Avalonia.Input.IInputElement element, ulong timestamp, Avalonia.Point position, Avalonia.Input.PointerPointProperties properties, Avalonia.Input.KeyModifiers inputModifiers)	Unknown
 	Avalonia.Base.dll!Avalonia.Input.PointerOverPreProcessor.OnNext(Avalonia.Input.Raw.RawInputEventArgs value)	Unknown
 	Avalonia.Base.dll!Avalonia.Reactive.LightweightObservableBase<Avalonia.Input.Raw.RawInputEventArgs>.PublishNext(Avalonia.Input.Raw.RawInputEventArgs value)	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Send(System.Threading.SendOrPostCallback action, object arg, Avalonia.Threading.DispatcherPriority? priority)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput(Avalonia.Input.Raw.RawInputEventArgs e)	Unknown
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam)	Unknown
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam)	Unknown
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam)	Unknown
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.RunLoop(System.Threading.CancellationToken cancellationToken)	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.DispatcherFrame.Run(Avalonia.Threading.IControlledDispatcherImpl impl)	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.PushFrame(Avalonia.Threading.DispatcherFrame frame)	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args)	Unknown
 	Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(Avalonia.AppBuilder builder, string[] args, System.Action<Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime> lifetimeBuilder)	Unknown

Version 11.1.0-beta1

arnirichard avatar Apr 08 '24 14:04 arnirichard

@arnirichard can you file a repo for that? could be a great help for debugging that

timunie avatar Apr 08 '24 19:04 timunie

@timunie I will do that but I will need to strip it, and the projects loads a few hundred MB of data, and is showing up to 100K items on the screen at once. I don't know how to replicate, but this happens much more often when my monitor is connected using HDMI than USB-C. When I connect to a monitor wirelessly, the application crashes almost immediately, so this is somehow related to the speed of monitor connector.

arnirichard avatar Apr 08 '24 19:04 arnirichard

@timunie This is my starter project using both PopUp and WriteableBitmap https://github.com/arnirichard/Play I will try at work to see if it crashes using a wireless connection to a monitor. I will report back. Otherwise I will need to strip the main project, it will be some work. If you have chance to connect wirelessly to a monitor, you might be able to replicate. It will probably not crash using USB-C cable.

arnirichard avatar Apr 08 '24 20:04 arnirichard

Note that you can zoom in using ctrl-mouse scroll and move with the mouse. That may trigger the bug.

arnirichard avatar Apr 08 '24 20:04 arnirichard

For what it's worth; i still can't replicate but did further investigate it. Client display specs; nothing special, 2 HD hdmi monitors at 60Hz. It still happens with 11.0.10

I did notice my stack trace above it a little different then Arnirichard's.

The client that has it, it occurs sometimes. Just going from other software, back to the avalonia based interface and clicking with his mouse on a top label in our toolbar. (screenshot below of our toolbar which is a horizontal stackpanel with labels)

I double checked all code; nothing works in other than the UI thread, setting properties. The only thing is our toolbar has a hover effect onmouseover. For this I first set all foreground to black and background to null. Then I highlight the item under hover (or active) by drawing a new background skbitmap, which I convert to ImageBrush. This all happens when you hover over with the mouse. But since it's some custom bitmap code; i thought it might be relevant to the writablebitmap from ArniRichard. This has been in the software for 2-3 years.. but has not been a problem as far as I know.

image

ejongejans avatar Apr 09 '24 08:04 ejongejans

I tested this today on a wireless screen. I did not experience any problems seen before. The problem has changed from being related to WriteableBitmap to Popup. My guess the issue with WriteableBitmap got automatically resolved with a recent Avalonia upgrade. I will try next to debug with Avalonia's source code since the issue happens a few times each day.

arnirichard avatar Apr 12 '24 19:04 arnirichard

This is a strange one. There's nothing in RequestCompositionUpdate that can really be null! There are only two things referenced there: Dispatcher and _invokeBeforeCommitWrite.

  • _invokeBeforeCommitWrite is only ever swapped with _invokeBeforeCommitRead, and always on the Dispatcher thread (in CommitCore which has Dispatcher.VerifyAccess(); at the beginning; as does RequestCompositionUpdate)
  • Dispatcher which is initialized in the constructor, and only ever passed Dispatcher.UIThread outside of unit tests.

grokys avatar Apr 12 '24 20:04 grokys

Could it be that RequestCompositionBatchCommitAsync() is returning null?

arnirichard avatar Apr 12 '24 20:04 arnirichard

@grokys @timunie @maxkatz6 When I look at RequestCompositionBatchCommitAsync() it seems it can return null due to a potential concurrency issue.

I have tried to add my project to the Avalonia solution, and added direct references to respective Avalonia projects, but I can't build the project since axaml are not paired properly with the cs files. I have tried to add references to Avalonia.Controls, Avalonia.Markup.Xaml. Could you please tell me what I am missing?

arnirichard avatar Apr 13 '24 10:04 arnirichard

Use src/Samples/Sandbox. Remember to adjust the namespaces in both XAML and CS file

timunie avatar Apr 13 '24 10:04 timunie

cc: @kekekeks

grokys avatar Apr 13 '24 12:04 grokys

I can prevent the crash by setting MyPopup.IsOpen = false; inside try-catch, but once it happens, the popup cannot be closed again.

arnirichard avatar Apr 20 '24 14:04 arnirichard

Any progress on getting a repro for this anyone? It's definitely something we need to fix, if we can understand what's going on.

grokys avatar Apr 26 '24 19:04 grokys

I tried arnirichard's repo but can't reproduce. Checked his code looking for things similar in our repo. I see he uses "PopUp", I use toolTip.SetTip(.. ) on all our navigation. Could it be something with the tooltip somehow? I noticed from 1 user comment that it happens when he clicks/wants to click a button in our custom toolbar. (that has custom drawn graphics and tooltips)

Additionally we use a lot of custom drawing as well all over with SKia. Similar as Arnirichard's repo. so there is some similarity there.

The user that had the issue was having it frequently.. multiple times a day. I can't replicate it. Wouldn't that make some kind of hardware/driver-software combination likelier as the cause?

Is anybody from the avalonia team able to look at RequestCompositionBatchCommitAsync() and arnirichard's suggestion question about this?

ejongejans avatar Apr 27 '24 14:04 ejongejans

Is anybody from the avalonia team able to look at RequestCompositionBatchCommitAsync() and arnirichard's suggestion question about this?

If we can't reproduce on a simple sample, it's hard to go further here. In case a chat / debug session is needed or you want to add this issue to priority list, that's something for paid support only I'm afraid.

That said imo Best bet is to add some more logging to your code and also.try.to reproduce on sandbox / simple sample. Maybe the user reporting that issue is willing to test some basic samples.

timunie avatar Apr 27 '24 15:04 timunie

Is anybody from the avalonia team able to look at RequestCompositionBatchCommitAsync() and arnirichard's suggestion question about this?

Yep, we've looked and we can't see where the null is coming from...

When I look at RequestCompositionBatchCommitAsync() it seems it can return null due to a potential concurrency issue.

The thing is, the only potential NRE comes from the _nextCommit field, but RequestCompositionBatchCommitAsync() and all other methods which manipulate this field have Dispatcher.VerifyAccess(); calls, meaning that they should only be run on the UI thread.

grokys avatar Apr 29 '24 08:04 grokys

I saw this stacktrace which might be more helpful

  HResult=0x80131509
  Message=The control Border already has a visual parent ContentPresenter 
(Name = PART_ContentPresenter, Host = PopupRoot) 
while trying to add it as a child of ContentPresenter 
(Name = PART_ContentPresenter, Host = PopupRoot).
  Source=Avalonia.Base
  StackTrace:
   at Avalonia.Visual.Avalonia.Collections.IAvaloniaListItemValidator<Avalonia.Visual>.Validate(Visual item)
   at Avalonia.Controls.Presenters.ContentPresenter.UpdateChild(Object content)
   at Avalonia.Controls.Presenters.ContentPresenter.ApplyTemplate()
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.Primitives.VisualLayerManager.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.LayoutTransformControl.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Controls.Primitives.PopupRoot.MeasureOverride(Size availableSize)
   at Avalonia.Controls.WindowBase.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteInitialLayoutPass()
   at Avalonia.Controls.WindowBase.Show()
   at Avalonia.Controls.Primitives.Popup.Open()
   at Avalonia.Controls.Primitives.Popup.IsOpenChanged(AvaloniaPropertyChangedEventArgs`1 e)
   at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
   at Avalonia.PropertyStore.EffectiveValue`1.SetAndRaiseCore(ValueStore owner, StyledProperty`1 property, T value, BindingPriority priority, Boolean isOverriddenCurrentValue, Boolean isCoercedDefaultValue)
   at Avalonia.PropertyStore.ValueStore.SetValue[T](StyledProperty`1 property, T value, BindingPriority priority)
   at Avalonia.Controls.Primitives.Popup.set_IsOpen(Boolean value)
   at Play.Views.RosterControl.Crew_PointerEnter(Object sender, PointerEventArgs e) in C:\github\PP\Play\Views\RosterControl.axaml.cs:line 419
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   at Avalonia.Input.PointerOverPreProcessor.SetPointerOverToElement(IPointer pointer, IInputRoot root, IInputElement element, UInt64 timestamp, Point position, PointerPointProperties properties, KeyModifiers inputModifiers)
   at Avalonia.Input.PointerOverPreProcessor.OnNext(RawInputEventArgs value)
   at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
   at Avalonia.Controls.TopLevel.<>c.<HandleInput>b__142_0(Object state)
   at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable`1 priority)
   at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e)
   at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
   at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at Play.Desktop.Program.Main(String[] args) in C:\github\PP\Play.Desktop\Program.cs:line 14

arnirichard avatar May 11 '24 10:05 arnirichard

The control Border already has a visual parent ContentPresenter

Now is the question of which border and why is the same border added to another popup? Is it something consumed from Resources to minimize code lines?

timunie avatar May 19 '24 20:05 timunie

The popup is just inside a Grid which is inside UserControl (in axaml). I just change the text and MyPopup.IsOpen. The only Border I see is the one in the Popup content.

<Popup Name="MyPopup" Placement="Pointer" HorizontalOffset="10" IsOpen="False">
	<Border Background="White" BorderBrush="Gray" BorderThickness="1" Padding="5">
		<TextBlock x:Name="tooltipTextBlock" Text="Mouse over text!"
			Foreground="Black" VerticalAlignment="Center" HorizontalAlignment="Center"/>
	</Border>
</Popup>

arnirichard avatar May 19 '24 20:05 arnirichard

I am running my project from SandBox, this breakpoint catches the error

_nextCommit is assigned to null before returning the method.

image

In below, nextCommit1 is null, and nextCommit2 is not null

image

If there is anything I can investigate using breakpoints, please say it.

Edit: It seems the problem appears soon after closing a window.

Stacktrace

> Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCompositionBatchCommitAsync() Line 127 C# Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCommitAsync() Line 100 C# Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCompositionUpdate(System.Action action) Line 246 C# Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.QueueUpdate() Line 82 C# Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.AddDirty(Avalonia.Visual visual) Line 93 C# Avalonia.Base.dll!Avalonia.Visual.InvalidateVisual() Line 378 C# Avalonia.Controls.dll!Avalonia.Controls.TextBlock.InvalidateTextLayout() Line 687 C# Avalonia.Controls.dll!Avalonia.Controls.TextBlock.OnPropertyChanged(Avalonia.AvaloniaPropertyChangedEventArgs change) Line 815 C# Avalonia.Base.dll!Avalonia.AvaloniaObject.OnPropertyChangedCore(Avalonia.AvaloniaPropertyChangedEventArgs change) Line 703 C# Avalonia.Base.dll!Avalonia.Animation.Animatable.OnPropertyChangedCore(Avalonia.AvaloniaPropertyChangedEventArgs change) Line 191 C# Avalonia.Base.dll!Avalonia.AvaloniaObject.RaisePropertyChanged(Avalonia.AvaloniaProperty property, Avalonia.Data.Optional oldValue, Avalonia.Data.BindingValue newValue, Avalonia.Data.BindingPriority priority, bool isEffectiveValue) Line 754 C# Avalonia.Base.dll!Avalonia.PropertyStore.EffectiveValue.SetAndRaiseCore(Avalonia.PropertyStore.ValueStore owner, Avalonia.StyledProperty property, string value, Avalonia.Data.BindingPriority priority, bool isOverriddenCurrentValue, bool isCoercedDefaultValue) Line 244 C#
Avalonia.Base.dll!Avalonia.PropertyStore.EffectiveValue<string>.SetLocalValueAndRaise(Avalonia.PropertyStore.ValueStore owner, Avalonia.StyledProperty<string> property, string value) Line 83	C#
Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetLocalValue<string>(Avalonia.StyledProperty<string> property, string value) Line 265	C#
Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetValue<string>(Avalonia.StyledProperty<string> property, string value, Avalonia.Data.BindingPriority priority) Line 227	C#
Avalonia.Base.dll!Avalonia.AvaloniaObject.SetValue<string>(Avalonia.StyledProperty<string> property, string value, Avalonia.Data.BindingPriority priority) Line 346	C#
Avalonia.Controls.dll!Avalonia.Controls.TextBlock.Text.set(string value) Line 217	C#
Sandbox.dll!Play.Views.RosterControl.RosterGantt_PointerMoved(object sender, Avalonia.Input.PointerEventArgs e) Line 1347	C#
Avalonia.Base.dll!Avalonia.Interactivity.Interactive.AddHandler.__InvokeAdapter|4_0<Avalonia.Input.PointerEventArgs>(System.Delegate baseHandler, object sender, Avalonia.Interactivity.RoutedEventArgs args) Line 67	C#
Avalonia.Base.dll!Avalonia.Interactivity.Interactive.AddHandler.AnonymousMethod__4_1(System.Delegate baseHandler, object sender, Avalonia.Interactivity.RoutedEventArgs args) Line 70	C#
Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEventImpl(Avalonia.Interactivity.RoutedEventArgs e) Line 159	C#
Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEvent(Avalonia.Interactivity.Interactive source, Avalonia.Interactivity.RoutedEventArgs e) Line 101	C#
Avalonia.Base.dll!Avalonia.Interactivity.Interactive.RaiseEvent(Avalonia.Interactivity.RoutedEventArgs e) Line 125	C#
Avalonia.Base.dll!Avalonia.Input.MouseDevice.MouseMove(Avalonia.Input.IMouseDevice device, ulong timestamp, Avalonia.Input.IInputRoot root, Avalonia.Point p, Avalonia.Input.PointerPointProperties properties, Avalonia.Input.KeyModifiers inputModifiers, System.Lazy<System.Collections.Generic.IReadOnlyList<Avalonia.Input.Raw.RawPointerPoint>> intermediatePoints, Avalonia.Input.IInputElement hitTest) Line 176	C#
Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawPointerEventArgs e) Line 93	C#
Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawInputEventArgs e) Line 37	C#
Avalonia.Base.dll!Avalonia.Input.InputManager.ProcessInput(Avalonia.Input.Raw.RawInputEventArgs e) Line 35	C#
Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput.AnonymousMethod__145_0(object state) Line 849	C#
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Send(System.Threading.SendOrPostCallback action, object arg, Avalonia.Threading.DispatcherPriority? priority) Line 647	C#
Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput(Avalonia.Input.Raw.RawInputEventArgs e) Line 839	C#
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 825	C#
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 24	C#
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam) Line 1002	C#
[Native to Managed Transition]	
[Managed to Native Transition]	
Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.RunLoop(System.Threading.CancellationToken cancellationToken) Line 111	C#
Avalonia.Base.dll!Avalonia.Threading.DispatcherFrame.Run(Avalonia.Threading.IControlledDispatcherImpl impl) Line 121	C#
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.PushFrame(Avalonia.Threading.DispatcherFrame frame) Line 53	C#
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken) Line 80	C#
Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(string[] args) Line 144	C#
Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args) Line 121	C#
Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(Avalonia.AppBuilder builder, string[] args, System.Action<Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime> lifetimeBuilder) Line 277	C#
Play.Desktop.dll!Play.Desktop.Program.Main(string[] args) Line 22	C#
The error happens after I close a window

System.Diagnostics.TraceSource.dll!System.Diagnostics.TraceInternal.Fail(string message, string detailMessage) Line 274 C# System.Private.CoreLib.dll!System.Diagnostics.Debug.Fail(string message, string detailMessage) Line 320 C# Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleClosed() Line 696 C# Avalonia.Controls.dll!Avalonia.Controls.WindowBase.HandleClosed() Line 245 C# Avalonia.Controls.dll!Avalonia.Controls.Window.HandleClosed() Line 1059 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 91 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 24 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam) Line 1002 C# [Native to Managed Transition] [Managed to Native Transition] Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.Dispose() Line 648 C# Avalonia.Controls.dll!Avalonia.Controls.Window.CloseInternal() Line 520 C# Avalonia.Controls.dll!Avalonia.Controls.Window.CloseCore(Avalonia.Controls.WindowCloseReason reason, bool isProgrammatic) Line 492 C# Avalonia.Controls.dll!Avalonia.Controls.Window.Close() Line 458 C# Sandbox.dll!Play.Views.PlanningWindow.PlanningWindow_Closing(object sender, Avalonia.Controls.WindowClosingEventArgs e) Line 206 C# [Resuming Async Method] System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 138 C# System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.AsyncStateMachineBox<Play.Views.PlanningWindow.<PlanningWindow_Closing>d__8>.MoveNext(System.Threading.Thread threadPoolThread) Line 169 C# System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask) Line 140 C# System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback callback, object state, ref System.Threading.Tasks.Task currentTask) Line 128 C# System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject) Line 2844 C# System.Private.CoreLib.dll!System.Threading.Tasks.TaskCompletionSource.SetResult(object result) Line 219 C# Avalonia.Controls.dll!Avalonia.Controls.Window.ShowDialog.AnonymousMethod__2(System.EventArgs _) Line 837 C# Avalonia.Base.dll!Avalonia.Reactive.AnonymousObserver<System.EventArgs>.OnNext(System.EventArgs value) Line 65 C# Avalonia.Base.dll!Avalonia.Reactive.Observable.Take.AnonymousMethod__1(System.EventArgs input) Line 143 C# Avalonia.Base.dll!Avalonia.Reactive.AnonymousObserver<System.EventArgs>.OnNext(System.EventArgs value) Line 65 C# Avalonia.Base.dll!Avalonia.Reactive.Observable.FromEventPattern.AnonymousMethod__1(object _, System.EventArgs args) Line 161 C# Avalonia.Controls.dll!Avalonia.Controls.TopLevel.OnClosed.AnonymousMethod__0(object _) Line 806 C# Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Send(System.Threading.SendOrPostCallback action, object arg, Avalonia.Threading.DispatcherPriority? priority) Line 647 C# Avalonia.Controls.dll!Avalonia.Controls.TopLevel.OnClosed(System.EventArgs e) Line 806 C# Avalonia.Controls.dll!Avalonia.Controls.WindowBase.OnClosed(System.EventArgs e) Line 213 C# Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleClosed() Line 723 C# Avalonia.Controls.dll!Avalonia.Controls.WindowBase.HandleClosed() Line 245 C# Avalonia.Controls.dll!Avalonia.Controls.Window.HandleClosed() Line 1059 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 91 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 24 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam) Line 1002 C# [Native to Managed Transition] [Managed to Native Transition] Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.Dispose() Line 648 C# Avalonia.Controls.dll!Avalonia.Controls.Window.CloseInternal() Line 520 C# Avalonia.Controls.dll!Avalonia.Controls.Window.CloseCore(Avalonia.Controls.WindowCloseReason reason, bool isProgrammatic) Line 492 C# Avalonia.Controls.dll!Avalonia.Controls.Window.Close() Line 458 C# Sandbox.dll!Play.Views.ConfirmationDialog.Yes_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e) Line 19 C# [Lightweight Function] System.Private.CoreLib.dll!System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) Line 143 C# System.Private.CoreLib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 55 C# Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEventImpl(Avalonia.Interactivity.RoutedEventArgs e) Line 163 C# Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEvent(Avalonia.Interactivity.Interactive source, Avalonia.Interactivity.RoutedEventArgs e) Line 101 C# Avalonia.Base.dll!Avalonia.Interactivity.Interactive.RaiseEvent(Avalonia.Interactivity.RoutedEventArgs e) Line 125 C# Avalonia.Controls.dll!Avalonia.Controls.Button.OnClick() Line 347 C# Avalonia.Controls.dll!Avalonia.Controls.Button.OnPointerReleased(Avalonia.Input.PointerReleasedEventArgs e) Line 430 C# Avalonia.Base.dll!Avalonia.Input.InputElement..cctor.AnonymousMethod__32_9(Avalonia.Input.InputElement x, Avalonia.Input.PointerReleasedEventArgs e) Line 225 C# Avalonia.Base.dll!Avalonia.Interactivity.RoutedEvent<Avalonia.Input.PointerReleasedEventArgs>.AddClassHandler.__Adapter|0(object sender, Avalonia.Interactivity.RoutedEventArgs e) Line 125 C# Avalonia.Base.dll!Avalonia.Interactivity.RoutedEvent.AddClassHandler.AnonymousMethod__0((object, Avalonia.Interactivity.RoutedEventArgs) args) Line 92 C# Avalonia.Base.dll!Avalonia.Reactive.AnonymousObserver<(object, Avalonia.Interactivity.RoutedEventArgs)>.OnNext((object, Avalonia.Interactivity.RoutedEventArgs) value) Line 65 C# Avalonia.Base.dll!Avalonia.Reactive.LightweightObservableBase<(object, Avalonia.Interactivity.RoutedEventArgs)>.PublishNext((object, Avalonia.Interactivity.RoutedEventArgs) value) Line 145 C# Avalonia.Base.dll!Avalonia.Reactive.LightweightSubject<(object, Avalonia.Interactivity.RoutedEventArgs)>.OnNext((object, Avalonia.Interactivity.RoutedEventArgs) value) Line 24 C# Avalonia.Base.dll!Avalonia.Interactivity.RoutedEvent.InvokeRaised(object sender, Avalonia.Interactivity.RoutedEventArgs e) Line 99 C# Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEventImpl(Avalonia.Interactivity.RoutedEventArgs e) Line 141 C# Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEvent(Avalonia.Interactivity.Interactive source, Avalonia.Interactivity.RoutedEventArgs e) Line 101 C# Avalonia.Base.dll!Avalonia.Interactivity.Interactive.RaiseEvent(Avalonia.Interactivity.RoutedEventArgs e) Line 125 C# Avalonia.Base.dll!Avalonia.Input.MouseDevice.MouseUp(Avalonia.Input.IMouseDevice device, ulong timestamp, Avalonia.Input.IInputRoot root, Avalonia.Point p, Avalonia.Input.PointerPointProperties props, Avalonia.Input.KeyModifiers inputModifiers, Avalonia.Input.IInputElement hitTest) Line 202 C# Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawPointerEventArgs e) Line 90 C# Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawInputEventArgs e) Line 37 C# Avalonia.Base.dll!Avalonia.Input.InputManager.ProcessInput(Avalonia.Input.Raw.RawInputEventArgs e) Line 35 C# Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput.AnonymousMethod__145_0(object state) Line 849 C# Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Send(System.Threading.SendOrPostCallback action, object arg, Avalonia.Threading.DispatcherPriority? priority) Line 647 C# Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput(Avalonia.Input.Raw.RawInputEventArgs e) Line 839 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 825 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 24 C# Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam) Line 1002 C# [Native to Managed Transition] [Managed to Native Transition] Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.RunLoop(System.Threading.CancellationToken cancellationToken) Line 111 C# Avalonia.Base.dll!Avalonia.Threading.DispatcherFrame.Run(Avalonia.Threading.IControlledDispatcherImpl impl) Line 121 C# Avalonia.Base.dll!Avalonia.Threading.Dispatcher.PushFrame(Avalonia.Threading.DispatcherFrame frame) Line 53 C# Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken) Line 80 C# Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(string[] args) Line 144 C# Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args) Line 121 C# Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(Avalonia.AppBuilder builder, string[] args, System.Action<Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime> lifetimeBuilder) Line 277 C# Play.Desktop.dll!Play.Desktop.Program.Main(string[] args) Line 22 C#

arnirichard avatar Aug 10 '24 16:08 arnirichard

Would it be possible to make this 'temporary' solution which apparently resolves the issue?

public CompositionBatch RequestCompositionBatchCommitAsync()
{
    Dispatcher.VerifyAccess();
    
    var result = _nextCommit;

    if (result == null)
    {
        result = _nextCommit = new ();
        var pending = _pendingBatch;
        if (pending != null)
            pending.Processed.ContinueWith(
                _ => Dispatcher.Post(_triggerCommitRequested, DispatcherPriority.Send),
                TaskContinuationOptions.ExecuteSynchronously);
        else
            _triggerCommitRequested();
    }

    return result;
}```

arnirichard avatar Aug 11 '24 16:08 arnirichard

_nextCommit is set to null through _triggerCommitRequested(); causing null ref

 	Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.Commit() Line 231	C#
 	Avalonia.Base.dll!Avalonia.Media.MediaContext.CommitCompositor(Avalonia.Rendering.Composition.Compositor compositor) Line 21	C#
 	Avalonia.Base.dll!Avalonia.Media.MediaContext.SyncCommit(Avalonia.Rendering.Composition.Compositor compositor, bool waitFullRender, bool catchExceptions) Line 106	C#
 	Avalonia.Base.dll!Avalonia.Media.MediaContext.ImmediateRenderRequested(Avalonia.Rendering.Composition.CompositionTarget target, bool catchExceptions) Line 123	C#
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.Paint(Avalonia.Rect rect, bool catchExceptions) Line 223	C#
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.Paint(Avalonia.Rect rect) Line 215	C#
 	Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandlePaint(Avalonia.Rect rect) Line 679	C#
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 602	C#
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 24	C#
 	Avalonia.Win32.dll!Avalonia.Win32.PopupImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 88	C#
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam) Line 1002	C#
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.InvokeAsyncImpl(Avalonia.Threading.DispatcherOperation operation, System.Threading.CancellationToken cancellationToken) Line 404	C#
 	Avalonia.Base.dll!Avalonia.Media.MediaContext.ScheduleRender(bool now) Line 104	C#
 	Avalonia.Base.dll!Avalonia.Media.MediaContext.Avalonia.Rendering.Composition.ICompositorScheduler.CommitRequested(Avalonia.Rendering.Composition.Compositor compositor) Line 149	C#
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor..ctor.AnonymousMethod__0() Line 91	C#
**>	Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCompositionBatchCommitAsync() Line 124	C#**
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCommitAsync() Line 100	C#
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.RequestCompositionUpdate(System.Action action) Line 265	C#
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.QueueUpdate() Line 82	C#
 	Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.AddDirty(Avalonia.Visual visual) Line 93	C#
 	Avalonia.Base.dll!Avalonia.Visual.InvalidateVisual() Line 378	C#
 	Avalonia.Controls.dll!Avalonia.Controls.TextBlock.InvalidateTextLayout() Line 687	C#
 	Avalonia.Controls.dll!Avalonia.Controls.TextBlock.OnPropertyChanged(Avalonia.AvaloniaPropertyChangedEventArgs change) Line 815	C#
 	Avalonia.Base.dll!Avalonia.AvaloniaObject.OnPropertyChangedCore(Avalonia.AvaloniaPropertyChangedEventArgs change) Line 703	C#
 	Avalonia.Base.dll!Avalonia.Animation.Animatable.OnPropertyChangedCore(Avalonia.AvaloniaPropertyChangedEventArgs change) Line 191	C#
 	Avalonia.Base.dll!Avalonia.AvaloniaObject.RaisePropertyChanged<string>(Avalonia.AvaloniaProperty<string> property, Avalonia.Data.Optional<string> oldValue, Avalonia.Data.BindingValue<string> newValue, Avalonia.Data.BindingPriority priority, bool isEffectiveValue) Line 754	C#
 	Avalonia.Base.dll!Avalonia.PropertyStore.EffectiveValue<string>.SetAndRaiseCore(Avalonia.PropertyStore.ValueStore owner, Avalonia.StyledProperty<string> property, string value, Avalonia.Data.BindingPriority priority, bool isOverriddenCurrentValue, bool isCoercedDefaultValue) Line 244	C#
 	Avalonia.Base.dll!Avalonia.PropertyStore.EffectiveValue<string>.SetLocalValueAndRaise(Avalonia.PropertyStore.ValueStore owner, Avalonia.StyledProperty<string> property, string value) Line 83	C#
 	Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetLocalValue<string>(Avalonia.StyledProperty<string> property, string value) Line 265	C#
 	Avalonia.Base.dll!Avalonia.PropertyStore.ValueStore.SetValue<string>(Avalonia.StyledProperty<string> property, string value, Avalonia.Data.BindingPriority priority) Line 227	C#
 	Avalonia.Base.dll!Avalonia.AvaloniaObject.SetValue<string>(Avalonia.StyledProperty<string> property, string value, Avalonia.Data.BindingPriority priority) Line 346	C#
 	Avalonia.Controls.dll!Avalonia.Controls.TextBlock.Text.set(string value) Line 217	C#
 	Sandbox.dll!Play.Views.RosterControl.RosterGantt_PointerMoved(object sender, Avalonia.Input.PointerEventArgs e) Line 1347	C#
 	Avalonia.Base.dll!Avalonia.Interactivity.Interactive.AddHandler.__InvokeAdapter|4_0<Avalonia.Input.PointerEventArgs>(System.Delegate baseHandler, object sender, Avalonia.Interactivity.RoutedEventArgs args) Line 67	C#
 	Avalonia.Base.dll!Avalonia.Interactivity.Interactive.AddHandler.AnonymousMethod__4_1(System.Delegate baseHandler, object sender, Avalonia.Interactivity.RoutedEventArgs args) Line 70	C#
 	Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEventImpl(Avalonia.Interactivity.RoutedEventArgs e) Line 159	C#
 	Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEvent(Avalonia.Interactivity.Interactive source, Avalonia.Interactivity.RoutedEventArgs e) Line 101	C#
 	Avalonia.Base.dll!Avalonia.Interactivity.Interactive.RaiseEvent(Avalonia.Interactivity.RoutedEventArgs e) Line 125	C#
 	Avalonia.Base.dll!Avalonia.Input.MouseDevice.MouseMove(Avalonia.Input.IMouseDevice device, ulong timestamp, Avalonia.Input.IInputRoot root, Avalonia.Point p, Avalonia.Input.PointerPointProperties properties, Avalonia.Input.KeyModifiers inputModifiers, System.Lazy<System.Collections.Generic.IReadOnlyList<Avalonia.Input.Raw.RawPointerPoint>> intermediatePoints, Avalonia.Input.IInputElement hitTest) Line 176	C#
 	Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawPointerEventArgs e) Line 93	C#
 	Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawInputEventArgs e) Line 37	C#
 	Avalonia.Base.dll!Avalonia.Input.InputManager.ProcessInput(Avalonia.Input.Raw.RawInputEventArgs e) Line 35	C#
 	Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput.AnonymousMethod__145_0(object state) Line 849	C#
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Send(System.Threading.SendOrPostCallback action, object arg, Avalonia.Threading.DispatcherPriority? priority) Line 647	C#
 	Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput(Avalonia.Input.Raw.RawInputEventArgs e) Line 839	C#
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 825	C#
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(nint hWnd, uint msg, nint wParam, nint lParam) Line 24	C#
 	Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProcMessageHandler(nint hWnd, uint msg, nint wParam, nint lParam) Line 1002	C#
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.RunLoop(System.Threading.CancellationToken cancellationToken) Line 111	C#
 	Avalonia.Base.dll!Avalonia.Threading.DispatcherFrame.Run(Avalonia.Threading.IControlledDispatcherImpl impl) Line 121	C#
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.PushFrame(Avalonia.Threading.DispatcherFrame frame) Line 53	C#
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken) Line 80	C#
 	Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(string[] args) Line 144	C#
 	Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args) Line 121	C#
 	Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(Avalonia.AppBuilder builder, string[] args, System.Action<Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime> lifetimeBuilder) Line 277	C#
 	Play.Desktop.dll!Play.Desktop.Program.Main(string[] args) Line 22	C#
`

arnirichard avatar Aug 11 '24 17:08 arnirichard

@arnirichard I'm not very deep into this area of Avalonia, however if I were you I'd file a draft PR to:

  1. check if all tests are passing
  2. get some feedback from the team
  3. test the preview nuget in production

timunie avatar Aug 12 '24 05:08 timunie

Thanks @timunie I can't make a PR without knowing more about the code. I will take a closer look and see what I can figure out.

arnirichard avatar Aug 12 '24 12:08 arnirichard