[metapost] mpost 1.9991: segmentation fault
luigi scarso
luigi.scarso at gmail.com
Thu Nov 24 18:39:09 CET 2016
On Mon, Oct 31, 2016 at 12:25 PM, luigi scarso <luigi.scarso at gmail.com> wrote:
> On Mon, Oct 31, 2016 at 10:48 AM, Toby Thurston <thurston at eml.cc> wrote:
>>
>>> Message: 1
>>> Date: Fri, 30 Sep 2016 16:01:20 +0200
>>> From: luigi scarso <luigi.scarso at gmail.com>
>>> To: Nicola <nvitacolonna at gmail.com>
>>> Cc: MetaPost List <metapost at tug.org>
>>> Subject: Re: [metapost] mpost 1.9991: segmentation fault
>>> Message-ID:
>>> <CAG5iGsAdkeFfh8DZA8juznYfE+8CWLw9+PC91__b5iiJcfVccg at mail.gmail.com>
>>> Content-Type: text/plain; charset="UTF-8"
>>>
>>> On Mon, Sep 26, 2016 at 8:22 PM, Nicola <nvitacolonna at gmail.com> wrote:
>>>> Not sure if this is the right place to report bugs, but anyway:
>>>>
>>>> ]mpost
>>>> This is MetaPost, version 1.9991 (TeX Live 2016) (kpathsea version 6.2.2)
>>>> **\
>>>> (/usr/local/texlive/2016/texmf-dist/metapost/base/mpost.mp
>>>> (/usr/local/texlive/2016/texmf-dist/metapost/base/plain.mp
>>>> Preloading the plain mem file, version 1.005) )
>>>> *(t1,t2,t3,t4,t5) = (1,2,3,4,5);
>>>> ! Missing `)' has been inserted.
>>>> <to be read again>
>>>> ,
>>>> <*> (t1,t2,t3,t4,
>>>> t5) = (1,2,3,4,5);
>>>> ?
>>>> Segmentation fault: 11
>>>
>>> The problem seems to be a wrong (i.e partial) initialization of a cmyk node .
>>> I have a patch on my local box, I need to test it a bit.
>>>
>>> --
>>> luigi
>>
>> I see a very similar bug when trying to assign to a “transform” variable.
>>
>> eg
>>
>> show mpversion;
>> transform T; T = (1,2,3,4,5,6);
>> end
>>
>>
>> produces:
>> This is MetaPost, version 1.9991 (TeX Live 2016) (kpathsea version 6.2.2) 31 OCT 2016 09:41
>> **t.mp
>> (/usr/local/texlive/2016/texmf-dist/metapost/base/mpost.mp
>> (/usr/local/texlive/2016/texmf-dist/metapost/base/plain.mp
>> Preloading the plain mem file, version 1.005) ) (./t.mp
>>>> "1.9991"
>> ! Missing `)' has been inserted.
>> <to be read again>
>> ,
>> l.2 transform T; T = (1,2,3,4,
>> 5,6);
>> ?
>>>> (xpart T,ypart T,xxpart T,xypart T,yxpart T,yypart T)
>>>> (1,2,3,4)
>> ! Equation cannot be performed (transform=cmykcolor).
>> <to be read again>
>> ,
>> l.2 transform T; T = (1,2,3,4,
>> 5,6);
>> ?
>> ! Extra tokens will be flushed.
>> <to be read again>
>> ,
>> l.2 transform T; T = (1,2,3,4,
>> 5,6);
>> ?
>> )
>>
>> This is using a version of mpost that I compiled this morning using the latest source from your svn.
>>
>> I’ve opened an issue report on the bug tracker.
>>
>> Toby
>>
>>
>>
>> --
>> http://tug.org/metapost/
>
> ok, thank you for the report.
>
> --
> luigi
With the latest context and luatex from experimental
\starttext
\startMPpage
transform G;
G = (a,b,c,d,e,f);
show G;
\stopMPpage
\stoptext
gives
! Missing `)' has been inserted.
<to be read again>
,
<*> transform G; G = (a,b,c,d,
e,f); show G; ;
I found no right delimiter to match a left one. So I've
put one in, behind the scenes; this may fix the problem.
>> (xpart G,ypart G,xxpart G,xypart G,yxpart G,yypart G)
>> (a,b,c,d)
! Equation cannot be performed (transform=cmykcolor).
<to be read again>
,
<*> transform G; G = (a,b,c,d,
e,f); show G; ;
I'm sorry, but I don't know how to make such things equal.
(See the two expressions just above the error message.)
! Extra tokens will be flushed.
<to be read again>
,
<*> transform G; G = (a,b,c,d,
e,f); show G; ;
I've just read as much of that statement as I could fathom,
so a semicolon should have been next. It's very puzzling...
but I'll try to get myself back together, by ignoring
everything up to the next `;'. Please insert a semicolon
now in front of anything that you don't want me to delete.
(See Chapter 27 of The METAFONTbook for an example.)
>> (xpart G,ypart G,xxpart G,xypart G,yxpart G,yypart G)
[1]
1 \starttext
2 \startMPpage
3 transform G;
4 G = (a,b,c,d,e,f);
5 show G;
6 >> \stopMPpage
7 \stoptext
and no seg. fault.
Note that if t is a transform then
it cannot be initialise with a six-upla (e.g. t := (0,0,1,0,0,1) ; )
as we can do with rgb and cmyk type --- this is by design.
Also , if t := identity;
t = (0,0,1,0,0,1);
is again an error.
--
luigi
More information about the metapost
mailing list