Exception::toMessageString( const char *file, const char *line, const std::string &message ) const
std::string msg = "\n *** ERROR(";
// not to confuse our local basename() with gbxutilacfr::basename()
msg += this->basename(file);
msg += ":";
msg += line;
msg += "): " + message;
In basename it is supposed that s contains a "/" or "\\" for WIN32, but this is not true always so strrchr returns NULL+1 in this cases.
In our system gcc compiles files with absolute paths, so __FILE__ is substituted with a file name without any slash, making my programs SEGFAULT whenever an exception is thrown.
The bug could be solved easily checking the return of strrchr.