We are running an application using Forge Design Automation for Revit and have an issue I can't fully explain. Our tests have been working just fine but we got a couple lately that seem to freeze inside Revit as far as I can tell. Here is the OnStartup
method of my external application:
public ExternalDBApplicationResult OnStartup(ControlledApplication application)
{
SharedData.Initialize(new LoggerConsole());
// Startup is only for registering the DA ready event
SharedData.Log.AddLine("Design automation startup in App");
DesignAutomationBridge.DesignAutomationReadyEvent += DesignAutomationBridge_DesignAutomationReadyEvent;
SharedData.Log.AddLine("Design automation event registered");
return ExternalDBApplicationResult.Succeeded;
}
Here is the outline of the event handler referenced:
void DesignAutomationBridge_DesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
// Start the actual processing here
SharedData.Log.AddLine($"Into automation ready event, working directory is: {Environment.CurrentDirectory}");
...Other Code...
}
The log for one of the jobs I'm talking about (clipped to relevant portion) looks as follows:
[12/10/2020 01:34:42] Design automation startup in App
[12/10/2020 01:34:42] Design automation event registered
[12/10/2020 01:34:42] Initialize and get RCE: (VersionBuild) 21.1.10.26 (VersionNumber) 2021 (SubVersionNumber) 2021.2
[12/10/2020 04:34:33] Error: Revit Core Engine Core Console is shut down due to process time limit.
[12/10/2020 04:34:33] End script phase.
As you can see, it makes it to the log line about event registered so the only thing left to do after that is return success. It does seem to get that success because the next log line is from inside Revit (the one that starts with 'Initialize and get'). Then after that it seems to wait 3 hours and then error because of time out. It never logs the very first line of the event handler so as far as I can tell that's not getting called.
Anyone else experienced this? How would you even go about debugging it?