Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
unnecessory locker in CClogger
ollydbg:
Hi, dmoore, I'm trying to explain that using c_str before the calling of wxPostEvent() is not safe, instead we should derive a new event class, and override it's Clone() function. See my detailed explanation in this post: Re: thread safety issue about wxCommandEvent in wx2.8.12
dmoore:
--- Quote from: ollydbg on June 20, 2013, 05:12:56 pm ---Hi, dmoore, I'm trying to explain that using c_str before the calling of wxPostEvent() is not safe, instead we should derive a new event class, and override it's Clone() function. See my detailed explanation in this post: Re: thread safety issue about wxCommandEvent in wx2.8.12
--- End quote ---
I didn't look closely at what you wrote, but I agree in principle that c_str() is not enough to make the operation safe because we are still making a new wxString on worker thread and accessing it on the GUI thread and can't guarantee the wxString is (still) valid when it gets accessed on the GUI. It does seem to be stable at least some of the time...
Curious to see what you come up with as a solution
ollydbg:
FYI: I commit the fix in rev9311.
dmoore:
--- Quote from: ollydbg on September 11, 2013, 11:37:57 am ---FYI: I commit the fix in rev9311.
--- End quote ---
Nice. I plan to migrate to your new CodeBlocksThreadEvent class with the FileManager plugin (for reasons unknown to me, it occasionally causes C::B to crash and I have long suspected that the cause is related to passing event data across threads).
killerbot:
and this plugin causes on OPenSuse to have CB not shutdown when it is started from app menu, only when started from a console terminal CB can shutdown. Maybe it is related ...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version