Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Oct 2017 12:08:58 -0700
From:      Crew <carborundumcrew@infogalactic.com>
To:        freebsd-perl@freebsd.org
Subject:   Weird issue with PERL hashes on FreeBSD with EasyTimeline.pl that does not occur on RHEL 7.2
Message-ID:  <789ab286c78d90e4077033fb589f3d29@infogalactic.com>

next in thread | raw e-mail | index | archive | help
An issue has turned up, seemingly with PERL hashes on FreeBSD 
10.3-STABLE and 10.3-RELEASE-p21.

It involves a PERL script called EasyTimeline.pl. I have a simple 
reproducer that involves running EasyTimeline.pl with some input data 
(but you also need ploticus installed.)

When run on those two versions of FreeBSD the script will fail something 
like one out of five to seven times, but on RHEL 7.2 it never fails. On 
FreeBSD it will often fail the first time it is run, and then will 
succeed for the next five or so attempts and then fail again.

It seems to relate to one key in a hash being a proper prefix of another 
and the order in which the keys are in the hash. In this case the keys 
are "grid" and "gridcolor".

I can supply the reproducer.

Does anyone have any ideas what might be causing this?

The following shows two sequential executions of the test on FreeBSD 
10.3-RELEASE-p21:

crew@XXXserver:~/timeline-test % sh -vx easytl.sh
/usr/local/bin/perl ./EasyTimeline.pl -i ./timeline_xxx -m -P 
/usr/local/bin/ploticus -T /tmp/ -A '/yyy/$1' -f FreeSans
+ /usr/local/bin/perl ./EasyTimeline.pl -i ./timeline_xxx -m -P 
/usr/local/bin/ploticus -T /tmp/ -A '/yyy/$1' -f FreeSans
EasyTimeline version 1.15
Copyright (C) 2004 Erik Zachte
Email xxx@chello.nl (nospam: xxx=epzachte)

This program is free software; you can redistribute it
and/or modify it under the terms of the
GNU General Public License version 2 as published by
the Free Software Foundation
------------------------------------------------------

OS freebsd detected -> environment = Linux, create image in png format.

Input:  Script file ./timeline_xxx
Output: Image files ./timeline_xxx.png & ./timeline_xxx.svg
         Map file ./timeline_xxx.map (add to html for clickable map)

No external fonts specified in input ->
Treat input as ascii and use internal Ploticus font.

Ploticus input file = '/tmp//EasyTimeline.txt.23941'

Generating output:
Invoke Ploticus exe file as '/usr/local/bin/ploticus'
Running Ploticus to generate svg file
'/usr/local/bin/ploticus'  -svg -o './timeline_xxx.svg' 
'/tmp//EasyTimeline.txt.23941' -tightcrop
Running Ploticus to generate bitmap
'/usr/local/bin/ploticus'  -png -o './timeline_xxx.png' 
'/tmp//EasyTimeline.txt.23941' -tightcrop

READY
No errors found.
crew@XXXserver:~/timeline-test % sh -vx easytl.sh
/usr/local/bin/perl ./EasyTimeline.pl -i ./timeline_xxx -m -P 
/usr/local/bin/ploticus -T /tmp/ -A '/yyy/$1' -f FreeSans
+ /usr/local/bin/perl ./EasyTimeline.pl -i ./timeline_xxx -m -P 
/usr/local/bin/ploticus -T /tmp/ -A '/yyy/$1' -f FreeSans
EasyTimeline version 1.15
Copyright (C) 2004 Erik Zachte
Email xxx@chello.nl (nospam: xxx=epzachte)

This program is free software; you can redistribute it
and/or modify it under the terms of the
GNU General Public License version 2 as published by
the Free Software Foundation
------------------------------------------------------

OS freebsd detected -> environment = Linux, create image in png format.

Input:  Script file ./timeline_xxx
Output: Image files ./timeline_xxx.png & ./timeline_xxx.svg
         Map file ./timeline_xxx.map (add to html for clickable map)

No external fonts specified in input ->
Treat input as ascii and use internal Ploticus font.



***** 1 error found *****

Line 8: ScaleMajor = unit:year increment:20 start:1605 
gridcolor:paleGray
- Scale attribute 'grid' invalid. Unknown color ''.
   Specify command 'Color' before this command.

Execution aborted.


-- 
Infogalactic: the planetary knowledge core



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?789ab286c78d90e4077033fb589f3d29>