Jean-Marc Lasgouttes a écrit :
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Jean-Marc Lasgouttes a écrit :
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Did you try my suggested fix for output_latex? I cannot
Abdelrazak> verify it because I can't make mingw use safe_iterator. In
Abdelrazak> other word are you sure that it is not a problem of
Abdelrazak> output_latex instead?
I did not try it yet, but I do not see why it would assert with
your container and not with a vector (which has the same checks for
end).
Abdelrazak> Because std::vector puts data in a contiguous way in
Abdelrazak> memory and it1-it2 is valid even if it1 is past end()
The question is: how can it1 go past end without being noticed at all?
I think the iterator pass past end but is not used. But even if it is
used, I think std::vector would always reserve some memory at the end
and, in this case, the paragraph would be empty. That's just a guess.
I am wary of applying patches that cure symptoms. I did not see in my
admittedly short look why the patch was good.
If I am right (not sure I am). The attached patch is simple enough and
would cure a bug, not a symptom. My paragraphList patch did not cure the
symptom but reveals it.
Abdel.
Index: D:/msys/home/yns/src/lyx-svn/trunk/src/output_latex.C
===================================================================
--- D:/msys/home/yns/src/lyx-svn/trunk/src/output_latex.C (revision 13299)
+++ D:/msys/home/yns/src/lyx-svn/trunk/src/output_latex.C (working copy)
@@ -221,6 +221,10 @@
{
lyxerr[Debug::LATEX] << "TeXOnePar... " << &*pit << " '"
<< everypar << "'" << endl;
+
+ if (pit == paragraphs.end())
+ return pit;
+
BufferParams const & bparams = buf.params();
bool further_blank_line = false;
LyXLayout_ptr style;