This is a migrated thread and some comments may be shown as answers.

Bug: Crash when using RadWindow.Alert with Windows7Theme

12 Answers 106 Views
Window
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 06 Sep 2011, 04:28 PM
I am initiating the Windows7Theme at Application_StartUp like so:

StyleManager.ApplicationTheme = new Windows7Theme();

As soon as I do RadWindow.Alert("Whatever"); I get a white screen of death. In an isolated test app I get the following error message:
------------------
Line: 1
Error: Unhandled Error in Silverlight Application Error HRESULT E_FAIL has been returned from a call to a COM component.
------------------

But I get a better error message in my real app:
------------------
Line: 562
Error: Unhandled Error in Silverlight Application
Code: 2512    
Category: ParserError       
Message: Failed to create a 'System.Windows.Input.ICommand' from the text 'telerik:WindowCommands.Confirm'.     
File:      
Line: 948     
Position: 17
------------------

If I comment out the theme initiation stuff and just use the regular default theme, everything works fine.

Thank you,
/Henrik

12 Answers, 1 is accepted

Sort by
0
hwsoderlund
Top achievements
Rank 1
answered on 06 Sep 2011, 04:43 PM
I forgot to mention that I am using the internal build from 0823.
0
Accepted
Dani
Telerik team
answered on 07 Sep 2011, 08:28 AM
Hello Henrik,

Thank you for the detailed information. The issue has been identified and fixed already. The fix will come out with the next LIB later today.

Regards,
Dani
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
hwsoderlund
Top achievements
Rank 1
answered on 07 Sep 2011, 09:08 AM
Great. Thank you.
0
hwsoderlund
Top achievements
Rank 1
answered on 08 Sep 2011, 09:29 AM
No internal build yet. This is very important to us. Will it be available today?
0
Dani
Telerik team
answered on 08 Sep 2011, 02:44 PM
Hello Henrik,

The LIB had to be postponed. It will be available on Monday, 12.09. We sincerely apologize if this has caused inconvenience.


Best wishes,
Dani
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Kelly
Top achievements
Rank 1
answered on 19 Jan 2012, 06:12 PM
May I please ask what is the status of this problem? I'm seeing the same crash occasionally using V2011.3.1227.1040 on SLR5. For me, it doesn't seem related to the Windows7Theme - I'm using the Summer theme. The Alert fails with the following code, but not all of the time:

public void Alert(string message, string title)
 {
     ScrollViewer viewer = new ScrollViewer();
     viewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
     viewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
     viewer.BorderThickness = new System.Windows.Thickness(0);
 
     TextBlock content = new TextBlock();
     DialogParameters parameters = new DialogParameters();
 
     parameters.Header = title;
 
     content.FontSize = 9;
     content.Width = 400;
     content.TextWrapping = System.Windows.TextWrapping.Wrap;
     content.Text = message;
     viewer.Content = content;
     parameters.Content = viewer;
 
     RadWindow.Alert(parameters);  // Crashes with E_FAIL
 }

Thank you,

Kelly
0
Dani
Telerik team
answered on 23 Jan 2012, 09:00 AM
Hello Henrik,

I tested the case using your supplied source and relevant assembly and Silverlight runtime version, but could not reproduce any issue with RadWindow.Alert(). Please, send us a reproducable sample if possible.


All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
hwsoderlund
Top achievements
Rank 1
answered on 23 Jan 2012, 10:23 AM
@Dani: The latest post here was not by me. I have had no further issues since the bug was fixed. From what Kelly writes it sounds like this is a different bug than the one I reported in september. Mine was clearly related to the Windows7 theme. I tried with several other themes and it only ever crashed with the Windows7 theme.
0
Dani
Telerik team
answered on 23 Jan 2012, 10:32 AM
Hi Henrik,

Please, accept my apologies for addressing my reply to you by mistake. I am glad to hear your issue is resolved.

Kind regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Dani
Telerik team
answered on 23 Jan 2012, 10:33 AM
Hello Kelly,

Please, send a reproducable sample demonstrating the issue you are experiencing.

Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Kelly
Top achievements
Rank 1
answered on 23 Jan 2012, 06:48 PM
Dani,

Sorry, I tried to reproduce this in a sample project, but can't make it fail. It fails 100% in my real application, which is too large and complex to send.

I removed the code that sets the ApplicationTheme and it still fails, so I was wrong about it being related to Theme. It only occurs if I call RadWindow.Alert in the constructor for a window based on System.WIndows.Controls.Page. After the constructor completes, Alert works just fine.

I'll keep trying to reproduce it if I can think of other things to try. In the meantime, here is the stack:

System.Exception was caught
 Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
 StackTrace:
      at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
      at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, Boolean b)
      at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
      at System.Windows.Controls.Primitives.Popup.set_IsOpen(Boolean value)
      at Telerik.Windows.Controls.InternalWindow.MultiplePopupWindowHost.PopupHostManager..ctor(FrameworkElement root)
      at Telerik.Windows.Controls.InternalWindow.MultiplePopupWindowHost.GetHostManager()
      at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Open(Boolean isModal)
      at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
      at Telerik.Windows.Controls.RadWindow.ShowDialog()
      at Telerik.Windows.Controls.RadWindow.ConfigureModal(RadAlert content, DialogParameters dialogParams)
      at Telerik.Windows.Controls.RadWindow.Alert(DialogParameters dialogParameters)
      at MyApp.ApplicationState.Alert(String message, String title)
      at MyApp.Helpers.ViewPersister.Load(String path)
      at MyApp.ViewModels.MainViewModel.get_PredefinedViews()
 InnerException:null

Thank you,

Kelly
0
Yana
Telerik team
answered on 26 Jan 2012, 12:19 PM
Hi Kelly,

I am afraid that the stack trace is not enough for us to find the reasons for the issue.  If you find anything which could help us reproduce the problem, write to us right away.

Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Window
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
hwsoderlund
Top achievements
Rank 1
Dani
Telerik team
Kelly
Top achievements
Rank 1
Yana
Telerik team
Share this question
or