Peter Kümmel wrote: > Bo Peng wrote: >>>> This is serious for me to want to fix before the first beta is >>> released. >>> OK, one last step before the beta! >> I would like to have http://bugzilla.lyx.org/show_bug.cgi?id=3132 >> fixed before a beta. This crash is serious enough that I can not >> compile any of my long documents. >> >> Of course, I do not have time for this bug and Michael need to decide >> if a beta can wait for this. >> >> Bo >> > > > With attached file LyX crashes under Linux but not under Windows.... >
Here a work-around. Any ideas for a solution? If not, I'll check in tomorrow. -- Peter Kümmel
Index: src/support/lyxsum.C =================================================================== --- src/support/lyxsum.C (revision 17154) +++ src/support/lyxsum.C (working copy) @@ -107,7 +107,16 @@ unsigned long do_crc(InputIterator first, InputIterator last) { boost::crc_32_type crc; - crc = std::for_each(first, last, crc); + // FIXME wrong parameters + try { + crc = std::for_each(first, last, crc); + } catch (std::ios_base::failure& ex) { + lyx::lyxerr[lyx::Debug::FILES] + << "error in lyxsum.C/unsigned long do_crc():" + << ex.what() + << std::endl; + return 0; + } return crc.checksum(); }