RibbonWindow throws exception when using Win 7 Classic Theme

Ribbon for WPF Forum

Posted 15 years ago by Craig - Varigence, Inc.
Version: 9.1.0505
Platform: .NET 3.5
Environment: Windows 7 (32-bit)
Avatar
So, I've reproed this on two different machines. One is my Windows 7 box, when using the Windows Classic theme. The other is on a Windows Server 2008 box, also using Windows Classic.

The exception:
System.Windows.Markup.XamlParseException: System.Windows.Markup.XamlParseException: Cannot access Freezable 'System.Windows.Media.LinearGradientBrush' across threads because it cannot be frozen. Error at object 'TitleBar' in markup file 'ActiproSoftware.Ribbon.Wpf30;v9.1.505.0;component/Themes/Ribbon/Common/RibbonWindow.xaml'. ---> System.InvalidOperationException: Cannot access Freezable 'System.Windows.Media.LinearGradientBrush' across threads because it cannot be frozen..

Repro:
The repro story is that I have a RibbonWindow in a WPF application. For testing, I'm creating and closing the window multiple times. For the first test, creating and closing the window works properly. For the second test, however, creation fails with the above exception, BUT ONLY when I use the Windows Classic theme.

I've created a sample project which I'll send you. The steps are simply to build the project and run all tests from within Visual Studio. The first test will pass and the second test should fail (when using the Windows classic theme).

Thanks,

-Craig

P.S. - I've emailed the sample to Support@ActiproSoftware.com; please let me know if it needs to go elsewhere.

[Modified at 09/14/2009 07:57 PM]

Comments (7)

Posted 15 years ago by Craig - Varigence, Inc.
Avatar
For anyone interested, I got a reply via Actipro's customer support:

"This seems to be since your unit tests are loading up the brushes in multiple threads and some of the brushes are SystemColors-based. We actually already were planning on updating our brush resources for the next build to work around this sort of issue, so be sure to download the next build once it's out and the fix should be in it."
Posted 15 years ago by Craig - Varigence, Inc.
Avatar
Can I get a confirmation if this issue has been fixed? I'm running the 506 build now but am still seeing this exception. Will upgrading to 507 resolve this?

Thanks,

-Craig
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

We tested this again with build 506, and cannot reproduce it. If you are still seeing the issue can you please send over a small sample project that reproduces it to our support email address.


Actipro Software Support

Posted 15 years ago by Craig - Varigence, Inc.
Avatar
I've sent a mail to the support alias. What I'm seeing is that my individual tests pass, but when I run multiple tests together in the same run, only the first one passes.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

Thanks for the sample, and sorry about the confusion. The unit tests are failing because we are using DynamicResource with SystemColors. We only updated brushes in 506 that our products redefined (ie. using a ComponentResourceKey), as this was the cause of the previous reports of this exception. The unit tests seem to have a problem with these brushes even when they are used inline to set a property such as Background.

Regardless, we will be updating the code to fix the problem you are seeing as well. This will be included in our next maintenance release.


Actipro Software Support

Posted 15 years ago by Craig - Varigence, Inc.
Avatar
First off, thank you for your prompt reply.

Do you have an ETA for the next maintenence release? Is there anything I can do to workaround this on my end until the next release comes?

Thanks again,

-Craig
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The next release will likely be the first 2009.2 version since we're well into development for that. We hope to have it out either later this month or early December.


Actipro Software Support

The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.