These are chat archives for AvaloniaUI/Avalonia

25th
Jun 2018
Nelson Carrillo
@nc4rrillo
Jun 25 2018 00:44
@grokys does using a gradient as a brush for text work using dwrite on master? On the text elements branch I can't get it to work and I think it has to do with the relative start/end points and the fact that the brush impl gets an empty size passed for the destinationSize
ahopper
@ahopper
Jun 25 2018 07:32
@grokys the memory is being used by VisualNodes
ahopper
@ahopper
Jun 25 2018 07:46
it seems to happen when you move quickly over a number of checkboxes
Rayyan Tahir
@RayyanTahir
Jun 25 2018 08:33
Does a ListBox have anything like a HasItems property?
danwalmsley
@danwalmsley
Jun 25 2018 09:00
@RayyanTahir I added a :isempty pseudo class not so long ago if you want to style based on that
anyone tried to run on mac recently?
Rayyan Tahir
@RayyanTahir
Jun 25 2018 09:01
Thanks @danwalmsley that will work for me
danwalmsley
@danwalmsley
Jun 25 2018 09:01
I have
2018-06-25 01:49:18 CRITICAL Program: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Avalonia.Markup.Xaml.XamlLoadException: Error loading xaml at resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Avalonia.Markup.Xaml.XamlLoadException: Error loading xaml at resm:Avalonia.Themes.Default.ToolTip.xaml?assembly=Avalonia.Themes.Default ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Call from invalid thread
   at Avalonia.Threading.Dispatcher.VerifyAccess() in C:\projects\Avalonia\src\Avalonia.Base\Threading\Dispatcher.cs:line 51
   at Avalonia.AvaloniaObject..ctor() in C:\projects\Avalonia\src\Avalonia.Base\AvaloniaObject.cs:line 73
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean skipCheckThis, Boolean fillCache)
   at Portable.Xaml.XamlObjectWriterInternal.InitializeObjectIfRequired(Boolean waitForParameters, Boolean required)
   at Portable.Xaml.XamlObjectWriterInternal.OnWriteStartObject()
   at Portable.Xaml.XamlWriterInternalBase.WriteStartObject(XamlType xamlType)
   at Portable.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.LoadFromReader(XamlReader reader, AvaloniaXamlContext context, IAmbientProvider parentAmbientProvider)
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri)
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri, Object rootInstance)
   --- End of inner exception stack trace ---
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri, Object rootInstance)
   at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded()
   at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Styling.ISetStyleParent.NotifyResourcesChanged(ResourcesChangedEventArgs e)
   at Avalonia.Styling.Styles.<.ctor>b__2_0(IStyle x) in C:\projects\Avalonia\src\Avalonia.Styling\Styling\Styles.cs:line 31
   at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>g__Add|0(Int32 index, IList items) in C:\projects\Avalonia\src\Avalonia.Base\Collections\AvaloniaListExtensions.cs:line 83
   at Avalonia.Collections.AvaloniaList`1.NotifyAdd(IList t, Int32 index) in C:\projects\Avalonia\src\Avalonia.Base\Collections\AvaloniaList.cs:line 506
   --- End of inner exception stack trace ---
Vsevolod Pilipenko
@Karnah
Jun 25 2018 09:02
@grokys, question about #1686
If use empty image brush in Direct2D1 - it return transparent brush.
If use in Skia - it return white brush.
In WPF using transparent. May I fix this in Skia?
Steven Kirk
@grokys
Jun 25 2018 09:05
yeah, that sounds like a bug in skia
Vsevolod Pilipenko
@Karnah
Jun 25 2018 09:06
Good, thanks!
Wiesław Šoltés
@wieslawsoltes
Jun 25 2018 15:59
@grokys rendering large amount of Image nodes (same bitmap) causes huge memory usage in Direct2D , Skia handles it without any issue
Wiesław Šoltés
@wieslawsoltes
Jun 25 2018 16:04
maybe its related to AvaloniaUI/Avalonia#975
Steven Kirk
@grokys
Jun 25 2018 16:47
@wieslawsoltes you already filed an issue for that a year ago ;) AvaloniaUI/Avalonia#1006
we really do need to fix it...
Wiesław Šoltés
@wieslawsoltes
Jun 25 2018 16:53
yeah
I was mislead by huge memory usage :smile:
Wiesław Šoltés
@wieslawsoltes
Jun 25 2018 17:16
@grokys Tested AvaloniaUI/Avalonia#1694
Erik Ylvisaker
@eylvisaker
Jun 25 2018 17:47
Hey, the link to the quick start on avaloniaui.net is broken, it gives a 404 for this page: http://avaloniaui.net/guides/quickstart.html
Steven Kirk
@grokys
Jun 25 2018 22:03
thanks @eylvisaker - yeah been meaning to fix that for ages - fixed now
Steven Kirk
@grokys
Jun 25 2018 23:37
@jkoritzinsky does this look right to you?
image.png
the 4th-most memory being taken in control catalog after storage for properties is Queue<ValueTuple<Object, Int32>> which i think is the DeferredSetter stuff
shouldn't that memory only be temporary?
Jeremy Koritzinsky
@jkoritzinsky
Jun 25 2018 23:42
The Queue currently isn't but we could make it so. We could also make a SingleOrQueue like the SingleOrDictionary to save space. That would save most of the memory.
I think a combination might be good because then we wouldn't be recreating the Queue object every time the property is set but only a single value is used.