iLogic Rule Compile Errors: External component has thrown an exception.

iLogic Rule Compile Errors: External component has thrown an exception.

duy.nguyenJYSF4
Contributor Contributor
1,181 Views
5 Replies
Message 1 of 6

iLogic Rule Compile Errors: External component has thrown an exception.

duy.nguyenJYSF4
Contributor
Contributor

I just got my Inventor upgraded from 2018 Pro to 2021 Pro version, and this error kept pop up here and there to all of my ilogic codes at the same time randomly. My iLogic codes work very well on 2018 version, never get any error before, and just started happening on 2021. I don't know exactly what is going on, but to get away with it, I just close and reopen Inventor, and it seems  running normally after that, but it's getting super annoying now to close inventor during a project.

See below for details.

 

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, Boolean fSkipIntegrityCheck, SecurityContextSource securityContextSource)
at System.Reflection.Assembly.Load(Byte[] rawAssembly)
at Autodesk.iLogic.Exec.AppDomExec.CompileCodeHere()
at Autodesk.iLogic.Exec.AppDomExec.CompileCodeInOtherDomain(AppDomain otherDomain, String codeName, String codeText, Boolean checkUnsafeCode)
at iLogic.RuleEvalContainer.ExecRuleCompile(String execRule)

0 Likes
1,182 Views
5 Replies
Replies (5)
Message 2 of 6

Ralf_Krieg
Advisor
Advisor

Hello

 

Is there a rule that loads an external dll file and is this file missing?


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 6

duy.nguyenJYSF4
Contributor
Contributor

No, none of them load a .dll or missing file. Some of them have very simple cmd copy page of drawing, or flipping the page, etc.

0 Likes
Message 4 of 6

MjDeck
Autodesk
Autodesk

@duy.nguyenJYSF4 , please try the workaround described at the bottom of this page. Although the problem described there is different, there is a chance that the same workaround (setting the iLogicRuleFolderForVS environment variable to 0) will fix it.

Another thing to look at:
In the Tools > Options > iLogic Configuration dialog, there is a Security Options button. When you click on that, it will bring up a Security dialog. In that dialog, there is an option to "Inspect rules for malicious code". Do you have that option enabled?


Mike Deck
Software Developer
Autodesk, Inc.

Message 5 of 6

raja.dahya
Contributor
Contributor
My drawings Rules would not work since new years. This workaround on that page worked for me.
thanks
0 Likes
Message 6 of 6

Maxim-CADman77
Advisor
Advisor

@MjDeck , 
Could you, please, explore another stable 0x80004005 issue here - Only 1-st code run fails with unspecified error 0x80004005 ?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes