telerik RadDesktopAlert gdi32 problem on 64 bit windows 7

4 posts, 0 answers
  1. Raj
    Raj avatar
    1 posts
    Member since:
    Feb 2012

    Posted 29 Feb 2012 Link to this post


    Hi,

    I am a user of telerik winforms and i am having severe problems using it on 64 bit windows with either 32 bit outlook or 64 bit process.
    The problem is the process crashing, with little information, i got the process dump and i can see this
    >             0000000000cc0020()        
                    gdi32.dll!000007feff3f2000()       
                    [Frames below may be incorrect and/or missing, no symbols loaded for gdi32.dll]

    This happens if i am trying to display number of popups in taskbar in quick succesion. If it disable the popups, i don't get any crashes.
    When it crashes it shows something related to StackHash, Maybe telerik control is trying to access some read/write memory within gdi32.
    Stackhas seems something related to DEP.

    Here is my code.


     Image icon = message.IconName != null
                   ? ImageResources.GetAlertImage(message.IconName)
                   : ImageResources.GetAlertImage(message.Alert, FormConstants.ImageSize.x32);

             RadDesktopAlert popup = new RadDesktopAlert
             {
                CaptionText = message.Caption,
                ContentText = message.Content,
                ContentImage = icon,
                AutoCloseDelay = (int)message.Duration,
                ShowCloseButton = true,
                ShowOptionsButton = false,
                ShowPinButton = true,
                AutoClose = true,
                ScreenPosition = AlertScreenPosition.BottomRight,
                FixedSize = (message.Action == null) ? new Size(330, 90) : new Size(330, 110),
             };

             if (message.Action != null)
             {
                RadButtonElement button = new RadButtonElement
                {
                   Text = message.Action,
                };
                button.Font = new Font(button.Font, FontStyle.Underline);

                if (message.Callback != null)
                   button.Click += (sender, e) => message.Callback(sender, message);
                popup.ButtonItems.Add(button);
             }

             try
             {
                if (Application.MessageLoop)
                {
                   Control sync = new Control();
                   var handle = sync.Handle;
                   sync.Invoke((Action)(() => { popup.Show(); }));
                }
                else
                {
                   Application.Run(new AlertForm(popup));
                }            
             }
             catch (Exception ex)
             {
             }

    Any help would be greatly appreciated.

    Regards,
    Raj
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 01 Mar 2012 Link to this post

    Hi Raj,

    Thank you for writing.

    Our development environment is Windows 7 64bit and we have never observed that kind of exception before. Could you try one quick test - is it possible to show the RadDesktopAlert without an Icon, without creating new Fonts, and without subscribing to an event? Is it possible to show RadDesktopAlert  
    anywhere else in your code without using threading/syncing approach, and simply call the Show method:

    popup.Show();

    Is it possible to show a regular form (not RadDesktopAlert, but a regular Form object) at the problematic place? The answers to these questions will lead us to what may cause the exception - Outlook related, threading or GDI issues.

    I am looking forward to your reply.

    Regards,
    Peter
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Craig
    Craig avatar
    1 posts
    Member since:
    Apr 2011

    Posted 01 Mar 2012 Link to this post

    1.
    I have disabled font, disabled icon, disabled event - still crash happens.

    2. On our side, i have verified that its always the second call in the else block which is executed, so no need to worry about sync/ threading approach in the original post.
    This is the call which always executes
    Application.Run(new AlertForm(popup)); 

    3. This alerform is just a hidden form, which has the message loop, I have pasted the code for Alertform, there is also designer code which is not pasted.
    I have disabled Alert.Show() in the constructor and changed 
             this.Hide();  TO  this.Show();
             this.ShowInTaskbar = false;   TO this.ShowInTaskbar = true;
    Now it displays the form without any crash.

    There is some problem with RadDesktopAlert.


      public partial class AlertForm : Form
       {
          public AlertForm(RadDesktopAlert alert)
          {
             InitializeComponent();
             Alert = alert;
             Alert.Closed += new RadPopupClosedEventHandler(Alert_Closed);
             Alert.Show();
          }


          public RadDesktopAlert Alert
          {
             get;
             private set;
          }


          void Alert_Closed(object sender, RadPopupClosedEventArgs args)
          {
             this.Close();
          }


          protected override void OnLoad(EventArgs e)
          {
             base.OnLoad(e);
             this.Hide();
             this.ShowInTaskbar = false; 
          }
       }
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 02 Mar 2012 Link to this post

    Hi Craig,

    Thank you for these details.

    We are still not able to reproduce this issue. However, we have not tested in Outlook plug-in scenario. Could you please send us a sample application and instructions how to install and debug it in Outlook environment? You can send the sample application in the support ticket that you have opened for the same issue. This will help us to reproduce the issue and investigate whether there is a proper solution. 

    I am looking forward to your reply.

    All the best, Peter
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top