We are using SendMessage PlayStop, Goto, and Playforward on regular time intervals to display a video clip on a loop. It works most of the time, but periodically the application will hang on the Goto SendMessage. Is there something we should be looking at? The Debug Trace displays no error messages. Is there a preferred method for performing this type of activity?
I would recommend using PostMessage for those messages as they do not provide any response anyways, but most likely that will not be enough to fix the problem (worth a try though).
Which version of the SDK are you using?
Are you sending the messages from UI thread?
Will the application hang forever or just for a while? If it hangs forever would it then be possible for you to break it in the debugger and post the stack trace here?
The stop call is a SendMessage, but the Goto that is hanging is a PostMessage. We are using 18r2. The restart loop code is running on the UI thread. Best we can tell it hangs forever. Are there recommendations on when to not use the UI thread?
In general it should be okay to do such commands from the UI thread unless you have something else listening on some spin-off call (like time changed) which would then create a deadlock.
You cannot break it in Visual Studio and see the stack trace when it hangs?
Is there a document that describes how to avoid deadlocks? We have several cameras that are all on the same loop. We noticed that it does appear to happen if the same camera is displayed twice. All cameras will have there own playback controller, but for testing purposes we are reutilizing the same cameras. Should we run the PostMessage calls in a different thread?
No there is no such document and in most cases it is not an issue.
Again, it would be helpful if you could get a look at the call stack when this happens.
We are coordinating the retrieval of the call stack. At the moment, I have the code in front of me but not the runtime environment.