Image.Load Infinite loop Issue

Infinite loop in method “Image.Load”
I don’t know the cad version of the cad file
I thought it might be a problem with the version, so I saved it as the 2013 version
and it works!


“Aspose.Cad” version is 23.2.0 ( tried also latest version 23.6.0 )

  public static stream ConvertToSVG(Stream dwgFileStream)
    {
        if (!Image.CanLoad(dwgFileStream)) throw new Exception();
        using MemoryStream svgFileStream = new MemoryStream();
        using var image =  Image.Load(dwgFileStream);
        CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions()
        {
            PageWidth = image.Width,
            PageHeight = image.Height,
            ExportAllLayoutContent = true,
            AutomaticLayoutsScaling = false,
        };

        image.Save(svgFileStream, new SvgOptions()
        {
            VectorRasterizationOptions = rasterizationOptions
        });
        return svgFileStream;
    }

Let me ask you a few questions.

1. Is there any option timeout-exception for “Image.Load” function
2. Is there a separate cad version supported by Aspose.CAD?
3. How to save a file back to a specific cad version by Aspose.CAD?

@Heewoong_Lee,
Hello.

  1. You can use CancellationToken in LoadOptions to react for hanging at load. I guess this property of CadImage can provide the version of the file: cadImage.Header.AcadVersion.
  2. We support loading of all versions for DWG/DXF. But sometimes hanging may occur because of different reasons. If you can please attach your hanging file here, we will look at the reason an fix it.
  3. We are working with saving between different versions of the format, now this is not available for DWG (we can save files back to DWG 2013 and DWG 2018 only if the initial file is already in one of these versions).

Since the drawing file is an asset of another company, the person in charge of the company has to send it directly through e-mail, so could you tell me the e-mail to receive it?

@Heewoong_Lee,
Hi.
You can send it here. Please, post message in this topic when sent so I can check. Just as a note: we are not interested in the entire content of the file, we need only the content that preserves the issue. If this is possible, you can remove all data that is not about the problem.

@Heewoong_Lee
Thank you, file received, I can confirm the issue.

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): CADNET-9289

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.

Thanks, Where can I check the progress of the issue?

@Heewoong_Lee,
you can see status of the issue at the bottom of this page.

@oleksii.gorokhovatskyi

  1. I can’t make the client wait until this problem is solved
    I tried the Cancellation Token, but the “Image.Load” didn’t stop.
    And for Cancellation Token, I can’t determine if it’s stopped by “Image.Load” or if it actually takes a long time in the process of converting to SVG, any ideas?

  2. Does it mean that Issue status is close is resolved?
    Is there any place to check the status of whether hotfix is being done or is it waiting in priority for my issue?

Thanks.

@Heewoong_Lee,

  1. I can confirm that for this loading issue token doesn’t work for some reason. I guess the point about the place where token stops the operation in general could be clear from its exception, whether it is load or save exception.
  2. Yes, this issue is resolved and should be delievered next week with Aspose.CAD for .NET 23.8. Please, note that I can not guarantee this according to free forums support policy.

The “CADNET-9289” issue is not registered in the 23.8.0 release note, but it seems to work fine in that version, but is it resolved but missing from the note?
If it’s resolved, I want to renew my license.

@Heewoong_Lee,
Hello.
Yes, it seems to be missing in Release Notes but already delivered. We are sorry for this inconvenience.

I deeply appreciate your service. Thank you so much for helping me.

1 Like