Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Georg Baum
Am Mittwoch, 18. Oktober 2006 16:19 schrieb Jean-Marc Lasgouttes: > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > > Georg> Abdelrazak Younes wrote: > >> And then in lyxlex_pimpl.C, line 76: > >> > >> lyx::docstring const LyXLex::Pimpl::getDocString() const { > >> std::vector res = utf

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Abdelrazak Younes wrote: >> And then in lyxlex_pimpl.C, line 76: >> >> lyx::docstring const LyXLex::Pimpl::getDocString() const { >> std::vector res = utf8_to_ucs4(buff); >> >> here buff is empty, hence the crash. Georg> Thanks for

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Abdelrazak Younes
Georg Baum wrote: Abdelrazak Younes wrote: And then in lyxlex_pimpl.C, line 76: lyx::docstring const LyXLex::Pimpl::getDocString() const { std::vector res = utf8_to_ucs4(buff); here buff is empty, hence the crash. Thanks for debugging. I don't understand LyXLex at all. me neither... Abde

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Georg Baum
Abdelrazak Younes wrote: > And then in lyxlex_pimpl.C, line 76: > > lyx::docstring const LyXLex::Pimpl::getDocString() const > { > std::vector res = utf8_to_ucs4(buff); > > here buff is empty, hence the crash. Thanks for debugging. I don't understand LyXLex at all. Is it normal for buff to be e

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello, I had a crash in utf8_to_ucs4() when loading a Abdelrazak> document which had an empty inset apparently (Intro.lyx). Abdelrazak> The following commit adds some sanity checks to unicode.C

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Georg Baum
Abdelrazak Younes wrote: > You're right. It was in InsetCommandParam IIRC, I'll remove the check > and see if I can reproduce it. It is perfectly valid for a parameter of InsetCommandParams to be empty, so utf8_to_ucs4() definitely needs to handle empty input. Nevertheless it would be nice if you

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello, I had a crash in utf8_to_ucs4() when loading a Abdelrazak> document which had an empty inset apparently (Intro.lyx). Abdelrazak> The following commit adds some sanity checks to unicode.C

Re: [Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello, I had a crash in utf8_to_ucs4() when loading a Abdelrazak> document which had an empty inset apparently (Intro.lyx). Abdelrazak> The following commit adds some sanity checks to unicode.C. It would be nice to kn

[Commit] Fix crash when loading Intro.lyx

2006-10-18 Thread Abdelrazak Younes
Hello, I had a crash in utf8_to_ucs4() when loading a document which had an empty inset apparently (Intro.lyx). The following commit adds some sanity checks to unicode.C. Abdel. URL: http://www.lyx.org/trac/changeset/15362 Log: add some sanity checks. Modified: lyx-devel/trunk/src/supp