Assertion failed in QM version 2.3.2 module codec:346. I was adding a guard at the time. The model containing this guard will crash QM consistently. This is a QP Nano model that is built as an assembly of five AO components.
This assertion fires when you have more than 15 levels of indentation in your code. This is indicative of a very convoluted design. (Actually, the 15-levels of IF-ELSE is the number Jack Ganssle used in one of his articles to describe a proverbial spaghetti code.) This type of spaghetti code is exactly what state machines are supposed to eliminate.
Most likely you are doing something like a very long chain of choice-segments (nested guard conditions). This is typically indicative of not using enough states, but instead of making all decisions in the guard conditions.
--MMS
Last edit: Quantum Leaps 2014-01-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This problem should be fixed in QM 3.x. This version checks the depth of nesting of choice segments and reports a code-generation error when the depth exceeds 10 levels. Consequently, the indentation of the code cannot exceed 15 levels, whereas up to 3 additional levels are needed for indenting actions in the generated state-handler function.
--MMS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This assertion fires when you have more than 15 levels of indentation in your code. This is indicative of a very convoluted design. (Actually, the 15-levels of IF-ELSE is the number Jack Ganssle used in one of his articles to describe a proverbial spaghetti code.) This type of spaghetti code is exactly what state machines are supposed to eliminate.
Most likely you are doing something like a very long chain of choice-segments (nested guard conditions). This is typically indicative of not using enough states, but instead of making all decisions in the guard conditions.
--MMS
Last edit: Quantum Leaps 2014-01-03
This problem should be fixed in QM 3.x. This version checks the depth of nesting of choice segments and reports a code-generation error when the depth exceeds 10 levels. Consequently, the indentation of the code cannot exceed 15 levels, whereas up to 3 additional levels are needed for indenting actions in the generated state-handler function.
--MMS