AlertEvent::AlertEvent(const std::string& text) : IMEvent(kIMEventAlert, alertText.c_str()), alertText(text) { //inspection at time of crash shows alertText is a valid string } IMEvent::IMEvent(long eventID, const char* details) { //during construction, details==0xcccccccc }
on a related note, the monospace font looks really terrible in chrome, whats up with that?
alertText may be shown as a string in a debugger, but it has not been constructed yet (and therefore alertText.c_str() will return an indeterminate pointer).
To avoid this, one could initialize use text.c_str() as an argument to the IMEvent ctor.