Bug in Lyx 1.3.4 ?

Jean-Marc Lasgouttes lasgouttes at lyx.org
Fri Feb 7 10:19:03 UTC 2020


Le 07/02/2020 à 08:32, Enrico Forestieri a écrit :
> On Thu, Feb 06, 2020 at 10:36:30PM +0100, Stephan Witt wrote:
>> But some cases I’d like to point out:
>>
>> InsetMathSpace::doDispatch() calls createInsetMath_fromDialogStr()
>> createInsetMath_fromDialogStr calls mathed_parse_cell()
>> mathed_parse_cell() calls Parser() with NULL buffer
>>
>> Similar is the call to createInsetMath_fromDialogStr in
>> InsetMathRef::doDispatch() and InsetMathRef::changeTarget().
>>
>> These look dangerous too, IMO. What do you think?
>> Do you know how to trigger this pieces of code?
> 
> It is hard to tell how dangerous they are. As said, in most cases the
> validity of the buffer member is checked before being used. So, having
> a null there is not troublesome for most code paths. However, it can
> bite in certain cases. In the case at hand, the buffer has always been
> null but, not being used in certain code paths, it has never been a
> problem.

Note that in master the background of insets that do not have a valid 
buffer_ is marked in red. I am not sure how effective it is in mathed, 
but it works in text. This check is only active in devel-mode (which can 
be toggled now).

JMarc



More information about the lyx-devel mailing list