Message 1 of 8
Crash in OpenAndActivateDocument
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We use UIApplication.OpenAndActivateDocument(String fileName) to open and activate documents. It has been working fine for us without any issues. But on a couple models we are getting:
Opening was canceled., Stack: at Autodesk.Revit.UI.UIApplication.OpenAndActivateDocument(String fileName)
Looking at the errors I found:
Object reference not set to an instance of an object.
Source Autodesk.WorksharingMonitor.Application StackTrace at WorkSharingLib.ExternalApplication.DocumentClosing(Object obj, DocumentClosingEventArgs eArgs)
Also:
'309.808524=== 2:<<FormOrAbandon::openFromModelPath [C:\Users\ebar\AppData\Local\Launcher\Revit\UNO1A-PIM.rvt]
' 2:< ::1295:: Delta VM: Avail -17 -> 134208931 MB, Used +1 -> 5459 MB; RAM: Avail +18 -> 218156 MB, Used +0 -> 5557 MB
' 2:< GUI Resource Usage GDI: Avail 9825, Used 175, User: Used 161
' 2:< API_ERROR { System.NullReferenceException exception(Object reference not set to an instance of an object.) was thrown from a handler of Autodesk.Revit.Proxy.DB.Events.DocumentOpenedEventArgsProxy event. The API event handler was registered by application Export To Revit (df5b7489-f0e6-4f83-8010-3d852316d225). Changes made by this handler are going to be discarded. }
' 0:< ModelPath Created: Is server path = True, Region = "GLOBAL", Central server = "", Path = "CLD:\\GLOBAL\{00000000-0000-0000-0000-000000000000}Project-UNO1-A\{00000000-0000-0000-0000-000000000000}UNO1A-PIM.rvt"
' 2:< ::1295:: Delta VM: Avail +15 -> 134208946 MB, Used 5459 MB; RAM: Avail -14 -> 218143 MB, Used 5557 MB
' 2:< GUI Resource Usage GDI: Avail 9825, Used 175, User: Used 161
' 2:< API_ERROR { System.ArgumentNullException exception(Value cannot be null.
'Parameter name: key) was thrown from a handler of Autodesk.Revit.Proxy.DB.Events.DocumentOpenedEventArgsProxy event. The API event handler was registered by application FormIt Conversion (eccb03c4-b3c3-4c39-868e-5d65d9ce20bd). Changes made by this handler are going to be discarded. }
' 1:< ::1295:: Delta VM: Avail -18 -> 134208928 MB, Used 5459 MB; RAM: Avail 218143 MB, Used 5557 MB
' 1:< GUI Resource Usage GDI: Avail 9825, Used 175, User: Used 161
'E 27-Jul-2022 11:31:23.551; 1:<
So it seems like they are caused by FormIt and WorkSharingLib. How can I get around this issue?