Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Create custom event in thread will SIGILL
(1/1)
Falldog:
I try to write a plugin and create a custom wxThread
When I create an instance of custom event, will receive SIGILL, and the crash!
--- Quote ---PyTaskEvent event( wxEVT_PYTASK, -1 );
--- End quote ---
I can create event normal in plugin(main thread?)
I try to create wxCommandEvent, fail too.
Why?
???
MortenMacFly:
--- Quote from: falldog on September 13, 2012, 09:31:22 am ---Why?
--- End quote ---
Platform, version, pre-requisite (looks like Python), steps to reproduce, sample code?
Falldog:
I found the root cause...
It cause on next instruction
--- Quote ---char msg[1024] = {0};
// ...
PyTaskEvent event( wxEVT_PYTASK, -1 );
event.SetString(wxString::Format(_T("SocketThread %d\n%s"), count, wxString::FromUTF8(msg)));
--- End quote ---
Crash at Format convert wxString to %s!?
CB will stop callstack at "PyTaskEvent event( wxEVT_PYTASK, -1 );"
Sorry to bother you...
BTW, where can I found wxString::Format() parameter mapping with wchar_t*, char* and wxString?
oBFusCATed:
--- Quote from: falldog on September 13, 2012, 03:19:23 pm ---BTW, where can I found wxString::Format() parameter mapping with wchar_t*, char* and wxString?
--- End quote ---
Probably here: http://docs.wxwidgets.org/stable/
Or here: http://svn.berlios.de/wsvn/codeblocks/trunk/src/include/globals.h?peg=8383 (we have some string conversion functions).
Navigation
[0] Message Index
Go to full version