wxPostEvent Segmentation Fault when not in wxThread Entry() method

Robert Easton mark63 at azurebell.co.nz
Wed Jan 2 19:31:44 PST 2008


This problem has been driving me crazy! I have been working on it ALL DAY -
so please, please, if someone can help me I would really appreciate it. I
need to be ablt to send strings from my logger class to my event handler in
my MainFrame. 

My logger class is being used by all classes in my worker thread.


Robert Easton wrote:
> 
> I want to post a simple event to my MainFrame (to a TextCtrl) from my
> worker thread. When I do this from within the Entry() method in my thread
> all is fine. But if I try to do it from another method then I get a
> segmentation fault every time! Can anyone advise what the problem might
> be?
> 
> MY code is :
> 
> wxCommandEvent event(wxEVT_ME_EVENT);
> event.SetString("Howdy\n");
> wxPostEvent( m_MainWindow, event);
> 
> I have a pointer to m_MainWindow saved in my thread class.
> 
> Mark
> 
> 

-- 
View this message in context: http://www.nabble.com/wxPostEvent-Segmentation-Fault-when-not-in-wxThread-Entry%28%29-method-tp14590443p14591179.html
Sent from the wxWidgets - Users mailing list archive at Nabble.com.




More information about the wx-users mailing list