Richard Heck wrote:

> http://bugzilla.lyx.org/show_bug.cgi?id=3401
> 
> The attached patch addresses this bug. Or part of it. It doesn't have
> anything to do with pushing references: "citation-insert whomever"
> causes the same crash. It seems that LFUN_CITATION_INSERT wasn't updated
> to the new file format. That said, I'm not at all sure that
> from_local8bit was the right thing to use here. I was just guessing. So
> please tell me what I should have used.

from_utf8. The communication with the lyxserver is in utf8.

> There is, however, another issue, and it's not one I think I can solve,
> namely, the crash. What was happening was that in
> insets/insetcommandparams.C, a test is done for a valid command. None
> was being found, and then LyX is segfaulting. I think this was happening
> during the emergency save, as if the existence of the inset had already
> been recorded but then it wasn't being found during the save procedure.

This does not need to be solved, since this can only happen with a
programming errort, and it would have been catched by an assertion.

> The line I was seeing the problem at was:
>         for (size_t i = 0; i < info_->n; ++i)
> in InsetCommandParams::write. I think info_n didn't exist. But I'm not
> sure.

Yes, this happens if you create an invalid InsetCommandParams, and if you
had assertions enabled you would have got one in the constructor.

Thanks for fixing this! Please put it in (with the modifications suggested
by Andre). BTW there are more places that need to be fixed (in mathed, you
see them if you grep for LatexCommand). I'll do that unless you beat me to
it.


Georg

Reply via email to