These are chat archives for AvaloniaUI/Avalonia

7th
Apr 2018
Jumar Macato
@jmacato
Apr 07 2018 04:28
@wieslawsoltes nice 😊!
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 10:29
@jmacato I have made few changes to build script, this is my current work related to corert https://github.com/wieslawsoltes/Draw2D/compare/corert
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 10:36
My app is fully functional using native publish, you can draw, copy, paste, select, load and save json (with object references) etc.
danwalmsley
@danwalmsley
Apr 07 2018 10:43
Did you find a solution for release mode?
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 11:51
No :(
Jumar Macato
@jmacato
Apr 07 2018 12:34
@wieslawsoltes noted! i've written a new progress report on this issue
Anvar
@GSTQ
Apr 07 2018 13:23
Hello, i'm add new item to control catalog in MainView: "<TabItem Header="Example"><pages:ExamplePage/></TabItem>" . Also i'm add new user control named ExamplePage. But in runtime i got next error: "Portable.Xaml.XamlObjectWriterException: 'The value for 'Content' property is null'". What i'm doing wrong?
Steven Kirk
@grokys
Apr 07 2018 14:49
@GSTQ hard to say from the code you gave. could you maybe push your changes to a branch so i could take a look?
ahopper
@ahopper
Apr 07 2018 15:41
hi has anyone got something like the uwp or mahapps flyout controls?
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 16:05
Exception has been thrown by the target of an invocation.
   at Core2D.Avalonia!<BaseAddress>+0x8cc778
   at Core2D.Avalonia!<BaseAddress>+0x9111d4
   at Core2D.Avalonia.App.Main(String[]) + 0x22

Exception has been thrown by the target of an invocation.
   at Core2D.Avalonia!<BaseAddress>+0x1c0a5c
   at Core2D.Avalonia!<BaseAddress>+0x152f4e
   at Core2D.Avalonia!<BaseAddress>+0x8b2f1
   at Core2D.Avalonia!<BaseAddress>+0x6f5f2f
   at Core2D.Avalonia!<BaseAddress>+0x93f35
   at Portable.Xaml.XamlObjectWriterInternal.InitializeObjectIfRequired(Boolean, Boolean) + 0x362
   at Portable.Xaml.XamlObjectWriterInternal.OnWriteStartObject() + 0x8a
   at Portable.Xaml.XamlServices.Transform(XamlReader, XamlWriter, Boolean) + 0x4e
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.LoadFromReader(XamlReader, AvaloniaXamlContext) + 0x33
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Stream, Object, Uri) + 0xb7
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Type, Object) + 0x156
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Object) + 0x4c
   at Core2D.Avalonia.MainWindow..ctor() + 0x26
   at Core2D.Avalonia!<BaseAddress>+0x8cc6c3

Could not convert object 'False' (of type System.String) to {http://schemas.microsoft.com/winfx/2006/xaml}Boolean: False is not a valid value for Boolean.
   at Portable.Xaml.XamlObjectWriterInternal.GetCorrectlyTypedValue(XamlMember, XamlType, Object) + 0x3b1
   at Portable.Xaml.XamlObjectWriterInternal.StoreAppropriatelyTypedValue(XamlWriterInternalBase.ObjectState, XamlWriterInternalBase.MemberAndValue, Object, Object) + 0x1fa
   at Portable.Xaml.XamlObjectWriterInternal.OnWriteValue(Object) + 0x73
   at Portable.Xaml.XamlServices.Transform(XamlReader, XamlWriter, Boolean) + 0x4e
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.LoadFromReader(XamlReader, AvaloniaXamlContext) + 0x33
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Stream, Object, Uri) + 0xb7
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Type, Object) + 0x156
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Object) + 0x4c
   at Core2D.Avalonia.Views.MainView..ctor() + 0x5b
   at Core2D.Avalonia!<BaseAddress>+0xaa66bd
   at Core2D.Avalonia!<BaseAddress>+0x1c08c1

False is not a valid value for Boolean.
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0xcc
   at Portable.Xaml.XamlObjectWriterInternal.GetCorrectlyTypedValue(XamlMember, XamlType, Object) + 0x26f

String was not recognized as a valid Boolean.
   at System.Boolean.Parse(ReadOnlySpan`1) + 0x4f
   at System.Boolean.Parse(String) + 0x2c
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0x4c
I have disabled default theme, the error is still there :(
Could not convert object 'False' (of type System.String) to {http://schemas.microsoft.com/winfx/2006/xaml}Boolean: False is not a valid value for Boolean.
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 16:29
@jmacato Success
at least partial
managed to run control catalog on release mode!!!
2018-04-07_18-30-07.png
Definitely issue with parsing some parts of xaml
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 16:39
2018-04-07_18-39-09.png
Border page works
James Burnside
@JCBurnside
Apr 07 2018 16:53
so I am having an issue with the Avalonia extension for VS. it crashes in two different ways depending on target framework
image.png
the netcoreapp1.1 version gives that
the net461 gives Unhandled Exception: System.TypeLoadException: Could not load type 'Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint' from assembly 'Avalonia.DesignerSupport, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'. at Avalonia.Designer.HostApp.NetFX.Program.Exec(String[] args) at Avalonia.Designer.HostApp.NetFX.Program.Main(String[] args)
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 16:57
@jmacato @grokys Those are parts of theme that produce exception when using corert publish https://github.com/wieslawsoltes/Avalonia/blob/ef8f19c82dada5a5055e739c22bf1c3931192d54/src/Avalonia.Themes.Default/DefaultTheme.xaml
The commented lines :smile:
danwalmsley
@danwalmsley
Apr 07 2018 17:09
@JCBurnside netcoreapp1. 1 isn't supported, you also need latest version 0.61
0.5 is very old and no longer supported
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 17:10
2018-04-07_19-09-28.png
More progress
<!-- <Button IsEnabled="False">Disabled</Button> -->
danwalmsley
@danwalmsley
Apr 07 2018 17:11
@wieslawsoltes i wonder if release does something with text encoding or something so that they get processed differently in Release?
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 17:11
This xaml is causing crush
IsEnabled="False"
will try with false :smile:
The published exe is about 30MB + 6MB skia dll
Compressed exe is about 8MB
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 17:18
Could not convert object 'false' (of type System.String) to {http://schemas.microsoft.com/winfx/2006/xaml}Boolean: false is not a valid value for Boolean.
   at Portable.Xaml.XamlObjectWriterInternal.GetCorrectlyTypedValue(XamlMember, XamlType, Object) + 0x3b1
   at Portable.Xaml.XamlObjectWriterInternal.StoreAppropriatelyTypedValue(XamlWriterInternalBase.ObjectState, XamlWriterInternalBase.MemberAndValue, Object, Object) + 0x1fa
   at Portable.Xaml.XamlObjectWriterInternal.OnWriteValue(Object) + 0x73
   at Portable.Xaml.XamlServices.Transform(XamlReader, XamlWriter, Boolean) + 0x4e
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.LoadFromReader(XamlReader, AvaloniaXamlContext) + 0x33
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Stream, Object, Uri) + 0xb7
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Type, Object) + 0x156
   at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load(Object) + 0x4c
   at ControlCatalog.NetCore!<BaseAddress>+0xa2e8a5
   at ControlCatalog.NetCore!<BaseAddress>+0x1c1f55

false is not a valid value for Boolean.
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0xcc
   at Portable.Xaml.XamlObjectWriterInternal.GetCorrectlyTypedValue(XamlMember, XamlType, Object) + 0x26f

String was not recognized as a valid Boolean.
   at System.Boolean.Parse(ReadOnlySpan`1) + 0x4f
   at System.Boolean.Parse(String) + 0x2c
   at System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) + 0x4c
False and false :worried:
danwalmsley
@danwalmsley
Apr 07 2018 19:18
@wieslawsoltes any feeling of performance increase?
se5a
@se5a
Apr 07 2018 19:51
so I've got an existing solution, I want to try doing an avalonia version. what's the best way to do it? I normaly dev on linux with MD. best to fire up the VM and do it in windows?
I'll be doing all the ui stuff in a seperate project within the solution
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 20:16
@danwalmsley Hard to tell from Debug builds. The release was only on partial control catalog.
Wiesław Šoltés
@wieslawsoltes
Apr 07 2018 21:11
@danwalmsley @jmacato Looks like the release bug we have found does not have simple workaround.
"From a cursory look, the Retail problem appears to be due to a issue in RyuJIT - you can repro it by just calling Boolean.Parse("False") - it will fail because Boolean.TryParse compares to the "True" literal twice instead of comparing with "True" and "False". My first guess would be an issue with value numbering string literals. CoreRT does them differently than CoreCLR"
Quote from CoreRT gitter chat.
James Burnside
@JCBurnside
Apr 07 2018 21:14
ok so how do I update the Avalonia extension for VS? It isn't showing an update for it?
James Burnside
@JCBurnside
Apr 07 2018 21:43
I just uninstalled and reinstalled and have the same issue.
James Burnside
@JCBurnside
Apr 07 2018 22:02
this is what I see when I open the designer
MonkAlex
@MonkAlex
Apr 07 2018 22:03
try build project
James Burnside
@JCBurnside
Apr 07 2018 22:04
I have built it. no change
danwalmsley
@danwalmsley
Apr 07 2018 22:04
@JCBurnside you need to update the nuget package, it seemed from the error message you posted earlier you are using old version
the actual avalonia version not the extension
can you post contents of your csproj file?
James Burnside
@JCBurnside
Apr 07 2018 22:05

...```xml

<ItemGroup>
<PackageReference Include="Avalonia" Version="0.5.0" />
<PackageReference Include="Avalonia.Desktop" Version="0.5.0" />
<PackageReference Include="Serilog.Sinks.Trace" Version="2.1.0" />
</ItemGroup>
```

danwalmsley
@danwalmsley
Apr 07 2018 22:05
ok
change 0.5.0
with 0.6.1
then clean and rebuild and see if it works
James Burnside
@JCBurnside
Apr 07 2018 22:08
well it was telling me to change build targets... and that broke everything
le sigh.
danwalmsley
@danwalmsley
Apr 07 2018 22:12
updating to latest version didnt help?
James Burnside
@JCBurnside
Apr 07 2018 22:12
different error
image.png
danwalmsley
@danwalmsley
Apr 07 2018 22:13
looks like you need to run dotnet restore
you must also target netcoreapp2.0 in your csproj
or net462
James Burnside
@JCBurnside
Apr 07 2018 22:14
ok the text was off...
it said 45 not 462
and that fixed it.
now to add the missing function
se5a
@se5a
Apr 07 2018 22:27
ok so I created a new avalonia project in VS that all seemed to work and run with the hello world text.
pulled it to linux, and tried to run it there
and I'm getting: Avalonia.Gtk3.Interop.NativeException has been thrown
at Avalonia.Gtk3.Interop.UnixLoader.GetProcAddress (System.IntPtr dll, System.String proc, System.Boolean optional) [0x00026] in <5627fa06ea9a4c84b855516124a2c06c>:0
at Avalonia.Gtk3.Interop.Resolver.Resolve (System.String basePath) [0x00178] in <5627fa06ea9a4c84b855516124a2c06c>:0
actualy lets update avalonia and try again
se5a
@se5a
Apr 07 2018 22:33
ok now it's a somewhat more intelegeble error: No rendering subsystem found. Are you missing assembly references?
se5a
@se5a
Apr 07 2018 22:41
hirmn. I did have another older little Avalonia project that worked.
then I upadated the packages there and that's throwing the same error "No rendering subsystem found. Are you missing assembly references?"
any ideas?