Yuri Dario wrote:
Hi,

after implementing a SalTimerProc similar to 2.0.4 win32
implementation, I found a strange deadlock situation.

In my .3 source code, I was using a similar code which was not testing
the mbInTimerProc flag, thus allowing recursive calls to the timer
callback.

Now I discovered some situations leading to unpainted windows; e.g.
draw a circle object in a writer document, then right click on it and
choose 'lines...' from popup menu: the dialog opens but is not painted
at all, the same applies to OOo document window. Closing this dialog
restores painting for doc window.

There were cases of such dialogs in Windows, too, when the paint handling changed slightly. That is why in the windows part there is now the SALTIMERPROC_RECURSIVE, which tells that some timers can be executed recursively. Have you copied that part, too ? The recursive part is only triggered if a paint timer and system paint events are pending; see vcl/win/source/window/salframe.cxx:

ImplPostMessage( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_POSTTIMER, 0, nCurTime );

which triggers the recursive handling.


debugging the code, showed that the second paint events is triggered by
a timer callback while the first one (again started from the timer
callback) is not complete.

what do you think?

is it safe for me to skip checking the mbInTimerProc flag as in .3
code? or should I investigate why the painting is taking a so long
time? or others?

Doing generally recursive timers is probably a bad thing since it can easily lead to an endless loop where stack levels build up until the program crashes; you just need one timer handler that takes too long and calls Application::Reschedule to end up in that situation.

Kind regards, pl

--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
     -- Author unknown

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to