Converting any DWG fails with "The file is corrupt or damaged." in .NET

Hi, somehow it looks like DWG conversion has stopped working since GroupDocs.Conversion 23.4.
With version 23.3 it was all working and now I seem unable to convert any file to any other format.
I’m always getting the following error:
Cannot convert. The file is corrupt or damaged. Image loading failed: The type initializer for '#=zj78G_2a_Im7q6BQMJ3RyAlIBQ$H1YCfTNg==' threw an exception.

Please see the attached project and DWG files.
Upgrading the NuGet package to any other version did not help either, only downgrading to 23.3.
GroupDocs Problem.zip (212.3 KB)

@Clemens_Pestuka
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): CONVERSIONNET-6269

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.

1 Like

The issues you have found earlier (filed as CONVERSIONNET-6269) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov

Hi, I wanted to test this fix, but I somehow can no longer combine GroupDocs.Conversion and GroupDocs.Viewer in the same project.
As I can see, there is no GroupDocs.Total available with that version, so I guess I have to wait for a compatible version of GroupDocs.Viewer to be released?

Currently I get this error when I try to use GroupDocs.Viewer to convert a DWG:

System.TypeLoadException: 'Could not load type ‘Aspose.CAD.InterruptionToken’ from assembly 'Aspose.CAD, Version=23.7.0.0, Culture=neutral,

Is there maybe any workaround for it?
Is there any GroupDocs.Total release planned for this month?
GroupDocsProblem.zip (127.7 KB)

Best regards,
Clemens

@Clemens_Pestuka
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): CONVERSIONNET-6306

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.

1 Like

@Clemens_Pestuka

As workaround we would suggest to install Aspose.CAD 22.7 as reference. Seems binding redirects are not helping in the current case. However, after installing Aspose.CAD as reference, it seems to be working for both Viewer and Conversion.
Please find the modified.zip (114.4 KB) project attached. Let us know if there’s any issue.

1 Like

@atir.tahir
Thanks for the suggestion.
Unfortunately this does not really work.
It does work if you’re using GroupDocs.Viewer first, but fails when GroupDocs.Conversion was used first.
It’s throwing the error initially reported in this thread.
image.png (23.6 KB)

Here is the modified project:
GroupDocsProblem.zip (115.1 KB)

1 Like

@Clemens_Pestuka

Thanks for the feedback. We’ll continue investigation and will notify you in case of any further update.

1 Like

@atir.tahir

Hi, I wanted to upgrade GroupDocs, to test a few of the many fixes you have created since the last upgrade, but it seems like this is still preventing me from upgrading :frowning:

GroupDocsMixedProblem.zip (7.3 KB)

I’ve used 24.2 for both, GroupDocs.Viewer and GroupDocs.Conversion.
They are both used in GroupDocs.Total too and are both using the same Aspose.CAD.dll 24.1,
but I’m still seeing “CorruptOrDamagedFileException”

GroupDocs.Conversion.Exceptions.CorruptOrDamagedFileException
  HResult=0x80131500
  Message=Cannot convert. The file is corrupt or damaged. The type initializer for 'Aspose.CAD.Image' threw an exception.
  Source=GroupDocs.Conversion
  StackTrace:
   at   .()
   at   .()
   at   .    ()
   at   .(   )
   at   .    (   ,    ,    , ConvertOptions )
   at   ..(   ,    , ConvertOptions )
   at   .    (   ,    ,    , ConvertOptions )
   at   ..(   ,    , ConvertOptions )
   at   .    (   ,    ,    , ConvertOptions )
   at   ..(   ,    , ConvertOptions )
   at   .(   , ConvertOptions )
   at   .(   ,    , ConvertOptions ,   & )
   at  .(MethodBase , Object , Object[] , Boolean )
   at  .(MethodBase , Object , Object[] , Boolean )
   at  .(MethodBase , Boolean )
   at  . (  ,  )
   at  .()
   at  . (Boolean )
--- End of stack trace from previous location ---
   at  .(Object )
   at  .()
   at  .  (  ,  )
   at  .()
   at  . (Boolean )
--- End of stack trace from previous location ---
   at  .(Object )
   at  .()
   at  .(Object , UInt32 )
   at  . (Boolean )
   at  . (Boolean )
   at  .(Object[] , Type[] , Type[] , Object[] )
   at   ..MoveNext()
   at   .()
   at GroupDocs.Conversion.Converter.()
   at GroupDocs.Conversion.Converter.Convert(Func`2 document, ConvertOptions convertOptions)
   at GroupDocsMixedProblem.Program.Main(String[] args) in C:\Users\clemens.pestuka\Documents\Visual Studio 2022\Projects\GroupDocsMixedProblem\GroupDocsMixedProblem\Program.cs:line 41

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
TypeInitializationException: The type initializer for 'Aspose.CAD.Image' threw an exception.

Inner Exception 2:
ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
1 Like

@Clemens_Pestuka

We have created another ticket to investigate this issue CONVERSIONNET-6716. We’ll notify you in case of any progress update.

1 Like