AddPendingEvent between threads crashes on Mac
Robert Roebling
robert at roebling.de
Fri Jun 1 03:49:08 PDT 2007
> void MyThread::SendProgress(int progress)
> {
> wxCommandEvent event(myEVT_PROGRESS);
> event.SetInt(progress);
> m_Dialog->AddPendingEvent(event);
> }
>
> On the mac this causes an occasional crash. [...]
>
> The worker thread:
> 0 semaphore_wait_signal_trap + 7
> 1 MPEnterCriticalRegion + 190
> 2 PostEventToQueueInternal + 234
> 3 PostEventToQueue + 51
> 4 wxMacWakeUp() + 200
> 5 wxWakeUpIdle() + 33
> 6 (the AddPendingEvent call)
Did you have a look at src/mac/carbon/utils.cpp, wxMacWakeUp()?
There is a comment about a race condition there (in my version
of that file). What version of wx are you using?
Robert
More information about the wx-users
mailing list