.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Wblock crashing in .NET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have a .NET DLL that a gathers object ids of entities grouped within bounding boxes and then WBlocks each group of entities to individual dwg files. I'm getting an pretty consistent crash when transaction.commit gets called. If I comment out the wblock call (sourceDatabase.Wblock(targetDatabase, objectIdColl, dwgBasePoint, DuplicateRecordCloning.Ignore)) I never get the crash.
Anyone seen anything like this before? Any suggestions?
Re: Wblock crashing in .NET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I'm also seeing this every now and then.
Re: Wblock crashing in .NET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I also see this sometimes as well.
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Autodesk.AutoCAD.DatabaseServices.Transaction.Chec
at Autodesk.AutoCAD.DatabaseServices.Transaction.Dele
...
Re: Wblock crashing in .NET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
jprisbe wrote:I also see this sometimes as well.
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Autodesk.AutoCAD.DatabaseServices.Transaction.CheckTopTransaction()
at Autodesk.AutoCAD.DatabaseServices.Transaction.DeleteUnmanagedObject() ...
This error happens when you use an API that requires an active transaction, with the most-likely culprits being ObjectId.GetObject() or TransactionManager.GetObject()
The problem is in your code, and I suspect the other problem is as well.
If you need help tracking down the source of the errors, you're going to have to show the code where it happens. Otherwise, you will have to run your code in the debugger and it should break on the line when the exception occurs.
