These are chat archives for AvaloniaUI/Avalonia

12th
Feb 2018
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 00:08
Just to confirm I'm not doing crap here... The framebuffer backend still use Skia/Skiasharp, right?
Matthijs ter Woord
@mterwoord
Feb 12 2018 07:27
@jakesays I got things workikng like a charm on raspberry pi 3 (with .net core)
building up new views is slow, but not sure what the exact issue is there..
danwalmsley
@danwalmsley
Feb 12 2018 13:34
@grokys are you planning to do the release this week?
Steven Kirk
@grokys
Feb 12 2018 14:17
hopefully if i get the time, yeah
danwalmsley
@danwalmsley
Feb 12 2018 15:21
are you expecting anything else to go into master before hand? I'll try my best to submit a PR for AvaloniaUI/Avalonia#1074 tonight / tomorrow
Steven Kirk
@grokys
Feb 12 2018 15:25
i wasn't planning to, but if it's something that was plain broken beforehand then yes, it can go in
however be aware that i'm not really qualified to review GTK PRs's, especially just before a release
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 16:16
Did you guys ever considered have an alternative to Skia using https://github.com/SixLabors/ImageSharp ?
Nikita Tsukanov
@kekekeks
Feb 12 2018 16:18
It lacks required functionality
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 16:18
I see
man... I'm struggling since yesterday to get the SkiaSharp built
they changed the whole way to build it
:(
and their build scripts (Cake) doesn't respect the options we pass like CC/CXX... a nightmare...
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 18:02
@kekekeks do you know if avalonia requires SkiaSharp to have been built with fontconfig?
Nikita Tsukanov
@kekekeks
Feb 12 2018 18:03
No idea
It won't find any fonts otherwise, I guess
If you'll manage to use it without fontconfig, please, let me know
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 18:06
For whatever reason Skia part of the SkiaSharp build was complaining about fontconfig missing
but I see they download the code on 3rd party directory so it should be built as part of the whole process, like the ther dependencies
so I added skia_use_fontconfig=false and it passed that part
that is why I asked
Nikita Tsukanov
@kekekeks
Feb 12 2018 18:09
I think it's enabled by default since it's the common method for accessing fonts in Linux
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 18:12
yeah
ninja: Entering directory `out/linux/arm'
[205/684] compile ../../../src/core/SkCpu.cpp
FAILED: obj/src/core/libskia.SkCpu.o
arm-arm1176jzs-linux-gnueabi-c++ -MMD -MF obj/src/core/libskia.SkCpu.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_SUPPORT_GPU=0 -DSK_GAMMA_APPLY_TO_A8 -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSKIA_IMPLEMENTATION=1 -DSK_HAS_JPEG_LIBRARY -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_XML -I../../../include/android -I../../../include/c -I../../../include/codec -I../../../include/config -I../../../include/core -I../../../include/effects -I../../../include/encode -I../../../include/gpu -I../../../include/gpu/gl -I../../../include/pathops -I../../../include/ports -I../../../include/svg -I../../../include/utils -I../../../include/utils/mac -I../../../third_party/vulkan -I../../../include/private -I../../../src/c -I../../../src/codec -I../../../src/core -I../../../src/effects -I../../../src/effects/gradients -I../../../src/fonts -I../../../src/image -I../../../src/images -I../../../src/lazy -I../../../src/opts -I../../../src/pathops -I../../../src/pdf -I../../../src/ports -I../../../src/sfnt -I../../../src/sksl -I../../../src/utils -I../../../src/utils/win -I../../../src/xml -I../../../third_party/gif -fstrict-aliasing -fPIC -fvisibility=hidden -Werror -march=armv7-a -mfpu=neon -mthumb -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -Os -fdata-sections -ffunction-sections -DSKIA_C_DLL -funwind-tables -mfpu=vfp -mfpu=neon -mfloat-abi=softfp -std=c++11 -fno-threadsafe-statics -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Wnon-virtual-dtor -c ../../../src/core/SkCpu.cpp -o obj/src/core/libskia.SkCpu.o
../../../src/core/SkCpu.cpp: In function 'uint32_t read_cpu_features()':
../../../src/core/SkCpu.cpp:96:22: error: 'HWCAP_VFPv4' was not declared in this scope
         if (hwcaps & HWCAP_VFPv4) { features |= SkCpu::NEON|SkCpu::NEON_FMA|SkCpu::VFP_FP16; }
                      ^
[214/684] compile ../../../src/core/SkColorSpaceXform.cpp
ninja: build stopped: subcommand failed.
An error occurred when executing task 'externals-linux'.
Error: One or more errors occurred.
        Process '/mnt/c/dev/repos/skiaprojects/SkiaSharp/externals/depot_tools/ninja' failed with error: 1
:(
it is ignoring the compiler parameter to use soft float
     "  extra_cflags=[ \"-DSKIA_C_DLL\", \"-funwind-tables\", \"-mfpu=vfp\", \"-mfpu=neon\", \"-mfloat-abi=softfp\" ]" +
                "  extra_asmflags=[ \"-march=armv6j\", \"-msoft-float\", \"-mfpu=vfp\", \"-mfpu=neon\", \"-mfloat-abi=softfp\"  ]" +
Mkay, I've managed to run our current previewer with .NET Core
Nikita Tsukanov
@kekekeks
Feb 12 2018 18:50
I'll try to integrate it into our VS extension this week
Gutemberg Ribeiro
@galvesribeiro
Feb 12 2018 19:13
nice!
:D
danwalmsley
@danwalmsley
Feb 12 2018 19:34
@grokys it's not massively broken, but you do need an if(win 32) else if (Unix) in user code to make it work correctly
#1363 needs to be merged though
Steven Kirk
@grokys
Feb 12 2018 21:10
@kekekeks merged!
Nikita Tsukanov
@kekekeks
Feb 12 2018 21:10
tnx
It would be nice to test the updated extension
Steven Kirk
@grokys
Feb 12 2018 21:35
will do that now!
Nikita Tsukanov
@kekekeks
Feb 12 2018 21:37
Now it should be also possible to select the target framework in case of multitargeting
Not sure why that might be needed, but still
sdoroff
@sdoroff
Feb 12 2018 21:39
I'm not sure if this is a known issue, but the DeferredRenderer.Render method is throwing an unhandled exception when the window is resized.
Steven Kirk
@grokys
Feb 12 2018 21:40
@sdoroff no, i wasn't aware of that - what's the exception/stacktrace?
sdoroff
@sdoroff
Feb 12 2018 21:41
It's a NullReferenceException on the Ref.Item property within the DrawOperations loop
Steven Kirk
@grokys
Feb 12 2018 21:42
hmm must have been introduced by AvaloniaUI/Avalonia#1277
sdoroff
@sdoroff
Feb 12 2018 21:43
I'm guessing a draw operation is getting disposed somewhere. A simple null check seems to fix it, but I don't fully understand the rendering code and don't want to accidentally break things further.
Steven Kirk
@grokys
Feb 12 2018 21:43
sure - what application is this happening with?
sdoroff
@sdoroff
Feb 12 2018 21:45
I've tried it on both the ControlCatalog and BindingTest
Steven Kirk
@grokys
Feb 12 2018 21:46
hmm strange i didn't see that
i must have not had break on exceptions enabled?
This message was deleted
@kekekeks getting an error:
image.png
@sdoroff yeah, strange - i'm definitely not getting a null ref exception just running control catalog and browsing around. what do you do to trigger it?
Nikita Tsukanov
@kekekeks
Feb 12 2018 21:50
@grokys Please, scroll it down
Also make sure to rebuild the solution
sdoroff
@sdoroff
Feb 12 2018 21:51
Resizing the window horizontally is reliably triggering it for me.
Steven Kirk
@grokys
Feb 12 2018 21:53
@kekekeks still getting the error after a "rebuild all". full text: https://gist.github.com/grokys/61975203f772ba8d31895089f3ea401a
Nikita Tsukanov
@kekekeks
Feb 12 2018 21:54
Try running the same command from console
Steven Kirk
@grokys
Feb 12 2018 21:57
god VS2017 is still so HANGY
@kekekeks sorry, problem was me being stupid. master wasn't up-to-date. working now
also @sdoroff i can now reproduce the exception
Nikita Tsukanov
@kekekeks
Feb 12 2018 22:00
Ah, it was probably ignoring the new --method argument and trying to use Avalonia.Remote
Steven Kirk
@grokys
Feb 12 2018 22:05
hmm just tried clicking on a button - VS hung for about 30 seconds, then got a "designer crashed" message. unable to reproduce however
the "vs hung for about 30 seconds" might just be VS2017 though
it hangs for 30 seconds pretty much randomly
oh no, just happened again
ok, i think i've got a repro
yep, seems to happen when the designer loses focus
open ButtonPage.xaml and wait until page is displayed
hover over a few buttons
change focus to another app, change focus back to VS and hover/click on the designer a bit
VS hangs, then "designer process crashed"
Steven Kirk
@grokys
Feb 12 2018 22:21
ok @sdoroff i've found the commit that caused the crash. 4cace359b5c60d0ff719aa0dd72110238f4b491a. it's a merge commit :(
Jeremy Koritzinsky
@jkoritzinsky
Feb 12 2018 22:28
@grokys @sdoroff I think it might be a race condition.
that causes all the draw operations in the scene to get disposed...
just trying to understand why that didn't cause this problem before that merge commit
Jeremy Koritzinsky
@jkoritzinsky
Feb 12 2018 22:31
I'm pretty sure its a race condition. I added some code to try to capture stack traces of allocation/dispose and the slowdown it caused made the bug not surface.
Steven Kirk
@grokys
Feb 12 2018 22:32
ah ok. if you're looking into that @jkoritzinsky i'm going to try to work out what's caused the breakage of the initial window size
and then investigate #1354 - i suspect they're related in some way
Steven Kirk
@grokys
Feb 12 2018 22:54
@kekekeks also the editor loses focus between every keystroke. makes it a bit difficult to type ;)
Jeremy Koritzinsky
@jkoritzinsky
Feb 12 2018 22:56
@grokys I figured out what's causing the crash. We weren't ref-counting the scene itself, so on one thread we disposed the scene object we were currently rendering in another thread. I'll open a PR within the next few minutes with a fix.
Steven Kirk
@grokys
Feb 12 2018 22:58
cool, thanks jeremy!