Skip Menu |
 

This queue is for tickets about the Math-Geometry-Planar CPAN distribution.

Report information
The Basics
Id: 43510
Status: open
Priority: 0/
Queue: Math-Geometry-Planar

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc: randomcoder1 [...] gmail.com
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.16
Fixed in: (no value)



Subject: Strange errors while trying the centroid() method
Download (untitled) / with headers
text/plain 986b
This script here shows strange errors: #!/usr/bin/perl -w use strict; no warnings 'qw'; use Math::Geometry::Planar; my $mgp = Math::Geometry::Planar->new; $mgp->points([ map { [ split /,/ ] } qw(18400,4790 18440,4800 18481,4787 18502,4754 18502,4727 18500,4727 18492,4699 18470,4715 18476,4750 18476,4748 18445,4768 18419,4762) ]); my $xy1 = $mgp->centroid; warn "@$xy1"; __END__ Sometimes there's an endless loop saying "add_segment: error", sometimes it fails with Use of uninitialized value in array element at /usr/local/lib/perl5/site_perl/5.8.8/Math/Geometry/Planar.pm line 3254. Can't use an undefined value as a HASH reference at /usr/local/lib/perl5/site_perl/5.8.8/Math/Geometry/Planar.pm line 2497. and sometimes there's an endless loop without any output. This is on an amd64-freebsd system (a real 64bit system). libgpc is freshly compiled from FreeBSD ports (version 2.32), perl is 5.8.8. Most other polygons work correctly. Regards, Slaven
From: njahnke [...] gmail.com
Download (untitled) / with headers
text/plain 3.6k
also broken for me. Darwin MINI.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 MINI:~ njahnke$ perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=darwin, osvers=10.0, archname=darwin-thread-multi-2level uname='darwin neige.apple.com 10.0 darwin kernel version 10.0.0d8: tue may 5 19:29:59 pdt 2009; root:xnu-1437.2~2release_i386 i386 ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=gcc-4.2' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc-4.2', ccflags ='-arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include', optimize='-Os', cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='4.2.1 (Apple Inc. build 5646)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc-4.2 -mmacosx-version-min=10.6', ldflags ='-arch x86_64 -arch i386 -arch ppc -L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-arch x86_64 -arch i386 -arch ppc -bundle -undefined dynamic_lookup -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: /Library/Perl/Updates/<version> comes before system perl directories installprivlib and installarchlib points to the Updates directory Built under darwin Compiled at Jun 24 2009 00:35:27 @INC: /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 . MINI:~ njahnke$ to reproduce: #!/usr/bin/perl use strict; use warnings; use Math::Geometry::Planar; my $polygon = Math::Geometry::Planar->new; my $points = [[130,86],[122,95],[123,108],[116,120],[135,126],[140,134],[99,15],[99,39],[99,111],[123,111],[147,88],[109,20],[79,51],[122,31],[123,32],[125,32],[128,34],[62,16],[45,36],[65,36],[83,20],[85,19],[135,116],[91,22],[11,58],[23,57],[62,105],[35,49],[37,49],[1,72],[33,120],[9,68],[13,68]]; $polygon->points($points); $polygon->centroid(); output: Use of uninitialized value $tlast in array element at /Library/Perl/5.10.0/Math/Geometry/Planar.pm line 3255. Can't use an undefined value as a HASH reference at /Library/Perl/5.10.0/Math/Geometry/Planar.pm line 2498.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.