Custom code throws exception only when debugging.

Custom code throws exception only when debugging.

mischa_spelt
Advisor Advisor
537 Views
3 Replies
Message 1 of 4

Custom code throws exception only when debugging.

mischa_spelt
Advisor
Advisor

[ FlexSim 19.2.2 ]

Hi,

I added the following code to a Custom Code activity in Process Flow

/**Custom Code*/
Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);


int streamId = getstream( activity );
int row = 1;
Table distribution = Table("ContainerAttributeDistribution");


return 0;

and get the helpful error message

time: 0.000000 exception: FlexScript exception: MODEL:/Tools/ProcessFlow/ProcessFlow/Sample attributes>variables/codeNode

on the line declaring streamId when I put a breakpoint in the code.

codewithdebugbreaks.fsm

Any idea what goes wrong?

0 Likes
Accepted solutions (1)
538 Views
3 Replies
Replies (3)
Message 2 of 4

philboboADSK
Autodesk
Autodesk
Accepted solution

This is fixed in 19.2.3.

See https://answers.flexsim.com/answers/73583/view.html



Phil BoBo
Sr. Manager, Software Development
Message 3 of 4

mischa_spelt
Advisor
Advisor

Phil, just out of curiosity: did you also upgrade the Visual Studio project for 19.0 and if so, between which versions? Is it possible that e.g. 19.0.5 and 19.0.6 also have some subtle bugs?

0 Likes
Message 4 of 4

philboboADSK
Autodesk
Autodesk

No, it was upgraded on the 19.2 branch.



Phil BoBo
Sr. Manager, Software Development
0 Likes