[Liblas-devel] RE: reading/writing las files windows c++

Mateusz Loskot mateusz at loskot.net
Tue Aug 25 20:27:58 EDT 2009


Gary Robinson wrote:
> Hi again-
> 
> I just talked about this with my boss. He thinks the problem could be memory
> allocation code that isn't failsafe. The visual studio debugger sets
> allocated memory to non-zero values as a way to help find problems like
> this, and when I run against the las libraries in the visual studio debugger
> it triggers these crashes.

Or assertion is being caught, possible.

> I can work around the problem by running in release mode only, but it is
> somewhat inconvenient. Either way, there are probably memory bugs in the 1.2
> release. If you run your c++ tutorial code in the visual studio debugger you
> could probably find the problems and have a more stable release. For what
> it's worth, in my first message I mentioned the call stack when the writer
> crashes, and a buffer overrun error. Looking into it more, when the reader
> crashes, it has been near the malloc call of the new operator. Just more
> evidence of memory allocation problems.

Possibly, heap corruption occurs.
Tomorrow, I'll try to run the code from the tutorial and see myself.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the Liblas-devel mailing list