Std::logic_error Causes Calling Application's Process to Crash

We’re using Aspose Slides in Debian with C#. We’re experiencing a crash that causes the calling application’s process to be shutdown without exceptions. Because of this we cannot add any error handling. Do you have any way you can handle this or workarounds when errors like describe below happens?

Here are details about our setup:
Docker image:
mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim

NuGet package:

<PackageReference Include="Aspose.Slides.NET6.CrossPlatform" Version="24.3.0" />

When running the following code:

try
{
    var bmp = slide.GetThumbnail(new Size(2560, 1920));
}
catch (Exception e)
{
    // doesn't get caught
    Console.WriteLine(e);
}

…we get the following error, that causes the process to be terminated.

terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid

It’d be appreciated if the Aspose Slides’ NuGet package allows us to handle errors like this.

@hostmasternepa,
Thank you for contacting support. I am working on the issue and will get back to you soon.

@hostmasternepa,
Unfortunately, I couldn’t reproduce the error you described. Could you kindly share the simplest project that reproduces the error?

We’ve put together a small repro, including a Docker image.

std logic error bug 2024-04-11.zip (56.7 KB)

When you run the Docker image, the process is terminated.

It would be great if:

  1. When a crash occurs, end up in the catch block
  2. Fix the bug that causes the conversion to crash

Thank you in advance!

@hostmasternepa,
Thank you for the sample project, we greatly appreciate it. I reproduced the error you described.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44516

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Great!

Please, improve error handling. When the application process crashes it’s difficult for us to convey problems to users.

@hostmasternepa,
We are sorry that you had to encounter this problem. Our developers will do their best to solve it. Thank you for your patience.

Just checking in to hear if you have any progress updates?

@hostmasternepa,
The issue is still open. Unfortunately, I don’t have any additional information yet. We apologize for any inconvenience caused.

Hi again! I wanted to ask how you’re approaching the mentioned issues: Do you consider the process crash, without ending up in a catch-block, separate from the issue with the incompatibility content? The reason for asking is because the missing possibility for us to add error handling is negatively affecting how users can try to fix the issue themselves when content is incompatible.

@hostmasternepa,
Thank you for the questions. Could you please clarify what you mean by “content”?

With “content” I mean PowerPoints slides like the one attached in this issue, that fails to be converted.

My main question was rather whether you aim to improve error handling so that the process doesn’t crash.

@hostmasternepa,
Thank you for the explanation. I’ve forwarded your questions to our developers.

@hostmasternepa,
We created a task to improve exception handling. Unfortunately, I don’t have any additional information yet.

I noticed the issue has changed status to Blocked. Does that mean there are news?

In the meantime, below is an updated repro. Unfortunately the application process still crashes. The following changes are applied in the repro:

  • Use NuGet package Aspose.Slides.NET6.CrossPlatform@24.5.0 (instead of 24.3.0 that was used in the first repro).
  • GetImage instead of obsolete GetThumbnail.

Repro: std logic error bug 2024-06-03.zip (56.7 KB)

@hostmasternepa,

Thank you for providing the sample Docker image project to demonstrate the issue. We have logged it with your existing ticket “SLIDESNET-44516” in our database.

Yes, your ticket is being blocked by an internal issue. We need to implement handling of non-System exceptions and pass them to the Aspose.Slides.Drawing.Common library. Additionally, after that we need to evaluate running Aspose.Slides.Drawing.Common tests in Debug mode. Once we resolve the internal issue, we will incorporate necessary measures into Aspose.Slides for .NET accordingly to resolve your issue. We will keep you updated with any available updates on your issue.

The issues you found earlier (filed as SLIDESNET-44516) have been fixed in Aspose.Slides for .NET 24.7 (ZIP, MSI, NuGet, Cross-platform).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.

Yeah, the application no longer crashes with neither 24.7 nor 24.8. Thanks.

@hostmasternepa,
We are glad that the issue has been resolved on your end. Thank you for using Aspose.Slides.