These are chat archives for AvaloniaUI/Avalonia

8th
Aug 2017
Geoffrey Huntley
@ghuntley
Aug 08 2017 08:58
howdy peeps
Steven Kirk
@grokys
Aug 08 2017 10:00
hey @ghuntley !
Geoffrey Huntley
@ghuntley
Aug 08 2017 10:03
howdy Steven
<3 for the PRs recently
Steven Kirk
@grokys
Aug 08 2017 10:04
no problem, thank @jkoritzinsky ;)
Zou Wei
@zwcloud
Aug 08 2017 11:25
Does Avalonia have some blogs or articles about how it is implemented in all kinds of area? For example, text rendering, layout engine and theme/skin/style system. @grokys
Steven Kirk
@grokys
Aug 08 2017 11:26
@zwcloud there's https://grokys.github.io/ but i don't post to it enough!
please feel free to add issues for subjects you'd like to see here! https://github.com/grokys/grokys.github.com
i find it hard to think of things to write about and someone suggesting stuff would give me some motivation
Zou Wei
@zwcloud
Aug 08 2017 11:30
I see. Thanks! I think it's improtant to record something when implementing something complex like GUI frameworks. It's a great material for other contributors and also a reminder how all kinds of hard problems are solved.
Steven Kirk
@grokys
Aug 08 2017 11:31
yeah definitely
i really should do it more
please, add issues :)
danwalmsley
@danwalmsley
Aug 08 2017 12:17
@grokys you around?
I think the stack overflow on slider might be a bug in directproperty
Steven Kirk
@grokys
Aug 08 2017 12:17
oh yeh?
danwalmsley
@danwalmsley
Aug 08 2017 12:18
Value property calls SetAndRaise
and then this causes
RangeBase.ValueProperty.AddOwner<Track>(o => o.Value, (o, v) => o.Value = v);
the setter here to get called from Track.cs
and then that causes an endless loop of raising property changed
and endlessly setting the value
Steven Kirk
@grokys
Aug 08 2017 12:19
ok. what do you have to do to trigger it though, i've never managed to
danwalmsley
@danwalmsley
Aug 08 2017 12:19
<Slider Minimum="0" Maximum="100" Value="{Binding Power, Mode=TwoWay}" Orientation="Horizontal" />
TwoWay binding is important
if its not two way you don't get stack overflow
Steven Kirk
@grokys
Aug 08 2017 12:20
i'm sure i've tried that in controlcatalog
danwalmsley
@danwalmsley
Aug 08 2017 12:20
let me see if I can get it to happen in control catalog
danwalmsley
@danwalmsley
Aug 08 2017 12:30
man every time I try to use slider I get the bug
my brother tried it a few months ago he go the bug
I put the same code in control catalog
no bug?
WTF
danwalmsley
@danwalmsley
Aug 08 2017 12:49
can you think of anything I can try to work out what the difference is?
I can see in my version its endlessly updating its own value
control catalog that doesn't happen
both seem to be the same
ok I'm going to zip up a minimal repro
danwalmsley
@danwalmsley
Aug 08 2017 12:58
@grokys iv placed link to repro on #824 also
I can put almost exactly the same code in control catalog and it doesn't happen
but this solution compiles and throws the exception
Steven Kirk
@grokys
Aug 08 2017 13:04
controlcatalog seems to be the perfect app - bugs just don't appear there!
danwalmsley
@danwalmsley
Aug 08 2017 13:38
I'm really interested to find out why this particular on wont show up there
danwalmsley
@danwalmsley
Aug 08 2017 13:58
@grokys this might be a scenegraph bug...
image.png
If you are there in the next minute or so I can give you info from debugger
otherwise I will have to restart
     System.Collections.dll!System.Collections.Generic.SortedSet<System.Collections.Generic.KeyValuePair<int, System.__Canon>>.Enumerator.MoveNext()    Unknown    No symbols loaded.
>    Avalonia.Visuals.dll!Avalonia.Rendering.DirtyVisuals.GetEnumerator()    Unknown    No symbols loaded.
     Avalonia.Visuals.dll!Avalonia.Rendering.DeferredRenderer.UpdateScene()    Unknown    No symbols loaded.
     Avalonia.Base.dll!Avalonia.Threading.JobRunner.RunJobs()    Unknown    No symbols loaded.
     Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.WndProc(System.IntPtr hWnd, uint msg, System.IntPtr wParam, System.IntPtr lParam)    Unknown    No symbols loaded.
     [Native to Managed Transition]        Annotated Frame
     [Managed to Native Transition]        Annotated Frame
     Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.RunLoop(System.Threading.CancellationToken cancellationToken)    Unknown    No symbols loaded.
     Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken)    Unknown    No symbols loaded.
     AvalonStudio.dll!AvalonStudio.App.Main(string[] args) Line 54    C#    Symbols loaded.
callstack
image.png
parallel stacks
Steven Kirk
@grokys
Aug 08 2017 14:14
could you add an issue if you have time?
Wiesław Šoltés
@wieslawsoltes
Aug 08 2017 14:32
@grokys AvaloniaUI/Avalonia#1088 sample app
Steven Kirk
@grokys
Aug 08 2017 14:33
i saw the comments, thanks!
i was using the nightly nuget feed
and i didn't upgrade rx or anything
Jeremy Koritzinsky
@jkoritzinsky
Aug 08 2017 16:13
@grokys You can replicate what I believe is the same bug by clicking on either of the checkboxes on the first page of BindingTest
Steven Kirk
@grokys
Aug 08 2017 16:13
oh really?
Jeremy Koritzinsky
@jkoritzinsky
Aug 08 2017 16:15
Yep. Clicking on one of the checkboxes causes a Stackoverflow from them trying to set each other.
Basically a reentrancy issue as far as I can tell
Steven Kirk
@grokys
Aug 08 2017 17:16
oh ok, i didn't know that. or maybe i did but just forgot. quite possible.
Matthijs ter Woord
@mterwoord
Aug 08 2017 17:17
unrelated q: is there a gitter chat for github desktop? :)
Steven Kirk
@grokys
Aug 08 2017 17:27
don't think so
Steven Kirk
@grokys
Aug 08 2017 20:28
ah it seems that @donandren submitted a PR with unit tests for the stack overflow in jan!
man my memory is shot
seriously, fuck VS2017
Steven Kirk
@grokys
Aug 08 2017 20:34
it just can't handle switching branches
nice. it's crashed so hard that even task manager won't shut it down
Steven Kirk
@grokys
Aug 08 2017 23:45
@wieslawsoltes this file https://github.com/AvaloniaUI/Avalonia/blob/d3c3ea948f3c0e40e8ee00196692d6931beeeaac/build/UnitTests.NetCore.targets#L9 has NetCore in its name but it seems to be included in net461 test projects too, is that right?