Red X Error

Version: Aspose.Grid.Desktop 2.0.0.32

A user is getting the red x intermittently when using the application. This also happened to another user awhile back and after they received a new laptop, everything was fine which is making our dev group feel it's something driver related.

I cannot reproduce this issue...it just happens from time to time. Based on the stacktrace, it looks like something is not being handled properly in the Grid component.

Do you know if this issue has already been fixed? Thanks.

Here is the stacktrace:

System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Graphics.MeasureCharacterRanges(String text, Font font, RectangleF layoutRect, StringFormat stringFormat)
at Aspose.Grid.Desktop.?.?(Graphics ?, Rectangle ?, String ?, Int32 ?, Int32 ?, Boolean ?, Int32 ?, TextDirectionType ?, Font ?, Single& ?, RectangleF& ?, StringFormat& ?)
at Aspose.Grid.Desktop.GridDesktop.?(Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, ArrayList ?)
at Aspose.Grid.Desktop.GridDesktop.?(Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32& ?)
at Aspose.Grid.Desktop.GridDesktop.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Hi,

We appreciate if you could try our latest version of GridDesktop (Aspose.Cells.GridDesktop - Aspose.Grid controls are re-named and merged into Aspose.Cells for .NET package), you may download Aspose.Cells for .NET v4.8.1 @: http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry207989.aspx

After installing the installer, you will find Aspose.Cells.GridDesktop control’s dll in two folders i.e…, Net2.0 and Net1.0 @ your installation path e.g "E:\Program Files\Aspose\Aspose.Cells for .NET\Bin"
I think you may try the Aspose.Cells.GridDesktop v2.0.2.2000 in the Net2.0 folder (as now we also provide .NET 2.x compiled control for the users).

Kindly let us know if you still find the issue.

Thank you.

Thanks for the quick reply. Unfortunately, due to our release schedule, I won't be able to update the code to use this version until next year.

In the mean time, are you able to confirm that this error has been resolved in the new release? I don't want to update our code to a new version, which in the past, has caused other problems unless we know 100% this error is fixed.

Hi,

Well, we haven’t found out the reason for this crash; we will further look into it and let you know about it. And, could you please provide us the environment details (OS, .NET Framework, etc.) of your user’s laptop; and test Aspose.Cells.GridDesktop.Demos on it?

Thank you.

From the error message, the exception happened when calling MeasureCharacterRanges method. We will provide you a debug version to collect information in your user's machine which caused the problem.

I think it may be related to video driver or .Net Framework.

Hi,

Thank you for considering Aspose.

Please try the attached debug version. It will generate debug log in “c:\GridDesktop.debug.txt” file if an External Exception is raised. Please share the log file with us and we will check it to figure out the issue.

Thank You & Best Regards,

Is this version exactly the same as the one I listed except with the addition of the logging feature in case it encounters an unhandled exception?

Just to confirm, it's the same as 2.0.0.32 with only additional logging functionality?

I only ask because after incorporating this dll, a number of new issues cropped up and I'm having to revert back to the old dll so we can finish testing.

Hi,

Aspose.Grid.Desktop v2.0.1.2031 is newer than v2.0.0.32. It fixes some bugs and enhances some features. And we have added some debug code into it to catch the ExternalException. I think you may only update the laptop which raises the ExternalException with this dll to help us to find the reason.

Thank you.

Unfortunately, due to these enhancements, it’s causing our tester to get different errors. If there’s any way you can rebuild the 2.0.0.32 version from source control and then add in the debugging feature, that would be great.

Hi,

Does our debug version create a debug log file? if so, kindly post it here, we will check it soon.

Thank you.

Like I said, our developer can NOT test because of your enhancements. These enhancements are causing other, non-unhandled exceptions that have nothing to do with the Red X error but do prevent him from testing in the hopes he can get the Red X error again.

If you can add the debugging enhancement only to the 2.0.0.32 dll, I will have him use that and then hope the Red X error happens again and if it does, I will upload the log file.

2.0.0.32 is a very old version and we have merge Grid product into Cells product. Thus we will maintain the new versions instead of old ones. We have put this problem at highest priority in our work list.

What's the problems in the new version? Can you provide the detail information about them? We will fix them ASAP.

Sorry for any inconvenience.

Hi,

Please try the attached version. Please update your laptop with this new version. If you have any question/issue, please post us back.

Thank you.

Okay, he was able to reproduce the red x and received the message below.

Also, the c:\GridDesktop.debug.txt did not exist…any ideas on that?

System.OverflowException: Overflow error.

at System.Drawing.Graphics.CheckErrorStatus(Int32 status)

at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)

at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)

at Ӓ.䑎.㟉(Graphics ੖, Rectangle ق, Rectangle ٗ, Color ؕ)

at Aspose.Cells.GridDesktop.GridDesktop.ع(Int32 ӛ, Int32 ش, Int32 ص, Int32 ض, Int32 ط, Int32 ׺, Int32 ظ, Int32& ׸)

at Aspose.Cells.GridDesktop.GridDesktop.OnPaint(PaintEventArgs e)

at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)

at System.Windows.Forms.Control.WmPaint(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ContainerControl.WndProc(Message& m)

at System.Windows.Forms.UserControl.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Hi,

Thanks for giving us further details.

We will provide you another debug version to trace your issue more accurately. You can expect the version today or the day after today.

Have a good time.

Hi,

Thank you for considering Aspose.

Please download and try the attached debug version and please share the log file with us and we will check it to figure out the issue.

Thank You & Best Regards,

Thanks for this. I’m incorporating it now. So, we’re hoping that if we receive the red x again, the debug file you mentioned earlier should get generated?