These are chat archives for AvaloniaUI/Avalonia

11th
Nov 2015
Nikita Tsukanov
@kekekeks
Nov 11 2015 00:00 UTC
You can play around with it on ui-scaling (input handing isn't done yet)
Nikita Tsukanov
@kekekeks
Nov 11 2015 09:09 UTC
@donandren xplat scaling support is merged to master
Use PerspexLocator.GetService<PlatformSettings>() to configure
Andrey Kunchev
@donandren
Nov 11 2015 11:57 UTC
nice
Nikita Tsukanov
@kekekeks
Nov 11 2015 11:59 UTC
@grokys Current scaling support is suitable for mobile devices since screen resolution is always a power of 2
But for desktops we'll somehow need to fix ArrangeCore
May be by providing it with actual pixel grid info or something
Steven Kirk
@grokys
Nov 11 2015 12:15 UTC
right, i thought that layout rounding was too easy
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:18 UTC
Mkay, next step is to port libperspesk to ios
And then merge tinywm to master
Steven Kirk
@grokys
Nov 11 2015 12:24 UTC
is UseLayoutRounding placing window at 0,-1 only when scaling is in place or all the time?
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:24 UTC
When scaling is in place and window size is an odd number
Steven Kirk
@grokys
Nov 11 2015 12:26 UTC
ok, yeah it was implemented as simply as possible and so scaling wasn't considered
but is layout rounding needed when scaling is used?
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:31 UTC
For what cases do we need it?
The only one I can see is toplevel itself
Since it should fill the window
We can implement PlatformManager::VirtualToPhysical
So visual can get access to actual pixel grid
is what it's based on
i.e. it's a feature from WPF. from what i understand it's more important on low DPI displays where you can actually see the pixels
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:39 UTC
Well, it will still be needed for embedding native controls like webview
Darnell Williams
@Seeker1437
Nov 11 2015 12:46 UTC
Hi gusy I hat e doing this but I need a little help with something....
Steven Kirk
@grokys
Nov 11 2015 12:46 UTC
i'd be interested to know how WPF/UWP handles the interaction between layout rounding and scaling
Darnell Williams
@Seeker1437
Nov 11 2015 12:46 UTC
How on earth do I get wpf to save user settings next the the executable instead on some other wierd place?>
All the stuff I find for customer settings providers all have to do with WinForms and this make some stuff inaccurate.
Steven Kirk
@grokys
Nov 11 2015 12:47 UTC
write your own settings files?
tbh afaik WPF saves settings in the correct place, however
Darnell Williams
@Seeker1437
Nov 11 2015 12:48 UTC
well mainly just tell them generated ones to be uin the same folder as the execuatable
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:48 UTC
@ImaBrokeDude
File.WriteAllText("settings.json", JObject.FromObject(mySettings).ToString());
Steven Kirk
@grokys
Nov 11 2015 12:48 UTC
yeah, exactly
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:48 UTC
JObject.Parse(File.ReadAllText("settings.json")).ToObject<MySettings>()
This is everything you need to save/load your settings
Darnell Williams
@Seeker1437
Nov 11 2015 12:49 UTC
I am not currently using JSON...
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:49 UTC
So what
Steven Kirk
@grokys
Nov 11 2015 12:49 UTC
use XML then
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:49 UTC
It's better than built-in settings system
Steven Kirk
@grokys
Nov 11 2015 12:49 UTC
or plain text files...
Darnell Williams
@Seeker1437
Nov 11 2015 12:49 UTC
Ill use JSON then XD
Nikita Tsukanov
@kekekeks
Nov 11 2015 12:50 UTC
BTW, storing settings near exe file is a bad practice
Darnell Williams
@Seeker1437
Nov 11 2015 12:50 UTC
it has to be portable
THe systems I use clear that kind of stuff on restart
so settings are lost the next day
should I just throw it in a different folder?
Steven Kirk
@grokys
Nov 11 2015 12:51 UTC
well where you store them is a different question to how
Darnell Williams
@Seeker1437
Nov 11 2015 12:51 UTC
yep XD the question transformed XD
Steven Kirk
@grokys
Nov 11 2015 12:52 UTC
without knowing what's cleared on restart that question is impossible to answer ;)
Darnell Williams
@Seeker1437
Nov 11 2015 12:52 UTC
ProgramData and AppData locations are cleared on restart
Files have to be stored on the roaming network profile in order to persist
(not cleared I guess, change are "forgotten")
Darnell Williams
@Seeker1437
Nov 11 2015 13:13 UTC
hmmm
I bet so actually
but how the did you find that?
XD
I have been looking for 3 whole days D:
Nikita Tsukanov
@kekekeks
Nov 11 2015 13:15 UTC
His google-fu is stronger than yours
Steven Kirk
@grokys
Nov 11 2015 13:16 UTC
i did a search for ".net app settings roaming profile" and it was the 4th answer!
Darnell Williams
@Seeker1437
Nov 11 2015 13:16 UTC
wow XD
Darnell Williams
@Seeker1437
Nov 11 2015 13:47 UTC
Oh almost forgot to say this:
THank you @kekekeks and @grokys my heart is not going to explode anymore :D
Steven Kirk
@grokys
Nov 11 2015 14:10 UTC
;) yw
Nikita Tsukanov
@kekekeks
Nov 11 2015 17:18 UTC
@grokys What is SharpDX.DirectWrite.TextRendererShadow?
It's a rooted handle and it's leaking a lot
Nikita Tsukanov
@kekekeks
Nov 11 2015 17:23 UTC
It seems that rendering backends are all leaky
Perspex itself consumes a constant amount of memory
I'm going to run valgrind to find what where Skia backend is leaking unmanaged memory, but don't know how to fix Direct2D one
Steven Kirk
@grokys
Nov 11 2015 17:25 UTC
yeah, i saw that it was those shadow objects that were leaking when @wieslawsoltes posted the results of his memory profiling
i have no idea whatsoever what they are
but i've not investigated
Nikita Tsukanov
@kekekeks
Nov 11 2015 17:51 UTC
Ehm... It seems it's SetTransform that's leaking in skia backend. But I'd be damned if I know why
There is nothing to leak there
wtf
This message was deleted
This message was deleted
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:01 UTC
blob
Well, it seems that skia backend isn't leaking
Memory usage grows a little and then drops
Probably some caches
That's actually, good news
Perspex can be used in production
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:09 UTC
Yeah, doesn't leak
I'm examining native heap right now
It meems that most of it is occupated by font caches and drawing surfaces
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:20 UTC
Memory.PNG
This is Perspex Win32 + Skia
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:21 UTC
So it doesn't leak, does it?
I see a plain line
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:21 UTC
It looks like objects are generated from perspex core
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:22 UTC
That's fine, they will be collected eventually
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:22 UTC
This is easily reproducable
This took just few seconds to generate
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:22 UTC
Wait, is it leak in perspex.core?
I haven't experienced one with TestApplication
generates this memory usage
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:23 UTC
I'll checkout your project and run dotMemory
What steps should I take to reproduce the leak?
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:23 UTC
by changing object Editor.Project.CurrentContainer.CurrentShape the new data template is applied
Just draw few shapes Rectangle and Ellipse and hover over them 10-20 times
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:24 UTC
https://github.com/Microsoft/Win2D - we should probably use it for WinPhone support
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:24 UTC
the Shape tab should show shape properties
Win2D is great library
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:27 UTC
2886 commits
omg
All by yourself
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:28 UTC
I do make small commits
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:31 UTC
Hovering shapes doesn't seem to have any effect on memory usage
Am I missing something?
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:32 UTC
Thats strange, I get memory usage spike right away
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:33 UTC
Well, shapes also don't play any hover animation
Oh, I need to select them by clicking
got it
Tamás Deme
@tomzorz
Nov 11 2015 18:36 UTC
hey, anyone around?
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:37 UTC
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:38 UTC
I've compiled it with conditional symbol
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:40 UTC
That works too
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:41 UTC
It seems that a huge part of the visual tree is still there
Even after deselecting a shape
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:41 UTC
This message was deleted
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:42 UTC
Shapshot, selected shape, deselected shape, snapshot&compare
got this
blob
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:45 UTC
You can check my WPF version, almost same Xaml
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:45 UTC
It's obviously perspex's issue, I'm examining paths right now
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:46 UTC
I think in WPF the visual tree from data template is cached somehow
Is I select same type of shape is retains for example state of Expander control
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:49 UTC
What exactly is XRectangle?
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:49 UTC
a rectangle shape
with text
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:50 UTC
It seems that PropertyAccessorNode doesn't use weak subscription
So everything you are binding to XRectangle stays in the memory forever
@grokys
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:51 UTC
In my app I bind everything to Xaml
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:51 UTC
Yep, as I told that's perspex's issue
Or, probably RxUI's
Wiesław Šoltés
@wieslawsoltes
Nov 11 2015 18:52 UTC
ok
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:52 UTC
Since I see InpcPropertyAccessorPlugin in the path to the root
blob
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:57 UTC
@grokys InpcPropertyAccessorPlugin doesn't use weak subscriptions
Steven Kirk
@grokys
Nov 11 2015 18:58 UTC
yeah, that's a known issue
we spoke about weak subscriptions a few weeks back
Nikita Tsukanov
@kekekeks
Nov 11 2015 18:58 UTC
I'm not sure how to implement them using the current model
Since we need something to keep subscription chaint alive until subscriber is collected
Basically, we don't even need to use weak subscriptions in InpcPropertyAccessorPlugin
Steven Kirk
@grokys
Nov 11 2015 19:00 UTC
usually it will be kept alive by the DataContext reference though
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:01 UTC
I won't be sure about that
But I see that TextBox is hold by dataContextHost field somewhere
And I thing that "dataContextHost" should be a weak reference
Once it dataContextHost is collected we should dispose the whole chain
Steven Kirk
@grokys
Nov 11 2015 19:03 UTC
what is dataContextHost?
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:03 UTC
We might even keep a reference to the whole thing in some static class that will check for dead weak references from time to time
See the diagram above
Some local variable captured in closure inside Binding class
Probably this one
We need a static manager class for that stuff, because there is no way to get notified when WeakReference is dead
Steven Kirk
@grokys
Nov 11 2015 19:06 UTC
hmm it doesn't sound right that that var should be a weak ref
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:06 UTC
Well, it should
It's what's keeping TextBox alive
Steven Kirk
@grokys
Nov 11 2015 19:07 UTC
that's just selecting which control to get the data context from
Steven Kirk
@grokys
Nov 11 2015 19:09 UTC
right, i understand what you're saying but i think that's the wrong place to make a weak ref
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:09 UTC
TextBox doesn't have any back references to the binding chain
So there won't be anything to keep the chain alive otherwise
It's also possible that this variable just implicitly captured by some closure it doesn't belong to
Since C# complier generates one closure per method
Steven Kirk
@grokys
Nov 11 2015 19:11 UTC
i suspect that may be it
basically, if you're binding to any property other than DataContext, then the root of the binding source is control.DataContext
however if you're binding to DataContext then the root is parent.DataContext
that variable just selects which DataContext is the source
i wouldn't go making changes to that stuff just now though
a lot of it has been rewitten in the name-scopes branch, which is just a about ready to merge to master
(though i don't think it will fix this problem)
as far as i know, WPF uses weak references for bindings, right?
i suspect that is the correct choice
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:15 UTC
I'm not sure what is weak-referenced
We can't use weak references for parts of the binding chain
Because the chain will be collected when subscribing control is still alive
new ExpressionObserver(() => dataContextHost.GetValue(Control.DataContextProperty),
                    GetExpression());
This lambda is keeping TextBox alive
I've checked by extraction it to a separate method and renabing the variable
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:20 UTC
Did you receive a copy of dotMemory with your R# license?
Steven Kirk
@grokys
Nov 11 2015 19:21 UTC
no i didn't. i asked for it, but they just gave me resharper.
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:22 UTC
Well, fill the form again and I'll ask the same guy next week
Steven Kirk
@grokys
Nov 11 2015 19:22 UTC
yeah, when i come to look at this stuff i will definitely need it
i'm not concentrating on it at the moment because as i say, it all keeps changing as more features are added to the binding system
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:23 UTC
Do non-xaml bindings have leak issues?
Because, you know, I was planning to start porting our app to perspex this December
Steven Kirk
@grokys
Nov 11 2015 19:24 UTC
non-xaml bindings are observables so they have the same leak issues as observables
i.e. they do what you tell them to
the name-scope branch is just about ready for merge to master
i was just waiting for some stuff from omnixaml
once that is in master, we can concentrate on this stuff if that's the next most important thing
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:26 UTC
BTW, what our plans about the alpha3 release?
Steven Kirk
@grokys
Nov 11 2015 19:27 UTC
we should do it very soon
we need a working designer though
Nikita Tsukanov
@kekekeks
Nov 11 2015 19:29 UTC
I'll take a look at it this weekend
Steven Kirk
@grokys
Nov 11 2015 19:30 UTC
i'll try and get name-scopes merged this evening - i think it all should be ready, just need to test the latest omnixaml changes
José Manuel Nieto
@SuperJMN
Nov 11 2015 19:44 UTC

i was just waiting for some stuff from omnixaml

hey @grokys! I'm here!

tell me
ISupportInitialize Fiery Punch?
what do you need?
Steven Kirk
@grokys
Nov 11 2015 19:53 UTC
i think it's all described in the issue: SuperJMN/OmniXAML#58
but that's not actually related to the namescope stuff i'm finishing off at the moment
so we have time to think about it: it will probably be post alpha-3
José Manuel Nieto
@SuperJMN
Nov 11 2015 20:00 UTC
aha! hard with it
I guess it would be that issue (mostly because you told me, haha)
Tell me what you think about my idea. I want opinions.
I have an alternative: what if instead of checking to see if an instance implements something like ISupportInitialize ... we just let somebody notify us after each instance has been "initialized"?
the loader could have some event to signal begin and end
Steven Kirk
@grokys
Nov 11 2015 20:04 UTC
well you also need to notify before too
but yeah, that's the sort of thing i was trying to suggest in the issue
We can't use ISupportInitialize as it's not available to PCLs so we'd need to find another mechanism. My first idea would be to add BeginInit and EndInit methods to XamlType which could be overridden to call the appropriate Perspex method in PerspexXamlType.
they don't need to be on XamlType though
i just used that as an example because it's one place we already customize behavior for types
Nikita Tsukanov
@kekekeks
Nov 11 2015 20:16 UTC
@grokys On the second thought, if binding consumer will have a reference to the binding chain, we can safely use weak subscriptions in InpcPropertyAccessorPlugin
If I remember correctly you wanted something like this
José Manuel Nieto
@SuperJMN
Nov 11 2015 21:18 UTC
guys, I don't want to mix up things here, but it's a topic I'm very insterested in: if I had to implement a notification mechanism (in fact, the Observer pattern) to make the XAML loader notify subscribers about some event, which mechanism would you implement?
Classic CLR events? IObsevable? Weak events?
Nikita Tsukanov
@kekekeks
Nov 11 2015 21:19 UTC
event bus
José Manuel Nieto
@SuperJMN
Nov 11 2015 21:19 UTC
I've never heard of that
like a message bus?
Nikita Tsukanov
@kekekeks
Nov 11 2015 21:19 UTC
it's the same thing, yes
José Manuel Nieto
@SuperJMN
Nov 11 2015 21:20 UTC
but message buses are usually for data-driven systems
I mean, they have a synced queue
Nikita Tsukanov
@kekekeks
Nov 11 2015 21:20 UTC
Ehm
Task queue and message bus are different things
José Manuel Nieto
@SuperJMN
Nov 11 2015 21:20 UTC
OK
then I'm wrong
Nikita Tsukanov
@kekekeks
Nov 11 2015 21:21 UTC
But for XAML parser CLR events should be sufficient
Since parser instance won't be rooted anywhere once loading process is complete
José Manuel Nieto
@SuperJMN
Nov 11 2015 21:21 UTC
yes, I though so, but I would like to dig more in the idea you just said
do you have any link to learn more?
or some clue to find it?
"Message Buses" as a wider concept? or some code, maybe
Nikita Tsukanov
@kekekeks
Nov 11 2015 21:23 UTC
Well, there is EventBus in Akka...
José Manuel Nieto
@SuperJMN
Nov 11 2015 21:24 UTC
haha, nice interface
super heavey for the duty of signaling in OmniXAML, yes!
but it's cool, bro
that's the kind of core mechanism that is used in CQRS to update the data, I guess!
Nikita Tsukanov
@kekekeks
Nov 11 2015 21:29 UTC
Well, Akka has another abstraction for CQRS/EventSourcing
which is really powerful
Basically they guarantee that there will be at most one instance of an actor that represents a certain entity (e. g. user)
And that actor persists it's events that can be replayed later
Steven Kirk
@grokys
Nov 11 2015 21:40 UTC
I'm not sure events are even necessary for the begin/end init messages
Events suggest that there will be multiple listeners
Just passing a pair of delegates or overriding methods somewhere would suffice IMO
Steven Kirk
@grokys
Nov 11 2015 21:50 UTC
thanks! i'll have a stab at using that for binding subscriptions next
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:13 UTC
@grokys Designer is crashing because default theme tries to load XAML, and xaml can't be loaded until windowing platform is initialized
How does that even work during normal startup?
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:20 UTC
You guys also have renamed XamlLoader
That also has broken designer
Steven Kirk
@grokys
Nov 11 2015 22:20 UTC
that was @SuperJMN ;)
/not my fault ;)
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:22 UTC
OmniXaml.XamlLoadException: Error loading XAML: System.ArgumentException: Object of type 'Perspex.Controls.StackPanel' cannot be converted to type 'Perspex.Markup.Xaml.Templates.TemplateContent'.
   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
   at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at OmniXaml.Typing.MemberValuePlugin.SetValueIndependent(Object instance, Object value) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\Typing\MemberValuePlugin.cs:line 32
   at OmniXaml.Typing.MemberValuePlugin.SetValue(Object instance, Object value) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\Typing\MemberValuePlugin.cs:line 21
   at Perspex.Markup.Xaml.Context.PerspexXamlMemberValuePlugin.SetValue(Object instance, Object value) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\Context\PerspexXamlMemberValuePlugin.cs:line 60
   at OmniXaml.Typing.MutableXamlMember.SetValue(Object instance, Object value) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\Typing\MutableXamlMember.cs:line 56
   at OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty() in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\ObjectAssembler\StateCommuter.cs:line 67
   at OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent() in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\ObjectAssembler\StateCommuter.cs:line 166
   at OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute() in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\ObjectAssembler\Commands\EndObjectCommand.cs:line 32
   at OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\ObjectAssembler\ObjectAssembler.cs:line 70
   at OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\XamlXmlParser.cs:line 34
   at OmniXaml.XamlXmlParser.Parse(IXmlReader stream) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\XamlXmlParser.cs:line 29
   at OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser) in C:\Users\keks\Projects\GitHub\Perspex\src\Markup\Perspex.Markup.Xaml\OmniXAML\Source\OmniXaml\XamlXmlLoader.cs:line 32 ---> System.ArgumentException: Object of type 'Perspex.Controls.StackPanel' cannot be converted to type 'Perspex.Markup.Xaml.Templates.TemplateContent'.
   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
   at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflecti
That's what happens when I try to load XAML from xamltestapplication from designer
And I'm not fixing that
Steven Kirk
@grokys
Nov 11 2015 22:34 UTC
hmm, strange that that occurs only at design time
this wasn't the original error we were getting though right? you've fixed some things to get to this point?
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:35 UTC
Yep
Steven Kirk
@grokys
Nov 11 2015 22:35 UTC
ok, if you want to commit, i can try to work out what's going on there
maybe to a branch?
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:36 UTC
blob
Removed everything but the first tab
Steven Kirk
@grokys
Nov 11 2015 22:38 UTC
my guess is that something isn't being set up somehow
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:38 UTC
May be you are initializing something xaml-related outside of PerspexParserFactory
            var xamlFactory = Activator.CreateInstance(LookupType("Perspex.Markup.Xaml.Context.PerspexParserFactory"));

            dynamic xamlLoader =
                LookupType("OmniXaml.XamlLoader", "OmniXaml.XamlXmlLoader").GetConstructors().First().Invoke(new object[] {xamlFactory});
That's how xaml parser is initialized for design-time
It successfully loads PerspexWiringContext
May be you configure something somewhere else
pushed to master
Steven Kirk
@grokys
Nov 11 2015 22:39 UTC
my first thought was that PerspexObjectAssembler wasn't being set up as that's what sets the template loader mappings
ok, will take a look
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:41 UTC
I'd be happy if you add some static method that loads arbitrary xaml
So I won't have to dance around parser configuration using dynamic
Steven Kirk
@grokys
Nov 11 2015 22:43 UTC
sure i can do that
what signature do you want?
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:53 UTC
static object LoadXaml(Stream stream)
Steven Kirk
@grokys
Nov 11 2015 22:56 UTC
ok, no problem
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:56 UTC
I think I'll overhaul designer somewhere before beta1
Steven Kirk
@grokys
Nov 11 2015 22:56 UTC
when I run Perspex.Designer no breakpoints in Perspex.Markup.Xaml are getting hit - VS says no symbols have been loaded
is there any way to do that?
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:57 UTC
You need to attach VS to secondary process
hacklex
@hacklex
Nov 11 2015 22:57 UTC
huh. What a day it was.
Now again, what was that w/ ArcTo? An arc from A to B draws fine while an arc from B to A fails?
Steven Kirk
@grokys
Nov 11 2015 22:57 UTC
but i can't do that, as the file is loaded as soon as the process is started
Nikita Tsukanov
@kekekeks
Nov 11 2015 22:57 UTC
@grokys you can edit the textbox with xaml, you know
Steven Kirk
@grokys
Nov 11 2015 22:58 UTC
ah ok
So you'll be able to attach before any initialization is done
hacklex
@hacklex
Nov 11 2015 22:59 UTC

@hacklex https://github.com/Core2D/Core2D/

Isn't there some simplier sandbox case?

Nikita Tsukanov
@kekekeks
Nov 11 2015 22:59 UTC
Nope
But it has an editor for figures
hacklex
@hacklex
Nov 11 2015 23:00 UTC
I'll first try to reproduce the bug in a sandbox
as I believe I have a good guess on what causes such weird arcs
Steven Kirk
@grokys
Nov 11 2015 23:03 UTC
hmm, i can't get a breakpoint to be hit in PerspexParserFactory using either of those techniques
can you?
i am probably just being stupid
Nikita Tsukanov
@kekekeks
Nov 11 2015 23:06 UTC
Steven Kirk
@grokys
Nov 11 2015 23:10 UTC
ah.. thanks. yeah that works. not sure what i was doing wrong before.
hacklex
@hacklex
Nov 11 2015 23:13 UTC
wow. my guess was bad, after all
sandbox works fine 0_o
Can you guys remember that screenshot showing a bad arc?
You need to switch to skia backend first
hacklex
@hacklex
Nov 11 2015 23:14 UTC
Cairo, you mean?
done that very first
hacklex
@hacklex
Nov 11 2015 23:15 UTC
ah
Nikita Tsukanov
@kekekeks
Nov 11 2015 23:15 UTC
But cairo should use the same implementation
hacklex
@hacklex
Nov 11 2015 23:15 UTC
You are still at Core2D
Yep
I am now trying to reproduce this bug by drawing similar arcs
Steven Kirk
@grokys
Nov 11 2015 23:17 UTC
when did Samples folder get put under Shared?
Nikita Tsukanov
@kekekeks
Nov 11 2015 23:17 UTC
@wieslawsoltes Would you provide us with Core2D project that illustrates arcs?

when did Samples folder get put under Shared?

No idea

Probably by accident
Since they are still in samples directory in fs
hacklex
@hacklex
Nov 11 2015 23:18 UTC
something strange is happening in this Core2D
Steven Kirk
@grokys
Nov 11 2015 23:18 UTC
seems to have been 0870aad3
i'll move it back
hacklex
@hacklex
Nov 11 2015 23:18 UTC
because on cairo, I am having an identical ellipse just fine 0_o
Nikita Tsukanov
@kekekeks
Nov 11 2015 23:19 UTC
Use the source Luke!
this is some strange request, but this was my first idea nonetheless
Nikita Tsukanov
@kekekeks
Nov 11 2015 23:21 UTC
BTW, I'm also unable to reproduce it using Core2D
We need @wieslawsoltes
hacklex
@hacklex
Nov 11 2015 23:22 UTC
All mentions of ArcTo in a repo are of a very simple signature, different from one I added 0_o
Steven Kirk
@grokys
Nov 11 2015 23:24 UTC
hmm, it's none of the things i thought it might be...