[Liblas-devel] St9bad_alloc (3) from method LASReader_Create

Howard Butler hobu.inc at gmail.com
Fri Aug 15 13:53:33 EDT 2008


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