Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Microsoft Visual Studio 2019 :: XAML Designer not barf a hairball (Fatal System Exception) on many XAML dialogs/panels #40

Closed
GerHobbelt opened this issue Aug 9, 2019 · 4 comments
Labels
🐛bug Something isn't working 🦸‍♀️enhancement🦸‍♂️ New feature or request
Milestone

Comments

@GerHobbelt
Copy link
Collaborator

Double-click the XAML files and find that many fail to render with a reported Exception like Brush-blablabla-Blue-blalblBLA cannot be found, yadayada.

@GerHobbelt
Copy link
Collaborator Author

Example Exception

System.ArgumentException
  HResult=0x80070057
  Message='NaN' is not a valid value for property 'Value'.
  Source=WindowsBase
  StackTrace:
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Controls.Primitives.RangeBase.set_Value(Double value)
   at Qiqqa.Brainstorm.SceneManager.SceneRenderingControlScrollWrapper.DoHorizontal() in W:\Users\Ger\Projects\sites\library.visyond.gov\80\lib\tooling\qiqqa\Qiqqa\Brainstorm\SceneManager\SceneRenderingControlScrollWrapper.xaml.cs:line 49
   at Qiqqa.Brainstorm.SceneManager.SceneRenderingControlScrollWrapper.ObjSceneRenderingControl_ScrollInfoChanged() in W:\Users\Ger\Projects\sites\library.visyond.gov\80\lib\tooling\qiqqa\Qiqqa\Brainstorm\SceneManager\SceneRenderingControlScrollWrapper.xaml.cs:line 25
   at Qiqqa.Brainstorm.SceneManager.SceneRenderingControl.FireScrollInfoChanged() in W:\Users\Ger\Projects\sites\library.visyond.gov\80\lib\tooling\qiqqa\Qiqqa\Brainstorm\SceneManager\SceneRenderingControl.xaml.cs:line 104
   at Qiqqa.Brainstorm.SceneManager.SceneRenderingControl.ViewportHasChanged() in W:\Users\Ger\Projects\sites\library.visyond.gov\80\lib\tooling\qiqqa\Qiqqa\Brainstorm\SceneManager\SceneRenderingControl.xaml.cs:line 154
   at Qiqqa.Brainstorm.SceneManager.SceneRenderingControl.SceneRenderingControl_SizeChanged(Object sender, SizeChangedEventArgs e) in W:\Users\Ger\Projects\sites\library.visyond.gov\80\lib\tooling\qiqqa\Qiqqa\Brainstorm\SceneManager\SceneRenderingControl.xaml.cs:line 697
   at System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
   at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteUIElement.<>c__DisplayClass20_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteUIElement.CreateContent>b__1(RemoteUIElement e)

GerHobbelt added a commit to GerHobbelt/qiqqa-open-source that referenced this issue Aug 9, 2019
…Designer *NOT* barf a hairball (Fatal System Exception) on many XAML dialogs/panels in Qiqqa.

The key to the latter is tweaked the dialog setup/init code such that XDevProc (which is part of Visual Studio) can execute that part of the Qiqqa code and thus render the panel -- or at least not b0rk and fail on it when you open the XAML file in the Designer.

---

WARNING NOTE:

TODO: The bit at the end is a copy/dump off SO where the same problem as jimmejardine#40

Must be tweaked and then retried with Qiqqa as it didn't fly for me yet. :-(

The blunter hack of tweaked the Qiqqa code and sneakily support XDesProc code flow too
by moving the Theme loader into Utilities.GUI is nice, but somehow still makes Designer
blue-wave the Brushes and NOT render them.

---

```
<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
			<ResourceDictionary Source="pack://application:,,,/Styles;component/Resources.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>
```
@GerHobbelt
Copy link
Collaborator Author

Above example is fixed in commit SHA-1: af670a8

@GerHobbelt GerHobbelt changed the title make Microsoft Visual Studio 2019 :: XAML Designer not barf a hairball (Fatal System Exception) on many XAML dialogs/panels ✅make Microsoft Visual Studio 2019 :: XAML Designer not barf a hairball (Fatal System Exception) on many XAML dialogs/panels Aug 9, 2019
@GerHobbelt
Copy link
Collaborator Author

Fixed as per #33 - not released as setup.exe binary yet.

@GerHobbelt
Copy link
Collaborator Author

Closing and decluttering the issue list so it stays workable for me: fixed in https://github.com/GerHobbelt/qiqqa-open-source mainline=master branch, pending #15 / any maintainer rights/actions.

@GerHobbelt GerHobbelt added 🦸‍♀️enhancement🦸‍♂️ New feature or request 🐛bug Something isn't working labels Oct 4, 2019
@GerHobbelt GerHobbelt added this to the v82 milestone Oct 4, 2019
@GerHobbelt GerHobbelt changed the title ✅make Microsoft Visual Studio 2019 :: XAML Designer not barf a hairball (Fatal System Exception) on many XAML dialogs/panels make Microsoft Visual Studio 2019 :: XAML Designer not barf a hairball (Fatal System Exception) on many XAML dialogs/panels Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🦸‍♀️enhancement🦸‍♂️ New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant