- This topic has 1 reply, 2 voices, and was last updated 9 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Building SOFA › [SOLVED] Segfault at runSofa start in the logger
Hi,
Since a recent update on my old computer (ubuntu 10.04). I don’t have the problem on another pc with ubuntu 14.04.
When I start runSofa, it crash inside the Console class.
in struct ColorType
ColorType() : value(DEFAULT_COLOR.value) {}
give me a segfault in string. I had to replace it by
ColorType() : value(“”) {}
And then in a more general way, in the logger, I had to comment those lines:
TTYLogger::TTYLogger()
{
m_prefixes[Logger::Debug] = “[DEBUG] “;
m_prefixes[Logger::Info] = “[INFO] “;
m_prefixes[Logger::Warning] = “[WARNING] “;
m_prefixes[Logger::Error] = “[ERROR] “;
m_prefixes[Logger::Exception] = “[EXCEPTION] “;
// m_colors[Logger::Debug] = Console::DEFAULT_COLOR;
// m_colors[Logger::Info] = Console::BRIGHT_GREEN;
// m_colors[Logger::Warning] = Console::BRIGHT_YELLOW;
// m_colors[Logger::Error] = Console::BRIGHT_RED;
// m_colors[Logger::Exception] = Console::BRIGHT_PURPLE;
}
as it was doing a seg fault in the console again, in the structure here:
void operator= ( const ColorType& c ) { value=c.value; }
void operator= ( const Console::SystemColorType& v ) { value=v; }
I don’t understand how those structure are supposed to be created by calling themself DEFAULT_COLOR.value
Thanks for your help
Erik
I stumbled upon the same issue. The crash was caused by the use of unitialized global variables (Console::*
) when creating a TTYLogger
at load time (see 589f70b7).
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.