This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Closed.

  • Hello,

    Are you calling the associated "vxRelease" API's corresponding to the OpenVX objects you are utilizing?  For instance, the OpenVX graph can be released using vxReleaseGraph and the OpenVX context can be released using vxReleaseContext.

    Regards,

    Lucas

  • Also, which SDK version are you using?

    Regards,

    Lucas

  • Hi, we use SDK version 7.2. Under normal conditions, vxReleaseContext and vxReleaseGraph can be executed. But sometimes, the program crashed, now the graph and context could not be released. How can we release these graphs, nodes and context?

    Regards,

    Gui

  • Hello,

    I received the below response from a colleague on this point.  Please let me know if this helps resolve your issue:

    This can be done via signal handling in the application. Almost all the apps under vision_apps/apps/ptk_demos implement signal handling. An example is vision_apps/apps/ptk_demos/app_sde

    Here is the deal though:

    1. The apps were designed to catch CTRL-C (SIGINT) signal and perform a controlled clean-up.
    2. For faults, you need to register the handle for SIGTERM. The same signal handler can be registered for multiple signals. The call back invokes the handler with the signal id which can be multiplexed inside the handler to take action based on what the signal is.
    3. There is no general solution here and the clean-up process depends on your application design. The following is done in the PTK app design:
      1. Register a signal handler for SIGINT
      2. Implement a control inside for different data and event processing threads such that these threads can exit based on individual control flags and this flag is set from the logic invoked from the signal handler.
      3. Once the signal is trapped, set different flags, wait for the threads to exit and then perform a clean-up

    You might not have this luxury when dealing with SIGTERM (segfault etc) so the clean up might follow a different logic. Nevertheless, this should give you control in trapping the signal, clean-up whatever you can and get out.

    One instance where clean-up could result in hangs is that:

    1. The application caught an exception while some graph is in the middle of processing
    2. The signal handler starts the clean-up process
    3. The clean-up hits a portion of the code locked by the graph which is in the middle of processing so cannot get through.

    Regards,

    Lucas