Skip Menu |

This queue is for tickets about the Geo-KML CPAN distribution.

Report information
The Basics
Id: 78205
Status: rejected
Priority: 0/
Queue: Geo-KML

People
Owner: Nobody in particular
Requestors: chm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.93
Fixed in: (no value)



Subject: Geo::KML crashes for KML version 2.0
Using Geo::KML to read a KML 2.0 format data file (according
to the contents of the file) results in an exit from perl and the
message that KML 2.0 is not supported yet.

I'm new to KML, but I thought the major number version was
what were compatible.  At any rate, I edited the file to say it
used 2.2 and the file was read without crashing perl.

Is version 2.0 supported?  I haven't had time to try debugging
to see why the crash.
Subject: perl-V.txt
$ perl -V Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=cygwin, osvers=1.7.5(0.22553), archname=i686-cygwin-thread-multi-64int uname='cygwin_nt-5.1 reini 1.7.5(0.22553) 2010-04-12 19:07 i686 cygwin ' config_args='-de -Dlibperl=cygperl5_10.dll -Dcc=gcc-4 -Dld=g++-4 -Dmksymlinks -Dusethreads -Dmad=y -Doptimize=-O3 -Accflags=-g3' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='gcc-4', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include', optimize='-O3', cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.3.4 20090804 (release) 1', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++-4', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat perllibs=-ldl -lcrypt libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_10.dll gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY MYMALLOC PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MAD PERL_USE_SAFE_PUTENV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: CYG11 no-bs CYG12 no archlib in otherlibdirs CYG14 Dynaloader CYG15 static-Win32CORE CYG17 utf8-paths CYG21 LibList-Kid.patch CYG22 cygwin-1.7 hints CYG23 544-stat CYG24 build man pages CYG25 rebase_privlib Module-Build-0.36_13 Bug#55162 CYG18 File::Spec::case_tolerant performance disable ExtUtils::MakeMaker::Coverage in Sys-Syslog Built under cygwin Compiled at Aug 28 2010 20:17:29 %ENV: PERL5LIB="/home/chm/perl/lib" PERLDOC_PAGER="less" CYGWIN="" @INC: /home/chm/perl/lib/i686-cygwin-thread-multi-64int /home/chm/perl/lib /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .
Subject: Re: [rt.cpan.org #78205] Geo::KML crashes for KML version 2.0
Date: Thu, 5 Jul 2012 00:26:19 +0200
To: Chris Marshall via RT <bug-Geo-KML [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Chris Marshall via RT (bug-Geo-KML@rt.cpan.org) [120704 21:10]: Show quoted text
> Is version 2.0 supported? I haven't had time to try debugging > to see why the crash.
I never encountered a 2.0 version. I found a schema... do you have an example for me? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
On Wed Jul 04 18:26:33 2012, solutions@overmeer.net wrote:
Show quoted text
> * Chris Marshall via RT (bug-Geo-KML@rt.cpan.org) [120704 21:10]:
> > Is version 2.0 supported? I haven't had time to try debugging
> > to see why the crash.
>
> I never encountered a 2.0 version. I found a schema... do you have
> an example for me?

Attached is a shortened version of the problem file which
still shows the crash:

Show quoted text
pdl> ($ns,$data) = Geo::KML->from('short.kml')
error: kml type http://earth.google.com/kml/2.0 in short.kml not supported (yet)

--Chris

Subject: short.kml
Download short.kml
application/octet-stream 1.5k

Message body not shown because it is not plain text.

CC: chm [...] cpan.org
Subject: Re: [rt.cpan.org #78205] Geo::KML crashes for KML version 2.0
Date: Wed, 04 Jul 2012 21:21:11 -0400
To: bug-Geo-KML [...] rt.cpan.org
From: chm <devel.chm.01 [...] gmail.com>
On 7/4/2012 6:26 PM, Mark Overmeer via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=78205 > > > * Chris Marshall via RT (bug-Geo-KML@rt.cpan.org) [120704 21:10]:
>> Is version 2.0 supported? I haven't had time to try debugging >> to see why the crash.
> > I never encountered a 2.0 version. I found a schema... do you have > an example for me?
Attached to the ticket. The biggest problem for me was that the failure crashed perl (and hence the Devel::REPL based shell I was in). If a schema is not supported, it would be nice if the error caused a die rather than an exit or crash. --Chris
Subject: Re: [rt.cpan.org #78205] Geo::KML crashes for KML version 2.0
Date: Thu, 5 Jul 2012 14:19:33 +0200
To: "devel.chm.01 [...] gmail.com via RT" <bug-Geo-KML [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* devel.chm.01@gmail.com via RT (bug-Geo-KML@rt.cpan.org) [120705 01:21]: Show quoted text
> Attached to the ticket. The biggest problem for > me was that the failure crashed perl (and hence > the Devel::REPL based shell I was in). If a schema > is not supported, it would be nice if the error > caused a die rather than an exit or crash.
What your output shows is simply a "die", not a crash. You can catch it with eval {} or nice Log::Report's try() -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
CC: chm [...] cpan.org
Subject: Re: [rt.cpan.org #78205] Geo::KML crashes for KML version 2.0
Date: Thu, 05 Jul 2012 08:32:22 -0400
To: bug-Geo-KML [...] rt.cpan.org
From: chm <devel.chm.01 [...] gmail.com>
On 7/5/2012 8:19 AM, Mark Overmeer via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=78205 > > > * devel.chm.01@gmail.com via RT (bug-Geo-KML@rt.cpan.org) [120705 01:21]:
>> Attached to the ticket. The biggest problem for >> me was that the failure crashed perl (and hence >> the Devel::REPL based shell I was in). If a schema >> is not supported, it would be nice if the error >> caused a die rather than an exit or crash.
> > What your output shows is simply a "die", not a crash. You can catch > it with eval {} or nice Log::Report's try()
Following the two lines shown, perl has exited and the Devel::REPL has crashed. The next lines are from the bash shell. The REPL runs all lines in an eval so a die should be caught. I haven't had time to debug the problem further so a bug in the REPL causing this one instance of die not to be correctly caught is possible. --Chris
Subject: Re: [rt.cpan.org #78205] Geo::KML crashes for KML version 2.0
Date: Thu, 5 Jul 2012 14:39:02 +0200
To: "devel.chm.01 [...] gmail.com via RT" <bug-Geo-KML [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* devel.chm.01@gmail.com via RT (bug-Geo-KML@rt.cpan.org) [120705 12:32]: Show quoted text
> Queue: Geo-KML > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=78205 > > > On 7/5/2012 8:19 AM, Mark Overmeer via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=78205 > > > > > What your output shows is simply a "die", not a crash. You can catch > > it with eval {} or nice Log::Report's try()
> > Following the two lines shown, perl has exited and > the Devel::REPL has crashed.
I am not responsible for bugs in Devel::REPL. Your KML file does not validate: the PlaceMarks contain TimeSpan elements, however the schema says that the field should be named TimePeriod. KML files are often broken. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
CC: chm [...] cpan.org
Subject: Re: [rt.cpan.org #78205] Geo::KML crashes for KML version 2.0
Date: Thu, 5 Jul 2012 13:37:42 -0400
To: bug-Geo-KML [...] rt.cpan.org
From: Chris Marshall <devel.chm.01 [...] gmail.com>
I'm following up with the KML content provider re their schema and correctness. I tracked down the problem causing the crash/exit to the following line in Log::Report: if($stop) { # ^S = EXCEPTIONS_BEING_CAUGHT, within eval or try $^S or exit($opts->{errno} || 0); $! = $opts->{errno} || 0; $@ = $exception || Log::Report::Exception->new(report_opts => $opts , reason => $reason, message => $message); die; # $@->PROPAGATE() will be called, some eval will catch this } Where you can see the exit being used if $^S is not true. The usage is a bit puzzling here since in my experience, an exit is the one thing you can never recover from in perl since it exits the interpreter itself. At least I can work around the issue for my own installs until the problem can be better resolved. Thanks, Chris
Code behaves as expected.