These are chat archives for AvaloniaUI/Avalonia

20th
May 2016
danwalmsley
@danwalmsley
May 20 2016 08:43
@grokys iv added comments to issue #522 you might be able to just close it based on comments if you think it shows correct behaviour.
I also think #516 can close if you agree?
Steven Kirk
@grokys
May 20 2016 08:43
yeah, if it's fixed!
danwalmsley
@danwalmsley
May 20 2016 08:43
and iv opened #539
close 2 open 1
Steven Kirk
@grokys
May 20 2016 08:44
i still need to take a look at #522
danwalmsley
@danwalmsley
May 20 2016 08:44
yeh ok
I assume its not meant to send out so many data context changed events?
Steven Kirk
@grokys
May 20 2016 08:44
doesn't sound right, no
did you manage to fix the popup error that was caused by trying to reparent a control?
danwalmsley
@danwalmsley
May 20 2016 08:45
yeh, for some reason my code was setting it to null
and triggering that exception
but your exception immediately showed me the line causing it
without that would have been difficult to find
works perfectly now :)
Steven Kirk
@grokys
May 20 2016 08:46
yeah, it was hard to find!
danwalmsley
@danwalmsley
May 20 2016 08:46
I appreciate your efforts :)
Steven Kirk
@grokys
May 20 2016 08:46
no problem :)
danwalmsley
@danwalmsley
May 20 2016 08:46
I'm still trying to trace a memory leak in perspex
Steven Kirk
@grokys
May 20 2016 08:46
i get there eventually
danwalmsley
@danwalmsley
May 20 2016 08:46
I mean avalonia
Steven Kirk
@grokys
May 20 2016 08:46
haha
danwalmsley
@danwalmsley
May 20 2016 08:46
I think there is still 1 major one left
probably somewhere in direct2d backend
trouble is its difficult to locate because it seems that the manage parts are disposed but not the native bit
so dotmemory doesn't show it up
Steven Kirk
@grokys
May 20 2016 08:47
hmm if that's the case then it'll probably be a sharpdx problem
danwalmsley
@danwalmsley
May 20 2016 08:47
I can just see lots of stuff freed, but memory still going up
ok
or maybe we missed a call to dispose somewhere?
either that or its content presenter / content control bug, which I assume is used inside a lot of controls?
danwalmsley
@danwalmsley
May 20 2016 09:17
@grokys looking at the content presenter / memory leak
I can see there is a Dictionary<IStyleable, List<IDisposable>> (Style_applied)
it just keeps growing and growing the whole time
I wonder if styles get applied, but not un-applied at an appropriate time?
Steven Kirk
@grokys
May 20 2016 09:23
ah.. perhaps!
though i think they should be unapplied and items removed from that
danwalmsley
@danwalmsley
May 20 2016 09:24
basically if I run Avalon studio
open code file
then scroll up and down a bit
then take an image
then scroll up and down a bit more
take another snapshot
the style applied array is growing
but id have though styles shouldn't be getting applied anymore at that point
Steven Kirk
@grokys
May 20 2016 09:27
do you think you could create a leak test with the information you have?
danwalmsley
@danwalmsley
May 20 2016 09:30
maybe, I'm getting my self confused though
If I use dotmemory it suggests StyleApplied is growing
if I use visual studio
I don't see that
I think it has to be mainly related to content presenter bug
I will try and gather more info see If I can devise a test
Steven Kirk
@grokys
May 20 2016 13:44
@jkoritzinsky i'd like your thoughts on #540 if you get a few minutes
Nikita Tsukanov
@kekekeks
May 20 2016 14:06
Meanwhile libui
Jeremy Koritzinsky
@jkoritzinsky
May 20 2016 14:13
@grokys I think #540 looks good. We still need to make sure that we warn people about the StackOverflowException that is behind the one wrong turn.
Steven Kirk
@grokys
May 20 2016 14:14
yeah... i'm a little bit disappointed that I couldn't solve that better but my hope is that by providing ContentTemplate etc that people will use them for those sort of cases instead of DataTemplates and so avoid the stack overflow
when you say "warn people" what do you mean? in documentation or work out a way to do it in code?
Jeremy Koritzinsky
@jkoritzinsky
May 20 2016 14:18
There's not a good way to warn in code, so we would have to warn in documentation.
Steven Kirk
@grokys
May 20 2016 14:19
yeah, i agree
ok, i will merge that PR and see what breaks ;)
ok, @danwalmsley and @wieslawsoltes we now have ContentControl.ContentTemplate and ItemsControl.ItemTemplate
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:43
@grokys hi. I have looked in Xamarin grid implementation more precisely and I can say that its awful. Just awful
Steven Kirk
@grokys
May 20 2016 14:44
really? how come?
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:46
Its completely not optimized and there are a lot of overhead if we will compare with MS Grid implementation
and also a lot of strange code as for me
Steven Kirk
@grokys
May 20 2016 14:48
does it have all the features of WPF's Grid?
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:50
for example, Xamarin Grid measure all its children at lest 10 times
Steven Kirk
@grokys
May 20 2016 14:50
ouch!!!
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:50
so, it approximately 10 times slower
MS Grid implememtation supose that each child measured only once
Steven Kirk
@grokys
May 20 2016 14:51
so that's not really an option for us either :(
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:51
so, I dont think its worth implementing Xamarin version at all
Steven Kirk
@grokys
May 20 2016 14:53
no, it doesn't sound like it
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:54
so, maybe I will modify my current implementation not to be look like MS implementation and deal with it?)
Steven Kirk
@grokys
May 20 2016 14:55
i don't think you can :(
from what i understand of the law, once you've looked at the source code you're not allowed to work on a reimplementation
Reverse Engineering: Do not use the ildasm, reflector or other equivalent tools program to disassemble proprietary code when you are planning to reimplement a class for Mono. If you have done this, we will not be able to use your code.
f you have looked at Microsoft's proprietary implementation of .NET or their shared source code (which is also proprietary), you will not be able to contribute to Mono.
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 14:59
its not a law, its just condition
for Mono
Steven Kirk
@grokys
May 20 2016 15:00
no, it's law from what i understand
do you have information that says its not?
everyone i have spoken to has told me the same
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:01
so, you are saying that this is official USA law?
Steven Kirk
@grokys
May 20 2016 15:02
yes
i am not a lawyer but that's what i understand
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:04
ok, just one thing: If I rework the complete class, how you could proof that I use reverse engineering for this and not did it by myself?
from scratch
Steven Kirk
@grokys
May 20 2016 15:05
well for one thing there's a record of your PR with code copied from the reference source in github
a lawyer could easy find that
once you submitted that as far as i know, it was over
i did warn you not to do that when you started work on it, but maybe you didn't understand me :(
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:06
so, we just need another man, who will submit new Grid)
Steven Kirk
@grokys
May 20 2016 15:07
yeah, i think so :(
it's a shame because you did some good work there!
but everyone i've asked has said "don't touch that code" ;)
i can't afford lawyers!
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:08
yeah, I understand.
Steven Kirk
@grokys
May 20 2016 15:09
if you want go get advice yourself i'd be interested to hear it!
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:09
starnge that MS is not responding at all
Steven Kirk
@grokys
May 20 2016 15:09
yeah
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:09
they dont even say NO
Steven Kirk
@grokys
May 20 2016 15:09
maybe they can't say anything because they're not a lawyer
when you deal with law stuff everything gets slow complicated and expensive ;)
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:10
and its definately strange because on their early years MS has stolen a lot from other companies))))
Steven Kirk
@grokys
May 20 2016 15:10
ha but they had the money! :)
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:10
now yes)
Steven Kirk
@grokys
May 20 2016 15:11
please though, feel free to do research about it yourself
maybe there's somewhere you can ask?
maybe ask a question on http://programmers.stackexchange.com/ ?
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:13
does this link is valid?
Steven Kirk
@grokys
May 20 2016 15:17
oh it looks like the site might be down - weird
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:18
yeah
stackoverflow seems to be down too
Steven Kirk
@grokys
May 20 2016 15:18
wow!
Denis Zaporozhets
@QuantumDeveloper
May 20 2016 15:22
hm)
Steven Kirk
@grokys
May 20 2016 15:39
seems to be working again now
Darnell Williams
@Seeker1437
May 20 2016 23:14
ill get the 500 when they do maint