5413
XL2; 0x800103FF Task Error
XL200

Title: Increase task stack sizes to restore headroom lost in the compiler change

The controller build was moved to the C++Builder compiler, which lays out function stack frames less tightly than the previous Borland compiler. The same source now uses roughly a third more stack, with no change in behavior or execution speed. This quietly reduced the free space on every task's stack.

As a result, several tasks were left with stacks too small to hold their deepest call path together with the interrupt handlers, which run on whichever task's stack is active. When a task overruns its stack it writes past the end of its stack memory and corrupts the neighboring heap record. The damage is caught later -- most visibly as a heap delete task error (800103FF) when that task is deleted, but it can also disturb other data. Repeated 800103FF errors tied to the rotary/press task were seen in the field on at least one machine, and the same loss of headroom put several other small-stacked tasks at risk.

The operating-system minimum task stack size was raised from 0x400 to 0x600 bytes, and individual task stack sizes were increased to cover each task's worst-case usage with margin for interrupt nesting. The deepest tasks -- the rotary motion task, the rotary run-time calculation task, the Modbus task, the firmware update task, and the part-print task -- were raised to 0x1000. A group of moderately deep tasks, including the gag/press tasks, the tile-machine press task, the slave-device task, and the axis-move tasks, were raised to 0x800. The remaining tasks were brought up to the new 0x600 minimum.

The worst-case figures were determined by analyzing the released ROM image. They are a conservative lower bound -- static analysis cannot fully follow recursion or indirect (virtual) calls -- with additional margin added for the interrupt handlers, and the chosen sizes include that margin. Stack overflow is the best-supported explanation for the observed heap-delete errors, though it is not the only possible cause of that error.

Model Version Released
XL2CL 5.110.1 10/15/2026
XL2OL 5.110.1 10/15/2026
XL220CL 5.111.0 10/21/2026
XL220OL 5.111.0 10/21/2026
XL2CL 4.110.1 10/15/2026
XL2OL 4.110.1 10/15/2026
XL220CL 4.111.0 10/21/2026
XL220OL 4.111.0 10/21/2026