Closed hansmbakker closed 6 years ago
@hansmbakker were you able to get the effect editor running with these changes alone? It's been a while since we updated and when I tested locally I also had to update some ImageLoader calls: diff.txt
@daneuber thank you for that diff. I see you added the SamplesNative project, just like me, but the issue
there are types referenced in https://github.com/Microsoft/WindowsCompositionSamples/blob/master/Demos/EffectEditor/MainPage.xaml.cs#L111 that are not defined in the rest of the repo
was not fixed by my PR. Do you want me to add the changes to MainPage.xaml.cs from your diff to my branch, or do you want to complete that yourself?
@hansmbakker ahh I see. If you could just add to your PR that'd be great!
@daneuber I tried; after adding your fixes the code compiles but I get a runtime error at https://github.com/Microsoft/WindowsCompositionSamples/blob/master/SamplesCommon/SamplesCommon/ImageLoader/ImageLoader.cs#L112
Does this work for you?
I'm using Visual Studio 15.9 Preview 3 with SDK 177663. I had some binding issues with this version before and would like to make sure that my VS instance is not the issue.
The relevant parts of the logging are:
Error: Converter failed to convert value of type 'EffectEditor.MainPage.EffectType' to type 'Int32'; BindingExpression: Path='ActiveEffectType' DataItem='EffectEditor.MainPage'; target element is 'Windows.UI.Xaml.Controls.ComboBox' (Name='EffectSelector'); target property is 'SelectedIndex' (type 'Int32').
'EffectEditor.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\hansm\Source\Repos\WindowsCompositionSamples\Demos\EffectEditor\bin\x86\Debug\AppX\SamplesCommon.dll'. Symbols loaded.
'EffectEditor.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\hansm\Source\Repos\WindowsCompositionSamples\Demos\EffectEditor\bin\x86\Debug\AppX\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
---- DEBUG ASSERTION FAILED ----
---- Assert Short Message ----
---- Assert Long Message ----
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)
at System.Diagnostics.Debug.Assert(Boolean condition)
at SamplesCommon.ImageLoader.get_Instance()
at EffectEditor.MainPage.CreateBrushFromAsset(String name, Size& size)
at EffectEditor.MainPage.MainGridLoaded(Object sender, RoutedEventArgs e)
Apologies, that's my fault for putting the ImageLoader Initialization in the CreateBrushFromAsset method which gets called multiple times. Here is a small diff moving that which should fix that error. Let me know if this fixes on your end as well. - diff2.txt
@daneuber thank you! Now it seems to work correctly 😃
@hansmbakker Awesome! Thanks for these changes!
No problem, glad it's fixed :)
Pull Request Type
[ ] Bugfix <!—Please add link to related Issue below -->
[ ] New Sample
[x] Other - Please describe: updates and fixes
Proposed Changes