alogrep 0 Posted February 10 I received a message from vcl.dialogs that sai=ys something about a criticalsection conflict (unfortunately I did not write down the message, and is hard to reproduce. It happend twice, then in a dozen trials doing the identical steps it did not show up). I have a Tcriticalsection instance defined in one of my units and it is used in a thread, but it is always used in a acquaire/release pair in a try/finally block. This happened in the IDE, where I have some breakpoints and I stopped the execution for several seconds. Share this post Link to post
aehimself 391 Posted February 11 In my experience when timing can cause errors it always can be tracked back to incorrect thread data / UI access. - Instead of just one critical section have one for each of your properties and enter / leave in every getter and setter. - Make sure none of your thread accesses any UI elements directly (e.g. Form1.Memo1.Text) - Make sure that every callback what your thread has is properly synchronized - A dialog IS a part of the VCL thread. Do not show any dialog boxes in any threads! Share this post Link to post
Dalija Prasnikar 1382 Posted February 11 Did the message came from the IDE or your application? Without having the message text and your code it is hard to diagnose what is wrong. Also, there are no critical sections in Vcl.Dialogs. Share this post Link to post
Remy Lebeau 1330 Posted February 11 9 hours ago, Dalija Prasnikar said: Also, there are no critical sections in Vcl.Dialogs. And even if there was, critical sections are not named kernel objects, so they can't interfere with each other. 2 Share this post Link to post