Multi-threading error

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Robert Simpson
Posts: 12
Joined: 11 Dec 2007, 21:38
Location: USA

Multi-threading error

Post by Robert Simpson » 11 Dec 2007, 21:48

I am using CADImport in a multi-threaded environment. I use a lock() around the code, which looks something like this:

lock(_objlock)
{
using (CADImage imp = new DWG.DWGImage())
{
// Do stuff, load DWG's, etc
}
}

In spite of this global lock, occasionally I am getting pop-up dialogs on the screen claiming "the number of permitted application instances is exceeded!"

Unfortunately, two things are a problem ...
#1, it's a multi-threaded application, but is still only one application ... shouldn't my license cover this? and

#2, the application has no front-end, and the pop-up is stopping everything else dead in its tracks. Is there any way to keep CADImport from popping up error messages and throw errors instead?

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

Post by support » 13 Dec 2007, 13:25

Dear Robert Simpson,

Could you please send us (to support@cadsofttools.com) a small demo which can repeat this problem? Also we need detailed explanation how, where and on what conditions it arise.

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Robert Simpson
Posts: 12
Joined: 11 Dec 2007, 21:38
Location: USA

Post by Robert Simpson » 14 Dec 2007, 00:52

I got it sorted out. I was running a production version on one machine on the network, while debugging and making code changes on my development machine. Apparently the library doesn't like that very much.

Robert

Post Reply