Bug: Crash when using RadWindow.Alert with Windows7Theme

13 posts, 1 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 06 Sep 2011 Link to this post

    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
  2. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 06 Sep 2011 Link to this post

    I forgot to mention that I am using the internal build from 0823.
  3. DevCraft banner
  4. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 07 Sep 2011 Link to this post

    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 >>

  5. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 07 Sep 2011 Link to this post

    Great. Thank you.
  6. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 08 Sep 2011 Link to this post

    No internal build yet. This is very important to us. Will it be available today?
  7. Dani
    Admin
    Dani avatar
    848 posts

    Posted 08 Sep 2011 Link to this post

    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 >>

  8. Kelly
    Kelly avatar
    73 posts
    Member since:
    Apr 2011

    Posted 19 Jan 2012 Link to this post

    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
  9. Dani
    Admin
    Dani avatar
    848 posts

    Posted 23 Jan 2012 Link to this post

    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 >>
  10. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 23 Jan 2012 Link to this post

    @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.
  11. Dani
    Admin
    Dani avatar
    848 posts

    Posted 23 Jan 2012 Link to this post

    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 >>
  12. Dani
    Admin
    Dani avatar
    848 posts

    Posted 23 Jan 2012 Link to this post

    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 >>
  13. Kelly
    Kelly avatar
    73 posts
    Member since:
    Apr 2011

    Posted 23 Jan 2012 Link to this post

    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
  14. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 26 Jan 2012 Link to this post

    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 >>

Back to Top
DevCraft banner