access violation when posting an event from a thread
Thomas Zehbe
tz at thomas-zehbe.de
Wed Apr 30 09:56:33 PDT 2008
Hi,
I'm running 2.8.7 on windows in unicode mode. I have an app running a thread,
which reads from the serial line and sends data to the app via
wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED,
SAM_EVENT );
event.SetClientData((void*)buf);
wxPostEvent(win, event);
where win is a pointer to a frame.
The stack dump is:
wxWindow::GetHWND() line 156 + 10 bytes
wxApp::WakeUpIdle() line 545 + 14 bytes
wxWakeUpIdle() line 648
wxEvtHandler::AddPendingEvent(wxEvent & {...}) line 1153
wxPostEvent(wxEvtHandler * 0x01271db8, wxEvent & {...}) line 2566
Sam::getdata() line 258 + 19 bytes
SamThread::Entry() line 268
wxThreadInternal::DoThreadStart(wxThread * 0x01b17d48) line 530 + 11 bytes
wxThreadInternal::WinThreadStart(void * 0x01b17d48) line 557 + 9 bytes
_threadstartex(void * 0x01b17e08) line 227 + 13 bytes
KERNEL32! 77e7987c()
This app works on linux (OpenSuSE 10.3) well without this problem.
Any hints would be appreciated.
Regards,
Thomas
--
Dipl.-Ing. Thomas Zehbe
Kuhweide 6
31552 Apelern
More information about the wx-users
mailing list