OPCFoundation / UA-ModelCompiler

ModelCompiler converts XML files into C# and ANSI C
MIT License
151 stars 95 forks source link

Max recursion exceeded in code generation for variable type #127

Open izonfreak opened 1 year ago

izonfreak commented 1 year ago

Hello,

I am trying to compile a node set that uses an information model that has a variable type that reference itself as an optional component e.i. the variable can have a component of itself.

When I run the compiler I get the error "max recursion exceeded. Check model." Because of this error the classes are not generated. The funny thing is that it shows the error as in another property on the variable type and not in the optional recursive component which would be deceiving to most people.

As far as I know this type of recursion is allow inside OPC UA.

opcfoundation-org commented 1 year ago

It is allowed in OPC UA, however, many technically permitted constructs are problematic for code generators.

The ModelCompiler does not support this kind of recursion and it is not clear at this point if it possible to support but that will require more investigation.

Is this a published companion specification nodeset?

izonfreak commented 1 year ago

Not yet, it is a release candidate. It is the "OPC UA for Machine Vision - Part 2 AMCM" The problematic variable type node is SEMI_E10SystemStateType.

opcfoundation-org commented 1 year ago

The WG should provide the OPC-F with an RC to see if the ModelCompiler can be updated before to release.

izonfreak commented 1 year ago

Could you please provide me the contact information to where I need to send the nodeset ?

opcfoundation-org commented 11 months ago

Sorry this issue was missed. Did you find a way to provide the NodeSet? 2.3 should fix the some recursion issue.s