A little update. I think I forgot to mention one thing. My multi-threaded application continuously writes to disk sectors; calculates speed; writes the log to a file; also updates the log to a PtMultiText continuously. One non-photon thread is doing log file write and multitext update. I am using PtMultiTextModifyText() function to add/delete entries from multi-text. That is, when the log entries reach some limit in the PtMultiText widget, I need to delete some old entries from the PtMultiText widget and this works periodically. I have done updates to PtMultiText widget within a PtEnter()…PtLeave() block.
This is my pseudo code:-
if deletion condition is satisfied
for loop to get the length of 100 lines
PtMultiTextModifyText - to delete those 100 lines
PtMultiTextModifyText - to add the new line
PtSetResource(vertical scroll pos)
Even now, if my application is put for a continuous run, it hangs after some time in an Intel Xeon E5540 machine. No issues when testing is done with single core/dual core machine. I couldn’t find any possibility of race condition in my application on code analysis. Now I doubt if there is some issue in continuous update in PtMultiText. On reading through QNX help pages, I saw some functions like PtHold(), PtRelease(), PtContainerHold(), PtContainerRelease() etc. The help says these are used to force/delay display update. I was not aware of any of these functions and I haven’t used any in my application.
My doubt is that:- Is there any issue like when my non-photon thread is constantly updating the PtMultiText and suddenly the display is updated and this causes the system hang? What is the purpose of using PtHold(), PtRelease(), PtContainerHold(), PtContainerRelease() etc? I haven’t understood it clearly. Is the hang issue in my application caused due to the absence of these functions?
could you please share your thoughts on this issue?