On Sun, Jul 05, 2015 at 07:28:34PM +0100, Guillaume M-M wrote:
> Le 05/07/2015 18:06, Enrico Forestieri a écrit :
> >
> >Thanks for the reproducers. They evidence that the problem is due to
> >the fact that MathData::metrics is not called when instant preview is
> >on. I had tried to solve this issue by trying to update the relevant
> >pointers when needed, but it seems that this causes issues with respect
> >to the cursor position in some circumstances. In the attached patch
> >for stable no attempt is made to call Buffer::getMacro and instead
> >the macro_ pointer is updated by letting it point to the last known
> >good copy of the MacroData. In this way I cannot succeed in triggering
> >the assertion anymore. Please, test it with your non-minimal example
> >and report back whether it solves the issue.
> >
> 
> 
> Thanks, I can no longer trigger the segfault with your patch.

Ok, I committed the patch to master. Richard, I fear this is also needed
for stable.

> By the way, you probably noticed that the preview in
> lyx-segfault-dataloss.lyx fails, because \mathscr is not defined.

Yes, it seems that it is due to the fact that the math inset is inside
a LyX note. It also occurs with 2.1.3, so this is not a regression.

-- 
Enrico

Reply via email to