in order to avoid starting crashed due to API provided by applications not running, I´ve tried to use [optional] or [manual-start] options for the API y the definition file, but always get a segmentation fault 11.
@idiaz,
We are not very clear with your explanation, Please provided more details on the issue you are facing and also the .cdef file which you are using.
Also below link provides you the complete information on .cdef file
[optional] or [manual start]
I choose the options because:
Sometimes de server (providing the api) may not be in a running state.
If no option is selected, when running the client, this automatically crash. But maybe, the client sometimes won’t need the api (or the use is delayed in the program)
So I set the options to allow the client run without necessity of the server already running.
I find out this situation with both apps with auto start options, the client runs before the Server.
Hi @idiaz,
Are you calling the myAppIPC_Connectservice() function from the client to connect to the server with [optional] or [manual start] options set in .cdef?
@idiaz,
With options set you are able to call the myAppIPC_Connectservice() and server starts, Then you try to call the server function to do some work and then there will be a segmentation fault ??
Hi @idiaz,
See that i have attached very simple applicationipc.zip (3.4 KB)
) with [manual-start] option, which is modified version of one of the legato sample App. I have tested starting and without starting the server, I don’t see any crash.
Let me know if this helps you.
Performing a deep code review I found the problem, we had a TryConnectService instead of ConenectService. The problem here is TryConnect was used as ConnectService, ignoring returned value, provoking the error when call the api.
Besides, it was the first function called in the client…