Error embedding in python [message #1842412] |
Thu, 17 June 2021 23:13  |
Eclipse User |
|
|
|
I am currently developing an application to run multiagent with IEC 61499. For this purpose I am working with SPADE, a python library for multiagentes (embedded in C). The agents are distributed in 3 Raspberry, one of which has 3 agents. Each agent is inside a block that runs a python script embedded in C, and each agent runs in a loop, so I added more than one emb_res in the system configuration. The problem arises when I want to deploy the second emb_res and the message "segmentation fault" appears.
To keep things simple and find the source of the problem I just run a "print" command in a loop for each python script.
To better understand the situation I attach images with the error, the python script, the cpp sourcefile, and the CMakelists.txt file
|
|
|
|
Re: Error embedding in python [message #1842597 is a reply to message #1842416] |
Thu, 24 June 2021 16:27  |
Eclipse User |
|
|
|
While I totaly agree with Martin that a debugger stack trace would be needed to have some hints what could be wrong here, I wanted to give some general comment: IEC 61499 defines FBs to behave algorithmic, which means they should end their execution triggered by an event. IEC 61499 even says that the execution should be rather short. This assumption is needed for 4diac FORTE to get a decent IEC 61499 execution behavior. With your approach your are definitely violating that. But given your comment I would assume that you are doing that on purpose. However I wanted to point out that putting the Phyton part into a background thread and have some interaction between 4diac FORTE FBs and the Phyton part.
|
|
|
Powered by
FUDForum. Page generated in 0.43614 seconds