Common Language Runtime detected an invalid program.

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 5 years ago by eric
Version: 18.1.0673
Platform: .NET 4.7
Environment: Windows 10 (64-bit)
Avatar

Hi,

 

so i got a weird bug that occurs only when running a UI Tests trigged using a build. I insist on that previous statement since im not able to reproduce the bug when running the .exe directly on the build machine or when i run it using visual studio. 

I am not sure if the bug is really on actipro side or on the build side, but im writting this hoping someone have an idea of what could be wrong.

From the call stack the last control seems to be an actipro one:

 


==================================================
The Application's Error Message:
Common Language Runtime detected an invalid program.

==================================================
The Application's STACK:
at System.Windows.Media.DoubleCollection..ctor(IEnumerable'1 collection)
at System.Windows.Media.GuidelineSet..ctor(Double[] guidelinesX, Double[] guidelinesY)
at ActiproSoftware.Windows.Controls.DropShadowChrome.OnRender(DrawingContext drawingContext)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Decorator.ArrangeOverride(Size arrangeSize)
at System.Windows.Documents.AdornerDecorator.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Window.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
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 System.Windows.Window.SourceWindowHelper.set_RootVisual(Visual value)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at ActiproSoftware.Windows.Themes.WindowChromeShadow.UpdateVisibility()
at ActiproSoftware.Windows.Themes.WindowChromeShadow..ctor(Window primaryWindow)
at ActiproSoftware.Windows.Themes.WindowChromeManager.#5Lg()
at ActiproSoftware.Windows.Themes.WindowChromeManager.#7Lg()
at ActiproSoftware.Windows.Themes.WindowChromeManager.#6Lg(Boolean #BCf)
at ActiproSoftware.Windows.Themes.WindowChromeManager.#2wg()
at ActiproSoftware.Windows.Themes.WindowChromeManager.#3wg()
at ActiproSoftware.Windows.Themes.WindowChromeManager.OnSourceInitialized(Object #xhb, EventArgs #yhb)
at System.Windows.Window.OnSourceInitialized(EventArgs e)
at ActiproSoftware.Windows.Controls.Ribbon.RibbonWindow.OnSourceInitialized(EventArgs e)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at Desktop.ApplicationBootStrapper.InitializeShell() 
at Prism.Unity.UnityBootstrapper.Run(Boolean runWithDefaultConfiguration)
at Desktop.ApplicationBootStrapper.Run(Boolean runWithDefaultConfiguration) 
at Prism.Bootstrapper.Run()
at Desktop.Application.ApplicationStartup(Object sender, StartupEventArgs e) 
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

I checked and re-checked the build multiple time to see if anything was wrong (wrong compiler, bad configuration, etc)

Our application are compile using the x86 configuration. 

 

The UI Test existed before and were working. This problem started to occur after upgrading from 2017 to the latest actipro version 18.1.0673 

Comments (3)

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Eric,

I'm sorry you're running into trouble.  We've never heard of that error before.  It sounds like something low-level that we might not have control over.  Looking at our DropShadowChrome code, which was the highest Actipro code in your stack trace, it hasn't been changed in years.  I don't think that upgrading from 2017.1 to 2018.1 would make a difference for that particular control since it hasn't been updated in that timeframe.

I'm wondering if perhaps you also upgraded to .NET 4.7.x at the same time you upgraded to a new Actipro controls version and perhaps something with the .NET framework upgrade triggered this?


Actipro Software Support

Posted 5 years ago by eric
Avatar

As a matter of fact we did =S...

 

We have upgraded our applications to .NET 4.7.2 in a parallel effort. 

 

Do you have any clue of why this upgrade could cause such an exception? 

 

Thanks for your help and quick response in this holiday period. Happy holidays!

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Eric,

I really don't know but I would be curious if it happens on the older .NET Framework you used to use, along with the newer Actipro version.  I suspect it would go away in that scenario.

Your best bet is to probably contact Microsoft on this and report it to their .NET team since it sounds like it's something they'd likely need to address.  The API that DropShadowChrome is calling has been there in .NET for a very long time.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.