A Generic Error Occurred in GDI+ for Thumbnail of Slide with Flipped Dashed Line

I found that Presentation.GetThumbails reproducible fails for certain files in .NET Core application. This only occurs when running the application on Linux (Aspose.Slides 21.5.0, Ubuntu 21.04, libgdiplus 6.0.4+dfsg-2). On Windows the command works fine.

I created a sample file showing the issue with the following steps

  • Create presentation with empty slide
  • Insert a line
  • Change line style to dashed
  • Use Arrange > Rotate > Flip Horizontal
  • Save file

Here’s a file created with the steps above: test.zip (23.8 KB)

Sample code

using (var p = new Aspose.Slides.Presentation("test.pptx"))
    p.GetThumbnails(new Aspose.Slides.Export.RenderingOptions());

Exception that occurs

System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.SafeNativeMethods.Gdip.CheckStatus(Int32 status)
   at System.Drawing.Graphics.FillPath(Brush brush, GraphicsPath path)
   at    .(GraphicsPath , Brush , Color , Single , Graphics )
   at    .(GraphicsPath , PointF , Brush , Pen ,   ​ ,  ​  , Graphics )
   at    .(String , RectangleF ,  ​  ,   ​ )
   at    .​      (String , RectangleF ,  ​  )
   at Aspose.Slides.BaseSlide.(​   )
   at Aspose.Slides.Slide.(​   , IShapeFrame ,    `2 , ​   , InterruptionToken )
   at Aspose.Slides.Slide.(Size )
   at ​  .(Size )
   at ​  .(Single , Single )
   at ​  .(Presentation , INotesCommentsLayoutingOptions , Int32[] , Single , Single )
   at Aspose.Slides.Presentation.GetThumbnails(IRenderingOptions options)
   at LinuxApp.Program.Main(String[] args) in D:\Development\LinuxApp\Program.cs:line 19

Thank you for the issue description. I reproduced the error and logged the issue in our tracking system with ID SLIDESNET-42631. Our development team will investigate this case. You will be notified when it is fixed.

1 Like

@Andrey_Potapov, Just wanted to check in briefly if you had an idea when a fix might be available?

The issue investigation will begin in 2021/27 week.

Hi @Andrey_Potapov - Did the developers isolate and fix the issue? Would be great if you could let me know if or when an update of Aspose.Slides is available.

This issue has been resolved and tested. The fix will be included in Aspose.Slides 21.8. This version will be released around the second half of August.

Thanks for the update @Andrey_Potapov.

I encountered another error that seems similar to the one discussed here though somewhat different. It occurs when inserting an elbow connector with a dashed line and width <1pt. Please find a sample file below.

test2.zip (23.7 KB)

What I would like to know from you is whether version 21.8 will also fix this issue or if I should open a new thread.

Thank you for the additional information. I will answer you as soon as possible.

I reproduced a similar error for the presentation you provided. I added a ticket with ID SLIDESNET-42722 in our tracking system. Our development team will investigate this case as well. I will request to fix it for Aspose.Slides 21.8.

Thanks @Andrey_Potapov, would be awesome if a fix could be included in the 21.8 release.

The issues you have found earlier (filed as SLIDESNET-42722) have been fixed in this update.

The issues you have found earlier (filed as SLIDESNET-42631) have been fixed in this update.

I tested with a set of sample files all including a thin dashed line. Unfortunately, only about one third of those did not show the GDI+ error after updating to version 21.8.

I’m attaching a file with more error cases. Would be great if you could apply the same fix soon and ideally address the root cause to eliminate “more of the same” kind of errors.

test-collection.zip (37.0 KB)

Thank you for the presentation example. You are right. I reproduced a similar error with Aspose.Slides 21.8 and logged the issue with ID SLIDESNET-42761 in our tracking system. Our development team will investigate this case as well. You will be notified when this problem is fixed. We apologize for any inconvenience caused.

The issues you have found earlier (filed as SLIDESNET-42761) have been fixed in this update.

Thanks for the update. Confirming that the files for which previously exceptions occurred as processed correctly now.

1 Like