OldBloke
OldBloke

Reputation: 51

An unexpected error happened during phase CoreEngineExecution of job

I have been developing an Inventor plugin. I have been testing against multiple STEP assemblies. Running the plugin against my local Inventor works in all cases. Running my plugin on the forge platform works in all cases BUT ONE. It fails after 1:40 minutes so it is not timing out. However the report does show that "Inventor Core Engine Core Console is shut down due to timeout"

I am looking for tips on how to trouble shoot the reported error above and "An unexpected error happened during phase CoreEngineExecution of job"

An extract of the script is shown below

[02/20/2021 23:38:14] Start Inventor Core Engine standard output dump. [02/20/2021 23:38:14] InventorCoreConsole.exe Information: 0 : InventorCoreConsole.exe: 25.0.18300.0 [02/20/2021 23:38:14] InventorCoreConsole.exe Information: 0 : Starting Inventor Server. [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Started Inventor Server 2021.1 (Build 251245000, 245) (25, 10, 24500, 0000) [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Loading plug-in: iLogic Plugin [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Activating plug-in: iLogic Plugin [02/20/2021 23:38:15] iLogic Plugin: initializing... [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Opening document: T:\Aces\Jobs\xxxxxx\xxxxxx.stp Invisible mode: False [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Opened [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Getting Inventor plug-in. [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Plug-in: UnfoldAddin [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Activating plug-in: UnfoldAddin [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : : ipPlugin (1.0.0.0): initializing... [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Executing 'Run' method on Automation object. [02/20/2021 23:39:51] Error: Inventor Core Engine Core Console is shut down due to timeout. [02/20/2021 23:39:51] End script phase. [02/20/2021 23:39:51] Error: An unexpected error happened during phase CoreEngineExecution of job. [02/20/2021 23:39:51] Job finished with result FailedExecution [02/20/2021 23:39:51] Job Status:

Any direction at all would be greatly appreciated

Upvotes: 1

Views: 432

Answers (2)

Adam Nagy
Adam Nagy

Reputation: 2125

If a process is not printing anything to the command line (to show that it's still running fine) for more than a minute, it might get shut down.

I think the issue in your case is that accessing f.Geometry might trigger a full load of the document, which takes more than a minute, and that's why it times out if you are not using the HeartBeat object - see https://forge.autodesk.com/blog/design-automation-inventor-vs-template

Upvotes: 1

OldBloke
OldBloke

Reputation: 51

Ok, by a process of elimination (which took forever), I have isolated the code in my plugin that was causing this issue. The block below iterates through the faces of scd which is a SheetMetalComponentDefinition. If I uncomment the "if (f.Geometry is Plane)" block I get the error on Forge (not against local inventor however)

Unfortunately I have no idea why this was causing the problem, but hopefully this will benefit someone in the future

foreach (Face f in scd.SurfaceBodies[1].Faces)
        {
            double a = f.Evaluator.Area;
            //PROBLEM
            //if (f.Geometry is Plane)
            //{
            if (a >= maxArea - 0.001)
            {
                maxArea = a;
                maxFace2 = maxFace1;
                maxFace1 = f;
            }
            //}
        }

Upvotes: 0

Related Questions