These are chat archives for AvaloniaUI/Avalonia

5th
Feb 2017
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 00:03
I've got that in the wiki page now
Btw another quick observation: it looks like Direct Composition was designed to have a similar feature set to Core Animation, albeit a DirectX style API surface
Nikita Tsukanov
@kekekeks
Feb 05 2017 11:35
This raises 2 questions
1) why do we need 200MB of RAM?
2) (minor one) where does it leak? (probably in GTK or Skia backend)
The leak seems to be in GTK backend
Steven Kirk
@grokys
Feb 05 2017 11:38
on master using d2d/win32 it only takes up 90mb of ram. which is still a lot, but better
Nikita Tsukanov
@kekekeks
Feb 05 2017 11:38
But still, why 200MB?
Steven Kirk
@grokys
Feb 05 2017 11:39
well for a start we're almost completely unoptimized
there is lots of optimization we can do for both speed and memory
Nikita Tsukanov
@kekekeks
Feb 05 2017 11:40
Mkay, that was because of .NET Core
Steven Kirk
@grokys
Feb 05 2017 11:40
but y'know, get things working first
Nikita Tsukanov
@kekekeks
Feb 05 2017 11:40
On desktop .NET GTK+Skia consume 98MB
Steven Kirk
@grokys
Feb 05 2017 11:41
yeah, a bit better
Nikita Tsukanov
@kekekeks
Feb 05 2017 11:41
So .NET Core adds 120MB memory footprint
That's huge
Steven Kirk
@grokys
Feb 05 2017 11:41
wow
how come?
Nikita Tsukanov
@kekekeks
Feb 05 2017 11:41
No idea
I've just started ControlCatalog on desktop .NET and .NET Core
And compared memory consumption
We probably need to file a bug there or something
Nikita Tsukanov
@kekekeks
Feb 05 2017 12:14
@grokys Why aren't we disposing windows in Closed handler?
It's being called from WM_DESTROY and destroy signal handler
So that window object isn't usable anymore anyway
Is implementation supposed to dispose itself?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 12:19
That memory footprint is extremely weird
It is suppose to be smaller than old framework
And it is
Have several runs with it
Nikita Tsukanov
@kekekeks
Feb 05 2017 12:20
We are running essentially the same code there
Well, let's wait for the release
And switch to netstandard
So there won't be voodoo magic with dependency versions, etc
It might be an issue in Splat, Schprahe, System.Reactive
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 12:30
Humm
danwalmsley
@danwalmsley
Feb 05 2017 12:30
@kekekeks the direct2d backend still has a very similar memory leak
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 12:31
Can you dumb both memory and check what is the difference?
danwalmsley
@danwalmsley
Feb 05 2017 12:31
which can be fixed by
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 12:31
Dump
Steven Kirk
@grokys
Feb 05 2017 12:31
@kekekeks yeah the whole behavior of closing windows needs to be sorted out
danwalmsley
@danwalmsley
Feb 05 2017 12:31
SharpDx.Configuration.EnableReleaseOnFinalizer
so perhaps its a gtk manifestation of the same thing
I think @grokys confirmed the same issue a few weeks ago
?
Steven Kirk
@grokys
Feb 05 2017 12:35
the problem is that we use the WPF-like behavior of "resources release on finalize", which isn't the default on SharpDX
Nikita Tsukanov
@kekekeks
Feb 05 2017 12:37
@danwalmsley GTK one was caused by me not disposing huge bitmap
danwalmsley
@danwalmsley
Feb 05 2017 12:37
ah ok
@grokys I think we are still not setting Configuration.EnableReleaseOnFinalizer
in Avalonia code
I still have to manually set it my self in Avalon Studio
Steven Kirk
@grokys
Feb 05 2017 12:39
yeah i think you're right - i set it in scenegraph though
danwalmsley
@danwalmsley
Feb 05 2017 12:40
ah ok
we can wait for that to be merged
Nikita Tsukanov
@kekekeks
Feb 05 2017 12:58
@grokys AvaloniaUI/Avalonia#880
Nikita Tsukanov
@kekekeks
Feb 05 2017 13:23
Since it might load unnecessary assemblies
And it went down to a reasonable amount after updating to the last packages
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 13:41
you must be careful with reflect more than ever, specially load assembly
I would use AssemblyLoadContext
Nikita Tsukanov
@kekekeks
Feb 05 2017 13:44
BTW, pay-to-play is a lie
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 13:45
it depends
if you import the main metapackage you will have all libraries yes, nothing change… pay-to-play apply when you know what to do and import only what you will use
but in all cases, have a look on AssemblyLoadContext class
Nikita Tsukanov
@kekekeks
Feb 05 2017 13:48

      <group targetFramework=".NETCoreApp1.0">
        <dependency id="System.Threading.ThreadPool" version="4.3.0" />
        <dependency id="NETStandard.Library" version="1.6.0" />
        <dependency id="Microsoft.NETCore.Portable.Compatibility" version="1.0.1" />
        <dependency id="Splat" version="2.0.0" />
        <dependency id="Serilog" version="2.3.0" />
        <dependency id="Sprache" version="2.1.0" />
        <dependency id="System.Reactive" version="3.0.0" />
      </group>
It still includes libuv and 10MB of Microsoft.CodeAnalysis.*
and you can't delete them from publish dir
Because of Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.codeanalysis.visualbasic', version: '1.3.0', path: 'lib/netstandard1.3/Microsoft.CodeAnalysis.VisualBasic.dll'
You could strip mono to a reasonable size
Nikita Tsukanov
@kekekeks
Feb 05 2017 13:54
libmono is what, 3MB?
Unity did a pretty good job at providing a minimal mono runtime
with pay-to-play model
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 14:03
<dependency id="NETStandard.Library" version="1.6.0" />
why u need that?
this is the huge metapackage for the whole framework
oh
you are on the old tooling
ok
Nikita Tsukanov
@kekekeks
Feb 05 2017 14:04
I'm targeting .NETStandard 1.5
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 14:04
in the new tooling you dont need that
in fact, VS even warn you about it
look how we do in Orleans
Nikita Tsukanov
@kekekeks
Feb 05 2017 14:06
Nice
Now we need our PCL deps to do the same
I'm worried about splat and schprache
But what about the runtime itself? It's huge
20MB in total
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 14:08
yeh, we just updated Orleans from preview4 to RC3 and have only deps that we need
the runtime part is referenced by an infered MSBuild prop/target but it add only what you project is using/depends on. not that huge metapackage anymore
Nikita Tsukanov
@kekekeks
Feb 05 2017 14:13
$ cat dtest.csproj 
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.0</TargetFramework>
  </PropertyGroup>

</Project>
kekekeks@KeksMPC:/tmp/dtest$ dotnet publish -r ubuntu.14.04-x64 -o out
Microsoft (R) Build Engine version 15.1.523.56541
Copyright (C) Microsoft Corporation. All rights reserved.

  dtest -> /tmp/dtest/bin/Debug/netcoreapp1.0/dtest.dll
kekekeks@KeksMPC:/tmp/dtest$ ls out/
dtest                                   Microsoft.Win32.Primitives.dll           System.Globalization.Calendars.dll   System.Net.NameResolution.dll            System.Resources.Reader.dll                            System.Text.Encoding.dll
dtest.deps.json                         Microsoft.Win32.Registry.dll             System.Globalization.dll             System.Net.Primitives.dll                System.Resources.ResourceManager.dll                   System.Text.Encoding.Extensions.dll
dtest.dll                               mscorlib.dll                             System.Globalization.Extensions.dll  System.Net.Requests.dll                  System.Runtime.dll                                     System.Text.RegularExpressions.dll
dtest.pdb                               mscorlib.ni.dll                          System.Globalization.Native.so       System.Net.Security.dll                  System.Runtime.Extensions.dll                          System.Threading.dll
dtest.runtimeconfig.json                sosdocsunix.txt                          System.IO.Compression.dll            System.Net.Security.Native.so            System.Runtime.Handles.dll                             System.Threading.Overlapped.dll
libclrjit.so                            System.AppContext.dll                    System.IO.Compression.Native.so      System.Net.Sockets.dll                   System.Runtime.InteropServices.dll                     System.Threading.Tasks.Dataflow.dll
libcoreclr.so                           System.Buffers.dll                       System.IO.Compression.ZipFile.dll    System.Net.WebHeaderCollection.dll       System.Runtime.InteropServices.RuntimeInformation.dll  System.Threading.Tasks.dll
libcoreclrtraceptprovider.so            System.Collections.Concurrent.dll        System.IO.dll                        System.Numerics.Vectors.dll              System.Runtime.Loader.dll                              System.Threading.Tasks.Extensions.dll
libdbgshim.so                           System.Collections.dll                   System.IO.FileSystem.dll             System.ObjectModel.dll                   System.Runtime.Numerics.dll                            System.Threading.Tasks.Parallel.dll
libhostfxr.so                           System.Collections.Immutable.dll         System.IO.FileSystem.Primitives.dll  System.Private.CoreLib.dll               System.Security.Claims.dll                             System.Threading.Thread.dll
libhostpolicy.so                        System.ComponentModel.Annotations.dll    System.IO.FileSystem.Watcher.dll     System.Private.CoreLib.ni.dll            System.Security.Cryptography.Algorithms.dll            System.Threading.ThreadPool.dll
libmscordaccore.so                      System.ComponentModel.dll                System.IO.MemoryMappedFiles.dll      System.Private.Uri.dll                   System.Security.Cryptography.Cng.dll                   System.Threading.Timer.dll
libmscordbi.so                          System.Console.dll                       System.IO.UnmanagedMemoryStream.dll  System.Reflection.DispatchProxy.dll      System.Security.Cryptography.Csp.dll                   System.Xml.ReaderWriter.dll
libsosplugin.so                         System.Diagnostics.Debug.dll             System.Linq.dll                      System.Reflection.dll                    System.Security.Cryptography.Encoding.dll              System.Xml.XDocument.dll
libsos.so                               System.Diagnostics.DiagnosticSource.dll  System.Linq.Expressions.dll          System.Reflection.Emit.dll               System.Security.Cryptography.Native.so                 System.Xml.XmlDocument.dll
libuv.so                                System.Diagnostics.FileVersionInfo.dll   System.Linq.Parallel.dll             System.Reflection.Emit.ILGeneration.dll  System.Security.Cryptography.OpenSsl.dll               System.Xml.XPath.dll
Microsoft.CodeAnalysis.CSharp.dll       System.Diagnostics.Process.dll           System.Linq.Queryable.dll            System.Reflection.Emit.Lightweight.dll   System.Security.Cryptography.Primitives.dll            System.Xml.XPath.XDocument.dll
Microsoft.CodeAnalysis.dll              System.Diagnostics.StackTrace.dll        System.Native.a                      System.Reflection.Extensions.dll         System.Security.Cryptography.X509Certificates.dll
Microsoft.CodeAnalysis.VisualBasic.dll  System.Diagnostics.Tools.dll             System.Native.so                     System.Reflection.Metadata.dll           System.Security.Principal.dll
Microsoft.CSharp.dll                    System.Diagnostics.Tracing.dll           System.Net.Http.dll                  System.Reflection.Primitives.dll         System.Security.Principal.Windows.dll
Microsoft.VisualBasic.dll               System.Dynamic.Runtime.dll               System.Net.Http.Native.so            System.Reflection.TypeExtensions.dll     System.Text.Encoding.CodePages.dll
Created an empty project with dotnet new -t console
Nikita Tsukanov
@kekekeks
Feb 05 2017 14:19
Unfortunately I don't see rc4 package in APT repository, so it seems to be not released yet
53MB
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 14:44
APT?
you install it from a .deb file, don’t think it is on APT yet
Nikita Tsukanov
@kekekeks
Feb 05 2017 14:51
Yep, I have RC3 installed
But not RC4 you've mentioned before
Oh, it's direct download
I become more and more convinced that in MS language "RC" means "pre-alpha"
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:02
@galvesribeiro RC4 still published 53MB of binaries. Even without any project references
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:02
weird
for example
if you get a empty console app
it will have < 20mb
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:04
That's an empty console app created with dotnet new -t console
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:04
yes
no references like I said
< 20mb
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:07
$ dotnet new console
Content generation time: 85,7089 ms
The template "Console Application" created successfully.
$ dotnet restore -r ubuntu.14.04-x64
  Restoring packages for /tmp/test/test.csproj...
  Generating MSBuild file /tmp/test/obj/test.csproj.nuget.g.props.
  Generating MSBuild file /tmp/test/obj/test.csproj.nuget.g.targets.
  Writing lock file to disk. Path: /tmp/test/obj/project.assets.json
  Restore completed in 835,01 ms for /tmp/test/test.csproj.

  NuGet Config files used:
      /home/kekekeks/.nuget/NuGet/NuGet.Config

  Feeds used:
      https://api.nuget.org/v3/index.json
$ dotnet publish -r ubuntu.14.04-x64
Microsoft (R) Build Engine version 15.1.545.13942
Copyright (C) Microsoft Corporation. All rights reserved.

  test -> /tmp/test/bin/Debug/netcoreapp1.0/test.dll
$ cd bin/Debug/netcoreapp1.0/ubuntu.14.04-x64/publish
$ du -ks
53308   .
What exactly am I doing wrong?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:09
Screen Shot 2017-02-05 at 13.08.47.png
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:09
I'm talking about publish output
It takes 50MB+
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:10
I’m talking about memory comsumption that you complained earlier
let me try the publish
1m
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:10
Memory consumption is probably caused by that reflection code
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:11
wait
you are publishing with -r
which means you are embedding the whole runtime
:(
remove that
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:11
With mono that "whole runtime" was something like 10MB
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:11
just dotnet publish -c Release
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:11
libmono was 3MB
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:12
yeah it is bigger
but it is way featureful than Mono if I may :)
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:12
That won't give me an app bundle suitable for distribution
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:12
ofc it does
you have 2 ways to distribute
fully embedded framework like you did
and the portable
which uses the shared runtime
that is all
take your choice
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:13
Mono has the option of producing a bundle with fully-embedded framework
stripped to the set of assemblies that you are actually using
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:14
I know
I used mono a lot in embedded
and I had my own Mono loader which embedded the runtime
so trust me I feel that
but
mono has tons of problems with stuff not implemented
it still doesnt have a proper TLS implementation
and tons of other stuff
anyway
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:15
Well, I hope that corert will have a proper linker
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:15
the discussion is, you have those 2 options
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:15
There is only one option for GUI apps, really
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:15
no, there isnt
.net full framework still have windows form, wpf, and multiple GUI apps
and they dont embedded the framework in the app
Xamarin neither
but yes
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:16
Xamarin does embed the framework to your app
release versions of Android, iOS and Mac bundles have the whole set of required assemblies included
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:17
I agree with you that Today , as .net core wasn’t designed to support UI apps yet, you have this limitation
Well, long time I no see it… I would be sure that I had Xamarin packages instared as shared runtime on Android devices
Swear
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:18

had Xamarin packages instared as shared runtime on Android devices

That's for debug configuration

So you don't have to copy tons of binaries each time you hit F5
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:19
ic
anyway
xamarin is a exception
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:19
Unity does the same
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:19
because it is an extra whole new runtime on top of a platform that wasn’t meant to have it
unity the same
you can’t expect unity libs would be installed on target machine hehehe
.Net is something native on windows
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:20
unity adds a very small footprint
BTW, .NET2.0 installer was something like 18MB
And that included the whole runtime with tons of managed libraries
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:21
yeah man, libc.so is 2mb
will you build a whole app with that only?
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:21
And now we have "lightweight .NET core" which is 50MB
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:21
no
for a server side App it is very lightweight
which is what .net core was designed so far for
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:21
yep, for server side story that's perfectly acceptable
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:22
.net full framework is 180mb+
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:22
I just don't quite understand why do I have to ship visual basic compiler with my GUI app)
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:23
becasue you are not suppose to do GUI apps
with .net core yet
and for the same reason in .net full framework you have System.Windows.Forms.dll even on server instalations
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:24
I don't need Visual Basic in my server-side app either, but 4MB isn't that much there
Oh, don't talk poorly about System.Windows.Forms
It's being used in server-side apps quite a lot
You can't even generate a proper xls using NPOI without Windows.Forms
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:25
yeah, bad design
why in earth to generate and XLS I would need WinForms in a server?
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:25
And that's actually a blocker that doesn't allow me to switch from Mono to .NET Core in one of my projects
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:25
use 3rd party libraries man
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:26
I also have to run the app using xvfb-run, so it can have access to X11
Do you know any xls generator library that's capable of auto-sizing columns without using winforms?
OpenXML doesn't have support for auto-sizing
NPOI uses winforms for font measurement
I'd be quite happy to switch to the new tooling in that project
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:27
I used in the past the MSFT sdk for Excel
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:27
Yep, but that requires excel
Which in turn requires windows
And we are running in Docker on Linux
So it's Xvfb and Mono for me (
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:28
idk
need to check
long time id play with it
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:38
I've checked, loading assemblies has nothing to do with memory consumption
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:40
ok, so what then?
Run in VS
take a memory dump and see what is allocating more than in full framework
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:41
It only consumes ~15MB after assemblies are loaded
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:41
It may be GTK+3 or other stuff
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:41
I've tried from VS
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:41
what the dump say?
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:41
with win32+skia backend
Oh, have taken the dump
I'll try now
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:41
:+1:
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:42
But app was consuming more than with full .NET
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:42
yes
the dump will tell you why
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:42
Should I take the dump using taskmgr?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:42
makes no sense be a .Net Core issue
no, VS
there is a button in the diagnostic window
I don’t have VS in my Mac and cant say for sure where it is
should be the same on 2017
this one?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:46
yeah
That doesn't explain 120MB difference
I'm quite surprised that our tree view page consumes 53-94MB RAM though
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:50
it is almost the double of the size in .net core
ouch
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:50
Well, .NET core runs in 64 bit mode
I'll switch desktop one to 64 bit too
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:51
humm true
there is no JIT for 32 and it is only available on ARM
Nikita Tsukanov
@kekekeks
Feb 05 2017 15:56
Started desktop one in 64 bit mode
memory usage skyrocketed to 180MB
Still better than .NET Core though
Yep, that was our treeview
Without it .NET Core build only consumes 38MB
@grokys we need to do something with treeview, it's too gluttonous
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 15:58
I agree
38mb just with structured data is gigant
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:00
not 38
38 is total consumption of everything else
after I've removed treeview page
So it was eating ~180MB or something
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:01
ouch
worse
:P
Steven Kirk
@grokys
Feb 05 2017 16:06
wow. yeah i think i'd like to redo treeview
i've been working with the VS team explorer at work, and they don't use TreeView for their treeviews
they use a listview with indentation
i think that's a better way to do it as you can also virtualize items like that
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:07
Oh, treeview itself actually seems to be fine
It's just demo page
that spawns 1KK nodes
Steven Kirk
@grokys
Feb 05 2017 16:13
that sounds like a bug!
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:14
lol
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:16
AvaloniaUI/Avalonia#882
Bonus: infinite treeview
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:17
lol
That's better
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:19
haha
yeah
way better :D
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:27
@grokys I think I've broken your treeview
It becomes funny in the head when you close a node
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:48
@kekekeks did you tried with Skia?
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:50
Tried what?
We don't have any other backends with .NET Core support
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:50
run Avalonia with Skia backend on .Net Core
ah ok
:)
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:51
That's why we were waiting for Skia# to provide a netstandard build
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:51
@danwalmsley is having problems to make it work
Skia native lib isnt being found
when he uses a RID
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:52
There is no linux build in the package
On win/mac everything should work out of the box
danwalmsley
@danwalmsley
Feb 05 2017 16:53
on rel Win10-x64
I'm trying Win10-x86 now
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:54
why x86?
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:55
Haven't managed to get it working with x86
danwalmsley
@danwalmsley
Feb 05 2017 16:55
image.png
image.png
its the same message with x64
only when I do publish
the dll is there
it is copied
@kekekeks can you try doing a publish -r Win10-x64 on control catalog
and see if it works
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 16:56
oh, wasn’t aware that x86 was available on windows
just confirmed that
Nikita Tsukanov
@kekekeks
Feb 05 2017 16:58
it doesn't copy coreclr host to the output
danwalmsley
@danwalmsley
Feb 05 2017 16:59
hmm?
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:00
Oh
you need to add that runtime to RuntimeIdentifiers
it won't copy CLR host executable otherwise
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:00
I told him :)
danwalmsley
@danwalmsley
Feb 05 2017 17:00
iv done that
and it builds
that's not the problem
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:00
but the problem is Skia dll
danwalmsley
@danwalmsley
Feb 05 2017 17:00
it even manages to run
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:00
it isnt able to find it
danwalmsley
@danwalmsley
Feb 05 2017 17:00
its only when it tries to open libskiasharp.dll
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:01
Well, it worked for me with win7-x86 just now
I'm still on Win8, so I won't be able to have with win10-related issues
danwalmsley
@danwalmsley
Feb 05 2017 17:02
hmmm. let me try again
30MB!
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:03
what you did @kekekeks ?
danwalmsley
@danwalmsley
Feb 05 2017 17:05
@kekekeks are you still patching the exe to get rid of the console window?
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:05
Yep, you need to do that
There is Windows Application option in Visual Studio, but it won't compile with it
@galvesribeiro started in x86 mode
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:06
ok
danwalmsley
@danwalmsley
Feb 05 2017 17:10
@kekekeks can you try and this build for win7 x86 for me
see if you get the same issue?
post url in a sec
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:11
you probably need to run dotnet restore with proper rid
danwalmsley
@danwalmsley
Feb 05 2017 17:12
iv done that too
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:12
dotnet restore -r win7-x86
dotnet publish -r win7-x86 -o out
<RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64;osx.10.10-x64;win7-x86</RuntimeIdentifiers>
-o out?
what does that do?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:13
it just redirect the output to a given folder
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:15
Why ubuntu.16.10 btw?
just target 14.04, it works fine
danwalmsley
@danwalmsley
Feb 05 2017 17:16
ok
good advice
are you able to try my build for me?
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:18
@danwalmsley I've downloaded win7-x86 binaries
from your url
danwalmsley
@danwalmsley
Feb 05 2017 17:19
it works!
@galvesribeiro can you try the win10 build?
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:20
Please, target ubuntu.14.04
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:20
no windows here :(
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:21
and win7-*
you don't need to target win10 and ubuntu.16.10
danwalmsley
@danwalmsley
Feb 05 2017 17:21
ok
will do that now
new build coming up
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:22
@danwalmsley your scrollbar theme is confusing
danwalmsley
@danwalmsley
Feb 05 2017 17:22
I know
I will sort it out
I've assumed that it was the thumb
danwalmsley
@danwalmsley
Feb 05 2017 17:25
I'm going to do a complete ui overhaul once I get alpha2 released
I think it wont look anything like visual studio anymore after
@kekekeks thanks
win 7 build works!
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:31

I think it wont look anything like visual studio anymore after

but why?

also, what happened to C# support
I've thought that you'd got it using omnisharp
danwalmsley
@danwalmsley
Feb 05 2017 17:32
that hasn't been ported to dotnet core yet
I need more time
it hasn't been dropped though
its next on the list
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:34
awesome
BTW Tools->Packages is unable to load libgit or something like that
danwalmsley
@danwalmsley
Feb 05 2017 17:35
I know, that is completely broken
I'm going to completey get rid of libgit2sharp
its junk!
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:36
@galvesribeiro How are we supposed sign applications?
Obviously there is no point of signing dotnet host
since it just load whatever that it finds lying around
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:37
we sign Orleans assemblies
what you dont have is strong-name
codesign still available
the same way it is today
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:38
I'm talking about authenticode
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:41
ok
so it is available
what is the name of gtk3 on brew?
Nvm found it
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:51
you was complaining about the .net size
Look at GTK
Nikita Tsukanov
@kekekeks
Feb 05 2017 17:51
ahahah
I was complaining about GTK size yesterday
No point in complaining about the same thing everyday, one needs some diversity, you know
Igor Gritsenko
@Igor_Gritsenko_twitter
Feb 05 2017 17:52
:-)
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 17:52
so I’ll just ignore your complains since you complain about everything :P
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:01
Screen Shot 2017-02-05 at 16.01.03.png
that is how it run on OSX
and dont allow me to resize
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:02
Probably there is something wrong with BeginResizeDrag
It's implemented though
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:03
ok I got it to resize
it is kinda of magic
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:04
Unfortunately I don't have a proper mac nearby, only vm
need to get to my mac mini to check
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:05
Yeah, if you try to resize a window you will see that it works when it want it
the funny thing is that the drag icon is a linux icon :)
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:15
It's using icons from GTK
We need a proper Quartz backend
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:23
yeah it is very weird on OSX
Unusable tbh
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:24
Sizing is weird with GTK
Because it's async there
calling gtk_window_resize doesn't update its client size right away
And that causes some weird issues with our layout system
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 18:31
@kekekeks have you taken a look at my OSX branch? I know it's behind master by a pretty large amount but most of it is good so far. There's just some rendering issues that I'm not sure how to fix.
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:34
more one reason to leave away GTK :P
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:35
@galvesribeiro that's how X11 works
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:35
that is why I dont use linux :)
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:35
@jkoritzinsky I'm not near my Mac right now (and my VM doesn't support hw-acceleration so everything is rendered in a weird way)
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:36
I love my beauty Windows OS
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:36
@jkoritzinsky have you switched to the new ILockedFramebuffer emulation infrastructure?
Or just using Skia.Views?
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 18:37
Not yet. I currently haven't even looked at Skia support yet. That's next on my list
My main goal was to add macOS app support for Avalonia based apps.
Also still trying to figure out how to do the render tests... That's an annoying problem to say the least.
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:38
Oh, you are using CoreGraphics for rendering...
It's probably better to create a CGBitmap and implement ILockedFramebuffer on top of it
That's how rendering currently works with GTK+Skia
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 18:40
That sounds good to me. I'll do that for a Skia impl
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:41
The problem is that we won't be able to run render tests on windows machine
or on linux one
And I'm not sure that CG has feature parity with Skia/Direct2D
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 18:42
btw @kekekeks this is how you sign stuff
Screen Shot 2017-02-05 at 16.41.57.png
Nikita Tsukanov
@kekekeks
Feb 05 2017 18:42
That's strong naming
I was talking about Authenticode signing
Why have you copied this?
OS X doesn't have built-in support for that
I'll update our iOS backend to use fb emulation next week, so you will have a reference implementation for skia support
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 18:58
I copied the runtime platform because our standard impl can't be referenced by a pure Xamarin.Mac (not Xamarin.Mac +.Net45) assembly
Ill take a look at the closed impl.
I don't fully understand what I need to so in BeginMoveDrag since I can move the window and resize it without any code in there.
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 19:00
@kekekeks that sign with authenticade… just use a certificate that support it
anyway
Nikita Tsukanov
@kekekeks
Feb 05 2017 19:20
This message was deleted
@jkoritzinsky I'm pretty sure that you can reference Shared projects from almost any msbuild project type
BeginMoveDrag is needed for windows with custom frame
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 19:22
I referenced the shared part. This is the non shared part of the runtime platform
Nikita Tsukanov
@kekekeks
Feb 05 2017 19:22
That's used by applications like AvalonStudio
Jeremy Koritzinsky
@jkoritzinsky
Feb 05 2017 19:23
Oh ok. I'll take a look at the GTK impl when I have a chance and try to port it over.
Nikita Tsukanov
@kekekeks
Feb 05 2017 19:23
They are emulating that by hooking window events, I think
*mouse events
danwalmsley
@danwalmsley
Feb 05 2017 19:58
@kekekeks for linix did you have to set ld_library_path so it could find libskiasharp?
Nikita Tsukanov
@kekekeks
Feb 05 2017 20:00
I was running with LD_LIBRARY_PATH set
But it should probably work without it in published version
Oh, wait
It wouldn't
Because even if .NET Core will find libSkiaSharp.so
shared library loader won't load libskia.so
Because it is not in library search path
You need to patch libSkiaSharp.so and add rpath hint to dependency
You need this utility to patch libskiasharp
Nikita Tsukanov
@kekekeks
Feb 05 2017 20:13
@danwalmsley patched one
Just place it to publish output alongside with libskia.so
You still need to set LD_LIBRARY_PATH for dotnet run
danwalmsley
@danwalmsley
Feb 05 2017 20:15
So just get appveyor to copy it across?
Nikita Tsukanov
@kekekeks
Feb 05 2017 20:17
yep
danwalmsley
@danwalmsley
Feb 05 2017 20:17
@pfckrutonium
Nikita Tsukanov
@kekekeks
Feb 05 2017 20:18
One still needs to chmod +x zip file contents after extracting
Krutonium
@Krutonium
Feb 05 2017 20:18
And hello :P
danwalmsley
@danwalmsley
Feb 05 2017 20:19
@PFCKrutonium maybe we missed chmod?
Krutonium
@Krutonium
Feb 05 2017 20:20
That patched file worked
The maximize button on the Window doesn't work, manual resizing does
danwalmsley
@danwalmsley
Feb 05 2017 20:21
We know its not implemented yet
Krutonium
@Krutonium
Feb 05 2017 20:21
Fair
danwalmsley
@danwalmsley
Feb 05 2017 20:21
Can you post that file to dropbox?
Krutonium
@Krutonium
Feb 05 2017 20:21
I can not?
danwalmsley
@danwalmsley
Feb 05 2017 20:23
Just to update appveyor
danwalmsley
@danwalmsley
Feb 05 2017 20:32
@galvesribeiro do the builds now have runtomes included?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 20:34
donno
what is the url?
danwalmsley
@danwalmsley
Feb 05 2017 20:35
1sec
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 20:37
let me try
nop
still the dll only
danwalmsley
@danwalmsley
Feb 05 2017 20:43
Thats with your extra command line switch
I think it must only publish the executable on windows
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 20:43
then idk what is happening… it is supposed to work
No...
lets try something
danwalmsley
@danwalmsley
Feb 05 2017 20:43
It has worked before then?
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 20:43
yes
I use it for my apps
all my services are deployed that way
that maybe is because you are build from windows...
windows maybe isn’t able to generate the linux/osx binary
what I need to do to build the code?
Krutonium
@Krutonium
Feb 05 2017 20:51
.net core and icu52
At least, that's as far as I have puzzled it out - it's whats needed on good old Arch
Gutemberg Ribeiro
@galvesribeiro
Feb 05 2017 20:59
@PFCKrutonium put an issue on coreclr GH man :) I’m pretty sure there are a bunch of Arch users that you would help with that :)
but make sure at least all unit tests pass there :D