Running light in FC8 gives error recursive function call

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
theopieleke
Posts: 10
Joined: Thu Jan 29, 2015 11:45 am
Been thanked: 3 times
Contact:

Running light in FC8 gives error recursive function call

Post by theopieleke »

Hello,

I'm having trouble finding out what's wrong with this program.
In simulation (FC8) it works fine, but when we try to convert it to a hex-file we get this message:

running_light_recursive_problem.c: 1642: (1089) recursive function call to "_FCM_rechts_links"
running_light_recursive_problem.c: 1708: (1089) recursive function call to "_FCM_links_rechts"
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1
Autoclose turned off
FINISHED

Greetings,
Theo
Attachments
running_light_recursive_problem.fcfx
(16.48 KiB) Downloaded 85 times

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Running light in FC8 gives error recursive function call

Post by Steve »

This error shows your program could fail because those two functions could call each other and you could cause an internal overflow. In fact you can simulate this by changing your switches to "latching" and then setting them both on. Your program will eventually crash even in simulation because the call stack overflows.

You will need to change how your program operates so that this recursion cannot happen.

Post Reply