Inventor crashing (Unhandled Error)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've created a macro that:
1) Reads a text file line-by-line (file paths)
2) Opens a drawing document from the text file
3) Modifies the title block
4) Saves the document
5) Reads next line from the text file (back to step 1)
All of the functions work perfectly fine separately.
Everything works fine if I put a break point at the beginning and step through the code (F8)
If I just run the application as it it is intended to run, Inventor crashes.
It doesn't always crash when processing the same DWG file.
The crash report says:"
<Exceptions> <Exception code="0xC0000005" text="ACCESS_VIOLATION" address="0x00007FFAF8F172CA" extraInfo="module:C:\Program Files\Autodesk\Inventor 2016\Bin\SM.dll "> <AccessViolation type="Read" address="0x0000000000000000" PGStatus="0x00000001" accessing_null_ptr="true"/> </Exception> </Exceptions> <UTxExceptions/> <BugAlerts> <BugAlertTotal logged="2"/> <BugAlert message="API method DrawingDocument.Save caught an unhandled exception.
Memory may have been left in an inconsistent state."/> <BugAlert message="API method caught an unhandled exception. Memory may have been left in an inconsistent state."/> </BugAlerts>
Application seems to run fine if I don't have the inventor window visible.
It is almost like the SAVE DRAWING command crashes if there are some unfinished tasks and having the window open and refreshing the graphics makes the entire process run longer / slower...?