V9017¶
- Code
V9017
- Message
Container declares a maximum call depth of zero which is invalid
The container’s declared worst-case call depth
(FileHeader.max_call_depth) is zero. The VM rejects the container
when it is loaded, before any code runs, so no PLC instructions execute.
Every program needs at least one call frame for its entry function, so
codegen always computes a depth of one or more (the longest path through
CALL and user-FB_CALL edges, counting the entry frame). A declared
depth of zero therefore means the field was never populated — a legacy or
hand-built container.
To resolve:
Recompile the program so codegen writes a valid
max_call_depth.If you build containers by hand, set
max_call_depthto the program’s true worst-case call depth (at least1).
Think IronPLC is wrong about this?
If you believe this diagnostic is incorrect, open an issue on GitHub with a small sample that demonstrates the problem.