[Liblas-devel] St9bad_alloc (3) from method LASReader_Create
Howard Butler
hobu.inc at gmail.com
Mon Aug 18 12:22:27 EDT 2008
Rory,
I would like to use a copy of the problematic file in our test suite
(I would clip off most of the points so the file would only have ~8
points or so) if that is ok. Please let me know.
Howard
On Aug 16, 2008, at 11:15 PM, Howard Butler wrote:
> Rory,
>
> I have fixed this problem. http://liblas.org/ticket/68 It was a bug
> in libLAS where I was using the wrong return type to describe the
> length of the variable length record. Merrick makes some VLRs that
> are larger than the size of the number I was using to hold the
> length, and when I turned around to allocate storage to save the
> VLR, I was allocating a negative length :P
>
> Thanks for the report.
>
> Howard
>
> On Aug 15, 2008, at 1:55 PM, Sutton, Rory J SAJ wrote:
>
>> Howard
>> Merrick. Yes, they have egregeous numbers of VLRs. They are
>> composed of pointers to blocks of point records, to enable their
>> proprietary software, MARS, to be fast on LAS input. Your
>> remove_extra_header option comes in handy. Does it make sense?
>> Probably to Merrick. The rest of us just have to work around it.
>> Rory Sutton
>> 904-334-8373 (cell)
>>
>> ----- Original Message -----
>> From: Howard Butler <hobu.inc at gmail.com>
>> To: Sutton, Rory J SAJ
>> Cc: liblas-devel at mail.hobu.net <liblas-devel at mail.hobu.net>; Holt,
>> Paul R SAJ Contractor; Vogler, Dan SAJ Contractor
>> Sent: Fri Aug 15 13:53:33 2008
>> Subject: Re: [Liblas-devel] St9bad_alloc (3) from method
>> LASReader_Create
>>
>> Rory,
>>
>> I have duplicated your findings, and I have an idea what might be
>> going on, but I have a question about the file. Do you know what
>> software created them? The problem is in the header reading code,
>> and
>> it is seeing that there are 390 Variable Length Header records in the
>> file. VLRs are used by LAS softwares to store application-specific
>> stuff. Does it make sense that this file would have so many of these
>> records?
>>
>> Howard
>>
>> On Aug 15, 2008, at 11:51 AM, Sutton, Rory J SAJ wrote:
>>
>> > We have just taken delivery on literally thousands of lidar files
>> in
>> > LAS 1.1
>> > format. A few of these trigger something in lasinfo (and las2las)
>> > that
>> > results in the following:
>> >
>> -----------------------------------------------------------------------------
>> > ---------
>> > Could not open file : St9bad_alloc (3) from method LASReader_Create
>> >
>> -----------------------------------------------------------------------------
>> > ---------
>> > I'm seeing this on 64-bit linux and Windows XP (separate machines)
>> > for those
>> > few files that have this property. I'm a rank amateur at this
>> but a
>> > trace in
>> > DDD/GDB on linux seems to indicate the exception is being thrown at
>> > the
>> > Init() below, from lasreader.cpp. A file that triggers this (at
>> > least in my
>> > environment) and one that doesn't, have been posted to
>> > ftp://ftp.usace.army.mil/pub/saj/las . I've got lots of RAM on
>> both
>> > Windows
>> > and Linux. Any clues would be appreciated.
>> >
>> > |$Id: lasreader.cpp 813 2008-07-25 21:53:52Z mloskot $ |
>> >
>> -----------------------------------------------------------------------------
>> > ---------
>> > #include <liblas/lasreader.hpp>
>> > #include <liblas/detail/reader.hpp>
>> > // std
>> > #include <stdexcept>
>> > #include <fstream>
>> > #include <string>
>> > #include <cstring> // std::memset
>> > #include <cassert>
>> >
>> > namespace liblas
>> > {
>> >
>> > LASReader::LASReader(std::istream& ifs) :
>> > m_pimpl(detail::ReaderFactory::Create(ifs))
>> > {
>> > Init();
>> > }
>> >
>> -----------------------------------------------------------------------------
>> > ---------
>> > _______________________________________________
>> > Liblas-devel mailing list
>> > Liblas-devel at mail.hobu.net
>> > http://mail.hobu.net/mailman/listinfo/liblas-devel
>>
>
More information about the Liblas-devel
mailing list