These are chat archives for AvaloniaUI/Avalonia

13th
Feb 2018
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 02:52
blob
finally!
now try add fontconfig
Nikita Tsukanov
@kekekeks
Feb 13 2018 05:33

VS hangs, then "designer process crashed"

Happens even with the previous version of VS extension, actually

Will try to figure out the focus loss issue
Nikita Tsukanov
@kekekeks
Feb 13 2018 06:20
@grokys
AvaloniaUI/Avalonia@3a42ef3
This should fix the focus loss
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:15
@galvesribeiro I have a shell script to crosscompile things for avalonia..
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:16
@mterwoord oh, can u share it?
I got the build working
After a huge set of files edited
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:17
well, i only had to edit a handufl of things
but all is in a script
hold on
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:17
It is easy to xcompile if your processor has hard float point
My device doesnt
So the changes are big
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:18
ah
you're not targetting raspberry?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:18
Nop
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:18
well, aybe you can still somehow use my stuff, feel free
curious: what device are you targetting?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:18
It is a proprietary payment terminal
ah ok
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:18
Armv6l
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:18
will you be using mono or .net core?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:19
Oh! I saw your script
Matthew from Xamarin shared with me
I did exactly same changes you did to start playing
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:19
cool
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:19
But code changes were also required
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:20
i'm targetting raspberry pi 3 / beaglebone black and things work like a charm using .net core
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:20
Specially changes in some inline assembly calls
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:20
only parts are slow as hell, not sure what's that yet
ah, well, that makes sense then..
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:20
I cant use .net core unfortunatelly
There is no build for my device
:worried:
I may give it a try some day
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:20
:)
ou'll be using mono?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:21
Yeah
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:21
ok
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:21
I already had mono 4.x working with older version of skia 2-3 yrs ago
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:21
the main stuff thats slow for me is switching views. not sure if its just the rendering itself or the view creation (ie, xaml parsing)
need to dig into that but not highest priority now.
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:21
Now I’m back to that same device and had to update mono to latest stable
And skia broke as they changed to use GN instead of gyp
Ic
I’ll try avalonia tomorrow with it
Are u using framebuffer backend?
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:22
x11 i think, which in turn uses framebuffer
iirc
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:22
Ahh
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:23
using yocto to build images
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:23
You have an extra thing, x11, consuming resources
In my case there is no X
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:23
resources as in memory?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:23
I cant use yocto... the device has its own OS. I can only run apps
Yeah
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:23
i couldn't get direct loading working, and i'm not sure if the added overhead will be a problem
also, not 100% sure if the term "x11" is correct here..
:)
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:24
Yeah... in a PI probabky not
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:24
i'm a windows-focused developer.. :)
i was really proud of myself when i got things booting using yocto and my software
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:24
Window manager, like kde, gnome, xfce etc
Matthijs ter Woord
@mterwoord
Feb 13 2018 07:24
combined things with mender, and now i have continuous deployment :)
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:24
Heheh
Nice
I cant use that for those devices unfortunatelly
I have to use my own services to deploy to them
Need to figure out why mono is complaining about not able to find System.Core dll
I rememberg something like that when using PCLs
But I’m not. The only reference now is SkiaSharp
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 07:32
ono: The following assembly referenced from /data/opt/Debug/SkiaSharp.dll could not be loaded:
     Assembly:   System.Core    (assemblyref_index=2)
     Version:    4.0.0.0
     Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the
location of the executing assembly (/data/opt/Debug/).

Mono: Failed to load assembly SkiaSharp[0x11e6130].
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicK
eyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
  at SkiaSharp.SKSurface.Create (SkiaSharp.SKImageInfo info, System.IntPtr pixels, System.Int32 rowBytes) [0x0001b] in <
cf546bad13294f0f88da02ef9d3e7062>:0
  at HelloPOS.Program.Main () [0x0005d] in <acfd4e7c076d461eb12e68a646afb1fb>:0j
Nikita Tsukanov
@kekekeks
Feb 13 2018 07:33
It's probably an outdated Mono version or something
We are now targeting netstandard2.0
danwalmsley
@danwalmsley
Feb 13 2018 08:57
@kekekeks do any of the updates to previewer provide new features for Avalon studio or is it only vs integration?
Nikita Tsukanov
@kekekeks
Feb 13 2018 09:02
You can use --session-id, I guess
So you won't need to create a separate tcplistener for each previewer session
It also sends you a message when it's ready to accept XAML
just before app.Run()
danwalmsley
@danwalmsley
Feb 13 2018 11:47
were you thinking of merging hipster-friendly-language-server to master?
Nikita Tsukanov
@kekekeks
Feb 13 2018 12:03
No idea, I was planning to get vscode extension working
But the progress kinda stalled
There is also a performance issue in the protocol itself
It would be nice to use shared memory for transfering the bitmap data
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 14:16
@kekekeks I'm using the latest mono version and I did not even touched Avalonia yet :D
it still pure skiasharp
the xamagon example I'm trying to run
danwalmsley
@danwalmsley
Feb 13 2018 14:30
@kekekeks do you know if the android stuff works yet?
Nikita Tsukanov
@kekekeks
Feb 13 2018 14:30
It workedd last time I've touched it
It can even show popups now
The problem is that nobody has actually tried to create an android application with avalonia
Matthijs ter Woord
@mterwoord
Feb 13 2018 14:35
@kekekeks depending on how things evolve, aftetr the 2 roadshows i had, i may work on that this year.. :) (ie, making apps that use avalonia)
danwalmsley
@danwalmsley
Feb 13 2018 14:44
@kekekeks I'm trying to develop an app for a commercial project, we are trying uwp, and I'm not enjoying it at all! so many things are missing since wpf :(
was considering trying android avalonia
just not sure how ready it will be
is there any instructions on how to fire it up?
Matthijs ter Woord
@mterwoord
Feb 13 2018 14:45
uwp misses quite a lot of stuff, for sure, but is usable to me, though. wish win iot for raspberry was more mature.... :)
Nikita Tsukanov
@kekekeks
Feb 13 2018 14:46
@danwalmsley we a providing a base class for Activity
That's basically everything you need
danwalmsley
@danwalmsley
Feb 13 2018 14:47
do you think it would be commercially viable?
to use?
Nikita Tsukanov
@kekekeks
Feb 13 2018 14:47
Absolutely no idea
The main issue would be textboxes
danwalmsley
@danwalmsley
Feb 13 2018 14:48
when I load avalonia.sln in visual studio
the android project fails to load
Nikita Tsukanov
@kekekeks
Feb 13 2018 14:48
we don't have touch-friendly text input controls
danwalmsley
@danwalmsley
Feb 13 2018 14:48
what do I need to install?
I might be able to work around that for a while
Nikita Tsukanov
@kekekeks
Feb 13 2018 14:48
Try to install xamarin stuff
I have some ideas about embedding native textboxes into our scene
Which involves offscreen controls and shared bitmaps
The problem is that we don't have touch input infrastructure
danwalmsley
@danwalmsley
Feb 13 2018 14:52
check boxes, and buttons work though?
Nikita Tsukanov
@kekekeks
Feb 13 2018 14:53
Yep
Text input works too
But it's not touch friendly
danwalmsley
@danwalmsley
Feb 13 2018 14:54
ok going to give it a go
might be ok until we get to demo
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:01
It might be viable to use it alongside with Xamarin.Forms
I think I have some kind of a demo project somewhere
Let me check
That will allow you to embed avalonia controls to xamarin forms
at least for android
I haven't tried with iOS yet
danwalmsley
@danwalmsley
Feb 13 2018 15:16
@kekekeks ok thanks I will give that a try
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:27
@grokys we need a RxUI-based app template
People are having trouble with setting it up
Steven Kirk
@grokys
Feb 13 2018 15:28
@kekekeks yep! there is one in AvaloniaUI/AvaloniaVS#57
oh sorry
just pushed the WIP on the RxUI-based template
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:29
Wow, cool
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:30
We probably need to somehow select the target framework during project creation
Instead of using TargetFrameworks
Steven Kirk
@grokys
Feb 13 2018 15:30
yeah, if there's a way of doing that
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:30
Since previewer now works with netcoreapp2.0
Steven Kirk
@grokys
Feb 13 2018 15:30
tbh at this stage i don't mind telling people to just edit <TargetFrameworks>
i think there should be a better way to do it coming to VS
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:31
Well, you have more experience with extending VS than me. I'm still get lost every time when I try to find the docs for a particular feature
Steven Kirk
@grokys
Feb 13 2018 15:34
heh, me too, believe me
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 15:34
guys
Steven Kirk
@grokys
Feb 13 2018 15:34
i'm really hoping for a way to use the netcore templates in VS at some point
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 15:34
does Avalonia + Skia + Framebuffer has any dependency on System.Drawing.XXXX
?
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:34
Nope
You don't need libgdiplus.so
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 15:34
I want to remove it from the mono dlls to reduce the payload with the gac files
good, thanks!
System.Xaml?
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:36
We are using Portable.Xaml instead
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 15:37
ok, and the last one, WindowsBase.dll
danwalmsley
@danwalmsley
Feb 13 2018 15:37
@kekekeks even with the xamarin stuff installed it wont open the ControlCatalog.Andriod project
image.png
any ideas whats missing?
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:39
Try to manually reload
It keeps projects unloaded even if you install VS components
@grokys https://msdn.microsoft.com/en-us/library/ms185301.aspx looks pretty straightforward
Steven Kirk
@grokys
Feb 13 2018 15:43
Yeah I'd rather not have to implement a wizard personally when VS has got to implement this soon
They need it
There is already a drop-down for net framework version
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:46
We could add some checkboxes like "Include Reactive UI", "Include XAML behaviors", etc
danwalmsley
@danwalmsley
Feb 13 2018 15:52
@kekekeks trying to build the ControlCatalog.Android project gives
NU1202: Package System.Reactive.Windows.Threading 3.1.1 is not compatible with monoandroid44 (MonoAndroid,Version=v4.4). Package System.Reactive.Windows.Threading 3.1.1 supports:
  - net45 (.NETFramework,Version=v4.5)
  - netcore451 (.NETCore,Version=v4.5.1)
  - uap10.0 (UAP,Version=v10.0)
  - wpa81 (WindowsPhoneApp,Version=v8.1)
NuGet package restore failed.
Nikita Tsukanov
@kekekeks
Feb 13 2018 15:52
Hmmmmm......
I'm not sure why do we need this package
danwalmsley
@danwalmsley
Feb 13 2018 16:20
image.png
not possible to install the nuget package to an android project in visual studio either.. shall I just remove that package?
hmm we would have to remove from here:
I think this is needed for reactive ui to work
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:24
I'm not sure that we need System.Reactive.Windows.Threading
@grokys any ideas?
danwalmsley
@danwalmsley
Feb 13 2018 16:25
i guess android backend hasn't been tried for a long time
hmm if I remove it from the props file I get...
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:28
It should still work
danwalmsley
@danwalmsley
Feb 13 2018 16:28
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018: The "ResolveLibraryProjectImports" task failed unexpectedly.
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018: System.IO.FileNotFoundException: Could not load assembly 'Avalonia.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018: File name: 'Avalonia.Android.dll'
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018:    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018:    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018:    at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection`1 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018:    at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
18>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1138,2): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
========== Build: 17 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:28
Weird
danwalmsley
@danwalmsley
Feb 13 2018 16:29
trying a clean and build
still doenst work
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:32
Are you building avalonia solution itself?
BTW, I don't see System.Reactive.Windows.Threading anywhere in nuget package dependencies
danwalmsley
@danwalmsley
Feb 13 2018 16:36
yeah
then I tried just a blank xamarin app
new one
and tried to install the Avalonia.Xamarin package in visualstudio
and it give cyclic dependency error
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:37
I've successfully built ControlCatalog.Android from the latest master right now without any changes
danwalmsley
@danwalmsley
Feb 13 2018 16:41
hmm let me just go back to windows
1 sec
mines 8.1.5.0 head
and VS 15.5.5
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:44
there might be some nuget issues
danwalmsley
@danwalmsley
Feb 13 2018 16:44
so it just worked for you?
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:44
Especially with circular dependencies in System.Reactive
yep, just worked
danwalmsley
@danwalmsley
Feb 13 2018 16:44
you didnt have to remove anything?
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:45
Nope
Try to install System.Reactive 3.1.1 into an empty xamarin.android project
danwalmsley
@danwalmsley
Feb 13 2018 16:48
that works
its only System.Reactive.Windows.Threading one that causes a problem
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:48
We aren't referencing it anywhere from our nuget packages
danwalmsley
@danwalmsley
Feb 13 2018 16:48
I wonder
if
<PackageReference Condition="$(TargetFramework.StartsWith('net4'))" Include="System.Reactive.Windows.Threading" Version="3.1.1" />
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 16:48
oh gosh, do we need that reactive assembly from .net?
danwalmsley
@danwalmsley
Feb 13 2018 16:48
that condition thing is failing on mine?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 16:48
I removed from the GAC :(
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:49
@danwalmsley that condition doesn't affect nuget packages at all
we are manually constructing those
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 16:53
blob
why Avalonia nuget depends on .NetCoreApp? Shouldn't it be netstandard ?
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:54
We have different sets of dependencies for different TFMs
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 16:55
ok
just got an error saying it is not compatible with SkiaSharp version on my app... let me remove and try
I want to check if that crash is ebcause of my old framebuffer code or if it will happen with avalonia as well
blob
I wonder if that is really required
Nikita Tsukanov
@kekekeks
Feb 13 2018 16:57
The first one only contains a text file with runtime and TFM list
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 16:58
ok... just trying to avoid big packages to be sent to the device
any samples on the linux framebuffer usage?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:05
was looking just at that :) thanks :P
danwalmsley
@danwalmsley
Feb 13 2018 17:06
:(
1>Test.Android -> C:\Users\dan\dev\repos\ILMD\ILMDCameraViewer\Test.Android\bin\Debug\Test.Android.dll
1>Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'ReactiveUI, Version=8.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
1>File name: 'ReactiveUI.dll'
1>   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
1>   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
1>   at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)
1>Done building project "Test.Android.csproj" -- FAILED.
@kekekeks you Avalonia.Forms, are you able to get that to run on latest nightly if you have a minute?
hmm actually its ok
I added reactiveui directly to the android project and it stopped complaining
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:10
blob
:(
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:13
You have probably stripped too much
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:13
stripped what?
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:15
dependencies/assemblies
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:15
where? I mean, it is on my windows machine
nothing has been stripped
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:15
It looks like you only have app.exe and SkiaSharp.dll in your output directory
That's not enough to run the designer
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:22
I rebuilt
and it added even the native skiasharp
which is undesirable as I have my custom one
but anyway, the error changed to a big one now
blob
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:24
Again, you are missing Avalonia.Win32 assembly
Designer won't work without it
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:24
ok but will my app depends on it?
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:25
It won't be used in runtime
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:25
yeah but will be packed on the output unless I manually remove it. Ok no problem
adding the package
I think there are ways to have the designer not rely on things from the build output and instead load that from somewhere else like the extensions directory... will look at it later on
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:29

there are ways to have the designer not rely on things from the build output

Nope, designer will always use actual binaries

That way it's completely version-agnostic
We only define the protocol, that's it
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:31
ok but, one thing is what it is presenting (the user-defined XAML), which should be read from the build output, the other thing is designer specific supporting assemblies, like Win32 and Direct2D1 which I just had to add
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:33
They aren't "designer-specific"
they are platform-specific
And are tied to the particular avalonia version
we won't be shipping those with our VS extension
That would mean that extension would only work with some restricted set of avalonia versions
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:35
ok...
so we have to have conditional references
got i
tt
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:36
And you are doing it wrong anyway. You are supposed to have a portable netstandard2.0 library with your application
And a set of "launchers" for each platform
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:36
I know
and I'll
I'm just testing it to see if it run on the device
simple hello world avalonia
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:37
You can create a separate project
And reference your app from it
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:38
sure
let me first make sure I have it working on the device
otherwise the designer will not matter :D
        /// <summary>
        /// This method is needed for IDE previewer infrastructure
        /// </summary>
        public static AppBuilder BuildAvaloniaApp()
            => AppBuilder.Configure<App>().UsePlatformDetect().UseReactiveUI();
do I need that?
Nikita Tsukanov
@kekekeks
Feb 13 2018 17:39
The new previewer version won't work without it
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:40
ok, designer, don't need it now
ahhh, from 38mb to 5.7mb :)
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Avalonia.LinuxFramebuffer.LinuxFramebufferPlatform' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Avalonia.Input.KeyboardDevice..ctor () [0x0000c] in <4caddf443a9a4ef08061e124963bd66f>:0
  at Avalonia.LinuxFramebuffer.LinuxFramebufferPlatform..cctor () [0x00000] in <aa0780b8fc3e4881937a19a33895d210>:0
   --- End of inner exception stack trace ---
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00000] in <aa0780b8fc3e4881937a19a33895d210>:0
  at HelloPOS.Program.Main () [0x00006] in <bbe733a136204ce997b3b8ebeef19180>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Avalonia.LinuxFramebuffer.LinuxFramebufferPlatform' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Avalonia.Input.KeyboardDevice..ctor () [0x0000c] in <4caddf443a9a4ef08061e124963bd66f>:0
  at Avalonia.LinuxFramebuffer.LinuxFramebufferPlatform..cctor () [0x00000] in <aa0780b8fc3e4881937a19a33895d210>:0
   --- End of inner exception stack trace ---
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00000] in <aa0780b8fc3e4881937a19a33895d210>:0
  at HelloPOS.Program.Main () [0x00006] in <bbe733a136204ce997b3b8ebeef19180>:0
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 17:46
@kekekeks any guess?
danwalmsley
@danwalmsley
Feb 13 2018 17:55
@kekekeks does #1369 look ok to you?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:00
       var fb = new LinuxFramebuffer("/dev/fb");
            Console.WriteLine($"Id {fb.Id} Size {fb.PixelSize}");
            fb.Dispose();
this part of the constructor looks correct
Id LCD_FB_ID Size 320, 240
prints what is expected
that is where it is failing... wonder why
Nikita Tsukanov
@kekekeks
Feb 13 2018 18:28
@galvesribeiro Mono has quite a bad habit of omiting InnerException from the output
Need to know what has exactly happened there
Hm...
The only thing that could have went wrong in KeyboardDevice ctor
Is AvaloniaLocator.Current being null
weird
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:30
I'm adding the avalonia projects to my project solution to try debug
Nikita Tsukanov
@kekekeks
Feb 13 2018 18:30
Oh, I see
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:30
I've instantiated the kbd device directly
Nikita Tsukanov
@kekekeks
Feb 13 2018 18:30
It has never worked with Mono, actually
.NET Core and Mono have different rules about calling static ctors
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:31
plz dont tell me that :(
danwalmsley
@danwalmsley
Feb 13 2018 18:31
@galvesribeiro you dont need to do that, just build the control catalalog.netcore app.
Nikita Tsukanov
@kekekeks
Feb 13 2018 18:31
Probably need to change some initialization logic there
danwalmsley
@danwalmsley
Feb 13 2018 18:31
then run /scripts/ReplaceNugetCache.sh [insert-nuget-version-here]
and then run and debug your app normally
Nikita Tsukanov
@kekekeks
Feb 13 2018 18:32
So KeyboardDevice instance won't be called from the static ctor there
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:32
@danwalmsley I'm first trying a simple Hello World. Control catalog is big, next step :)
also, I don't have .net core here, just mono @danwalmsley
man... this solution is slow like hell... probably the xamarin stuff
danwalmsley
@danwalmsley
Feb 13 2018 18:33
you can build the mono one, and just change the copy dirs in ReplaceNugetCache.sh
I should create a wiki entry on how that works
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:34
yeah, I'm confused hehehe
danwalmsley
@danwalmsley
Feb 13 2018 18:34
basically if you build the entire Avalonia solution
you have a copy of the dlls on your system including debug symbols
then you run the replace script
this copies it over the files in the nuget cache folder
then when you run your program normally you can now debug into Avalonia code
without having to add references to all the projects.. which can sometimes be quite difficult to get to work
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:35
ic
the point is, I don't have mono SDB configured yet
I'm console.writeling things
it is a tricky device
danwalmsley
@danwalmsley
Feb 13 2018 18:36
ah ok
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:36
will do that later on... I used to have a hack with MonoDevelop to remote debug it, but looks like VSCode mono debugger plugin will now do the trick
but again, first I need a simple hello world working then I can make everything else :)
blob
look at what just avalonia solution is doing... jibus
@kekekeks do you have a quick suggestion on what I can change/hack to get it working? I just want a hello world working then I can find the proper solution and make a PR
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 18:54
ok, I just commented the call to the locator and added a new KeyboardDevice() there
now the error changed
Unhandled Exception:
System.Exception: Error: 2
  at Avalonia.LinuxFramebuffer.LinuxFramebuffer..ctor (System.String fileName, System.Nullable`1[T] dpi) [0x00085] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.LinuxFramebuffer.LinuxFramebufferPlatform..ctor (System.String fbdev) [0x00008] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.LinuxFramebuffer.LinuxFramebufferPlatform.Initialize[T] (T builder, System.String fbdev) [0x00001] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00001] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at HelloPOS.Program.Main () [0x00006] in <1b52bcb5ab7541b8a7085836ddb59fc5>:0
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:05
statics are bad...
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:22
yay!
getting closer ;D
Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Avalonia.Themes.Default' or one of its dependencies
  at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, System.Boolean refonly) [0x00016] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.AppDomain.Load (System.String assemblyString) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Reflection.Assembly.Load (System.String assemblyString) [0x00005] in <2e7c1c96edae44d496118948ca617c11>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.GetAssembly (System.String name) [0x00097] in <ab4febb585d04b7aa9fc7c5765568c1f>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.GetAssembly (System.Uri uri) [0x00027] in <ab4febb585d04b7aa9fc7c5765568c1f>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.GetAsset (System.Uri uri, System.Uri baseUri) [0x00021] in <ab4febb585d04b7aa9fc7c5765568c1f>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.Open (System.Uri uri, System.Uri baseUri) [0x00001] in <ab4febb585d04b7aa9fc7c5765568c1f>:0
  at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load (System.Uri uri, System.Uri baseUri, System.Object rootInstance) [0x0002d] in <fbfd8723eedb44fdad015d9ddfbb936b>:0
  at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded () [0x0001d] in <fbfd8723eedb44fdad015d9ddfbb936b>:0
  at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Styling.ISetStyleParent.NotifyResourcesChanged (Avalonia.Controls.ResourcesChangedEventArgs e) [0x00001] in <fbfd8723eedb44fdad015d9ddfbb936b>:0
  at Avalonia.Styling.Styles.<.ctor>b__2_0 (Avalonia.Styling.IStyle x) [0x0002a] in <0c0e5aad803145cab50fbd9e070c2910>:0
  at Avalonia.Collections.AvaloniaListExtensions+<>c__DisplayClass0_0`1[T].<ForEachItem>b__0 (System.Int32 _, T i) [0x00000] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Collections.AvaloniaListExtensions+<>c__Displ
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:35
is that dll loaded diferently then others in Avalonia? I mean, it is here in the same directory of all others but for whatever reason the runtime can't load it
Mono: Assembly System.Configuration[0xbb8210] added to domain MonoTestApp, ref_count=1
Mono: Assembly Loader loaded assembly from location: '/data/opt/mono/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f
11d50a3a/System.Configuration.dll'.
Mono: Assembly Ref addref System[0x90f6a0] -> System.Configuration[0xbb8210]: 2
Mono: Assembly Ref addref System.Configuration[0xbb8210] -> mscorlib[0x8aa490]: 12
Mono: Assembly Loader probing location: '/data/opt/mono/lib/Avalonia.Themes.Default.dll'.
Mono: Assembly Loader probing location: '/data/opt/mono/lib/mono/4.5//Facades/Avalonia.Themes.Default.dll'.
Mono: Assembly Loader probing location: '/data/opt/mono/lib/Avalonia.Themes.Default.exe'.
Mono: Assembly Loader probing location: '/data/opt/mono/lib/mono/4.5//Facades/Avalonia.Themes.Default.exe'.

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.Fi
leNotFoundException: Could not load file or assembly 'Avalonia.Themes.Default' or one of its dependencies
  at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, System.Boole
an refonly) [0x00016] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.AppDomain.Load (System.String assemblyString) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Reflection.Assembly.Load (System.String assemblyString) [0x00005] in <2e7c1c96edae44d496118948ca617c11>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.GetAssembly (System.String name) [0x00097] in <ab4febb585d04b7aa9fc7c57
65568c1f>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.GetAssembly (System.Uri uri) [0x00027] in <ab4febb585d04b7aa9fc7c576556
8c1f>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.GetAsset (System.Uri uri, System.Uri baseUri) [0x00021] in <ab4febb585d
04b7aa9fc7c5765568c1f>:0
  at Avalonia.Shared.PlatformSupport.AssetLoader.Open (System.Uri uri, System.Uri baseUri) [0x00001] in <ab4febb585d04b7
aa9fc7c5765568c1f>:0
  at Avalonia.Markup.Xaml.AvaloniaXamlLoaderPortableXaml.Load (System.Uri uri, System.Uri baseUri, System.Object rootIns
tance) [0x0002d] in <fbfd8723eedb44fdad015d9ddfbb936b>:0
  at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded () [0x0001d] in <fbfd8723eedb44fdad015d9ddfbb936b>:0
  at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Styling.ISetStyleParent.NotifyResourcesChanged (Avalonia.Control
s.ResourcesChangedEventArgs e) [0x00001] in <fbfd8723eedb44fdad015d9ddfbb936b>:0
  at Avalonia.Styling.Styles.<.ctor>b__2_0 (Avalonia.Styling.IStyle x) [0x0002a] in <0c0e5aad803145cab50fbd9e070c2910>:0

  at Avalonia.Collections.AvaloniaListExtensions+<>c__DisplayClass0_0`1[T].<ForEachItem>b__0 (System.Int32 _, T i) [0x00
000] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Collections.AvaloniaListExtensions+<>c__Displ
it is looking at the mono framework dlls and don't get it from the local directory as with the others...
blob
Nikita Tsukanov
@kekekeks
Feb 13 2018 19:47

do you have a quick suggestion on what I can change/hack to get it working

LinuxFramebufferPlatform needs to be changed not to call anything it its static constructor

Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:48
I dropped the static Instance field from there
Nikita Tsukanov
@kekekeks
Feb 13 2018 19:48
Ah, ok
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:48
and made the changes in other places where it was used to use the locator
will make a PR later
Nikita Tsukanov
@kekekeks
Feb 13 2018 19:48
Try to add a handler for AppDomain.AssemblyResolve
It should give you a better idea of what's going on
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:48
var dumb = typeof(Avalonia.Themes.Default.DefaultTheme);
            Console.WriteLine($"Theme loaded {dumb.Name}");
added that at first line on the Main() and it loaded without error
and that loading error was gone
now this:
Unhandled Exception:
System.Exception: Could not CreateWindow(): IWindowingPlatform is not registered.
  at Avalonia.Controls.Platform.PlatformManager.CreateWindow () [0x00015] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Controls.Window..ctor () [0x00000] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at HelloPOS.MainWindow.AddHandler (Avalonia.Interactivity.RoutedEvent routedEvent, System.Delegate handler, Avalonia.Interactivity.RoutingStrategies routes, System.Boolean handledEventsToo) [0x00000] in <0e10f27037aa4f488c0e1b8da7fbb1c2>:0
  at HelloPOS.Program+<>c.<Main>b__0_0 (Avalonia.Controls.TopLevel tl) [0x00001] in <0e10f27037aa4f488c0e1b8da7fbb1c2>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00009] in <93855d97f5e341da8098db04d0f3f445>:0
  at HelloPOS.Program.Main () [0x00027] in <0e10f27037aa4f488c0e1b8da7fbb1c2>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Could not CreateWindow(): IWindowingPlatform is not registered.
  at Avalonia.Controls.Platform.PlatformManager.CreateWindow () [0x00015] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Controls.Window..ctor () [0x00000] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at HelloPOS.MainWindow.AddHandler (Avalonia.Interactivity.RoutedEvent routedEvent, System.Delegate handler, Avalonia.Interactivity.RoutingStrategies routes, System.Boolean handledEventsToo) [0x00000] in <0e10f27037aa4f488c0e1b8da7fbb1c2>:0
  at HelloPOS.Program+<>c.<Main>b__0_0 (Avalonia.Controls.TopLevel tl) [0x00001] in <0e10f27037aa4f488c0e1b8da7fbb1c2>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00009] in <93855d97f5e341da8098db04d0f3f445>:0
  at HelloPOS.Program.Main () [0x00027] in <0e10f27037aa4f488c0e1b8da7fbb1c2>:0
I though there was no requirement for window system on FB
Nikita Tsukanov
@kekekeks
Feb 13 2018 19:54
You can't use Window class with /dev/fb0
See the example
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:54
humm
We don't have a built-in window manager
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:55
I am using the App there
ahhh
the problem is with the content
I added from the template a window
Nikita Tsukanov
@kekekeks
Feb 13 2018 19:56
You need to use UserControl as the base class for your main view
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 19:56
let me change that
yeah
takes a while to startup...
I hope it is just the startup and the perf of Avalonia on the device is usable
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:01
Unhandled Exception:
System.MissingMethodException: Attempted to access a missing method.
  at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices.IsTransparentProxy(object)
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[] waitHandles, System.Int32 millisecondsTimeout, System.Boolean exitContext) [0x0007b] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[] waitHandles) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at Avalonia.Controls.Platform.InternalPlatformThreadingInterface.RunLoop (System.Threading.CancellationToken cancellationToken) [0x00020] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Threading.Dispatcher.MainLoop (System.Threading.CancellationToken cancellationToken) [0x0002b] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Application.Run (Avalonia.Input.ICloseable closable) [0x00049] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00032] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at HelloPOS.Program.Main () [0x00027] in <8bfa1b14d65a465eb7a60fa49820329e>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Attempted to access a missing method.
  at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices.IsTransparentProxy(object)
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[] waitHandles, System.Int32 millisecondsTimeout, System.Boolean exitContext) [0x0007b] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[] waitHandles) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at Avalonia.Controls.Platform.InternalPlatformThreadingInterface.RunLoop (System.Threading.CancellationToken cancellationToken) [0x00020] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Threading.Dispatcher.MainLoop (System.Threading.CancellationToken cancellationToken) [0x0002b] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Application.Run (Avalonia.Input.ICloseable closable) [0x00049] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.T
hreading.CancellationToken stop, System.String fbdev) [0x00032] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at HelloPOS.Program.Main () [0x00027] in <8bfa1b14d65a465eb7a60fa49820329e>:0
ouch
is Avalonia using Remoting?
I've removed remoting from my mono build :(
need to build it again...
Nikita Tsukanov
@kekekeks
Feb 13 2018 20:04
Well, actually, it's WaitHandle that needs remoting assembly
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:04
humm
Nikita Tsukanov
@kekekeks
Feb 13 2018 20:04
Have you tried to use the linker?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:04
which linker?
this one
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:05
ok but, that would link what? managed or unmanaged assemblies?
Nikita Tsukanov
@kekekeks
Feb 13 2018 20:05
It traverses the dependency graph
And strips unneded assemblies and unused types/methods
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:06
ok, IL, managed then... that is a good thing... will check on that when I come to the enhancements phase, thanks, will keep a note
for now, let me add that remoting support on libmono-sgen
blob
indeed need to add the support at the native library... the managed is there already
Nikita Tsukanov
@kekekeks
Feb 13 2018 20:10
I guess it was an icall
Yep, icall
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:11
was looking at it
ok, so let me rebuild mono, brb
./autogen.sh --host=$CROSS --prefix=/home/guto/mono/build --disable-rpath --with-xen-opt=no --enable-small-config=yes --with-ikvm-native=no --enable-minimal=perfcounters,desktop_loader,shared_perfcounters,remoting,aot,com,attach,full_messages,large_code,profiler,reflection_emit,reflection_emit_save,shadow_copy,ssa,simd --disable-mcs-build
here is the problem... remoting on --enable-minimal
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 20:17
lol // TODO: What should it do? right bellow that icall
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 21:16
done
lets test
Steven Kirk
@grokys
Feb 13 2018 21:42
do we have an .ico of the avalonia logo anywhere?
Steven Kirk
@grokys
Feb 13 2018 21:46
ah, d'oh
we should add that to static-images
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 21:53
great! I forgot to set CC/CXX to the cross compiler... mono built on x86...
galvesribeiro @galvesribeiro fail
Steven Kirk
@grokys
Feb 13 2018 22:09
@kekekeks i think AvaloniaUI/AvaloniaVS#57 is ready for review now, it has an MVVM app template that includes RxUI and basic plumbing
Jeremy Koritzinsky
@jkoritzinsky
Feb 13 2018 22:40
@kekekeks I've been looking through the designer code and it looks like a lot is unused with the update to make the Win32 designer go through the new tcp-based system. After we release Beta 1, would it make sense to remove the now-dead designer code?
Steven Kirk
@grokys
Feb 13 2018 23:04
i've punted a few things from the beta1 milestone https://github.com/AvaloniaUI/Avalonia/milestone/2 to beta2 that aren't going to get done
what is the status of the two remaining issues? punt or fix?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 23:16
ok back in the game
it looks like the version of SkiaSharp used here is looking for dylib and not .so
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. ---> System.DllNotFoundException: libSkiaSharp.dylib
  at (wrapper managed-to-native) SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
  at SkiaSharp.SKImageInfo..cctor () [0x00000] in <3e4b2014b7144041b6049286880ba700>:0
   --- End of inner exception stack trace ---
  at Avalonia.Skia.FramebufferRenderTarget.CreateDrawingContext (Avalonia.Rendering.IVisualBrushRenderer visualBrushRenderer) [0x00028] in <8638abf069584501aa89328ac57d4d17>:0
  at Avalonia.Rendering.ImmediateRenderer.Paint (Avalonia.Rect rect) [0x00028] in <d7c7eccd3ad9432e857a311635580d9d>:0
  at Avalonia.Controls.TopLevel.HandlePaint (Avalonia.Rect rect) [0x0000b] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.LinuxFramebuffer.FramebufferToplevelImpl.<Invalidate>b__9_0 () [0x00021] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.Threading.JobRunner.RunJobs (System.Nullable`1[T] priority) [0x00042] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Controls.Platform.InternalPlatformThreadingInterface.RunLoop (System.Threading.CancellationToken cancellationToken) [0x00037] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Threading.Dispatcher.MainLoop (System.Threading.CancellationToken cancellationToken) [0x0002b] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Application.Run (Avalonia.Input.ICloseable closable) [0x00049] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00032] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at HelloPOS.Program.Main () [0x00027] in <8bfa1b14d65a465eb7a60fa49820329e>:0
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 23:28
updating to lates and we have problems :(
Unhandled Exception:
System.EntryPointNotFoundException: sk_bitmap_can_copy_to
  at (wrapper managed-to-native) SkiaSharp.SkiaApi.sk_bitmap_can_copy_to(intptr,SkiaSharp.SKColorType)
  at SkiaSharp.SKBitmap.CanCopyTo (SkiaSharp.SKColorType colorType) [0x00006] in <cf546bad13294f0f88da02ef9d3e7062>:0
  at Avalonia.Skia.FramebufferRenderTarget+PixelFormatShim..ctor (SkiaSharp.SKImageInfo nfo, System.IntPtr fb, System.Int32 rowBytes) [0x00044] in <8692196438c84d5788abe7f04a8a96d0>:0
  at Avalonia.Skia.FramebufferRenderTarget.CreateDrawingContext (Avalonia.Rendering.IVisualBrushRenderer visualBrushRenderer) [0x00051] in <8692196438c84d5788abe7f04a8a96d0>:0
  at Avalonia.Rendering.ImmediateRenderer.Paint (Avalonia.Rect rect) [0x00028] in <d7c7eccd3ad9432e857a311635580d9d>:0
  at Avalonia.Controls.TopLevel.HandlePaint (Avalonia.Rect rect) [0x0000b] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.LinuxFramebuffer.FramebufferToplevelImpl.<Invalidate>b__9_0 () [0x00021] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.Threading.JobRunner.RunJobs (System.Nullable`1[T] priority) [0x00042] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Controls.Platform.InternalPlatformThreadingInterface.RunLoop (System.Threading.CancellationToken cancellationToken) [0x00037] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Threading.Dispatcher.MainLoop (System.Threading.CancellationToken cancellationToken) [0x0002b] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Application.Run (Avalonia.Input.ICloseable closable) [0x00049] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00032] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at HelloPOS.Program.Main () [0x00027] in <851b30b57be644dfbac383845a07421b>:0
@kekekeks is there a particular reason why stick with the old one?
Gutemberg Ribeiro
@galvesribeiro
Feb 13 2018 23:49
if I comment the CanCopyTocall, I get back the original error on get_canvas() :(