cadImage.LoadFromFile() OverflowException

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Sing
Posts: 48
Joined: 12 Apr 2020, 17:39

cadImage.LoadFromFile() OverflowException

Post by Sing » 12 Oct 2020, 08:48

Hello

I got an issue 'System.OverflowException' at cadimage.LoadFromFile().
It happens to some cad files.
I attached an .dwg file.

And the error message is below
-----------------------------------------------------
Exception thrown: 'System.ArgumentException' in System.Drawing.dll
Exception thrown: 'System.OverflowException' in CADImport.dll
Exception thrown: 'System.OverflowException' in CADImport.dll
.
.
.
during 60 sec.
.
.
.
Exception thrown: 'System.OverflowException' in CADImport.dll
Exception thrown: 'System.OverflowException' in CADImport.dll
Managed Debugging Assistant 'ContextSwitchDeadlock'
The CLR has been unable to transition from COM context 0x4a0e62a0 to COM context 0x4a0e6178 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
-----------------------------------------------------

Code is...

Code: Select all

CADImage cadImage = CADImage.CreateImageByExtension(dwgFilePath);
cadImage.LoadFromFile(dwgFilePath);

Thank you.
Attachments
LoadingError.zip
(8.39 MiB) Downloaded 471 times

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Re: cadImage.LoadFromFile() OverflowException

Post by support » 12 Oct 2020, 09:43

Hello,

Could you please also specify your CADImport.dll build number?

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Sing
Posts: 48
Joined: 12 Apr 2020, 17:39

Re: cadImage.LoadFromFile() OverflowException

Post by Sing » 12 Oct 2020, 19:12

Hello~

The build number of my CADImport.dll is v14.1.40.40930.
Attachments
cadimport_version.PNG
cadimport_version.PNG (10.29 KiB) Viewed 2970 times

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Re: cadImage.LoadFromFile() OverflowException

Post by support » 23 Oct 2020, 09:30

Hello,

Thank you for the information.

We have tested the issue with the latest CADImport.dll build (14.1.0.45509), there is no System.OverflowException at CADImage.LoadFromFile(). You may download the latest build at the page https://cadsofttools.com/products/cad-net/download/.

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply