On Thu, Nov 20, 2014 at 09:04:39PM +0100, Georg Baum wrote:
> Abdelrazak Younes wrote:
> > I believe that there could be many reasons that could cause a crash
> > before incriminating the stl string, etc:
> > * Gui elements (message passing?)
> > * Graphics preview elements
> 
> I don't think so in this case. The crash happens because internal 
> std::basic_string members are corrupt, and it is almost always a string 
> created from Language::babel_. Furthermore, I was not able to reproduce the 
> crash after changing
> 
> std::string const & babel() const { return babel_; }
> 
> to
> 
> std::string const babel() const { return babel_.c_str(); }
> 
> in Language.h (which circumvents copy-on-write).

Cannot a deep copy be forced after cloning? What about recursing over
all non-const strings and doing something like str = str.c_str() ?

-- 
Enrico

Reply via email to