[geos-devel] vector::_M_range_insert error

vishal tiwari hi.vishal123 at gmail.com
Wed Jul 17 06:12:56 PDT 2013


i have been using valgrind so far and it helped me resolve a lot of seg
faults. Thanks for the advice strk. :)

Thanks,
Vishal


On 17 July 2013 18:27, Sandro Santilli <strk at keybit.net> wrote:

> On Wed, Jul 17, 2013 at 06:24:44PM +0530, vishal tiwari wrote:
> > Hi Peter,
> >
> > It was giving me the error that i specified before, because the object
> was
> > been deleted when it was returned to the different function (i think this
> > was the reason). So i made a copy of it using clone(), and returned its
> > pointer, and it worked. :)
>
> Yep, those kind of errors are common when you hand around pointers to
> memory that's released before use. Valgrind is an excellent tool to
> find these cases (hint: use it against your testcases, those memory
> errors do not _always_ get to the surface).
>
> --strk;
>
> >
> > Thanks,
> > Vishal
> >
> >
> > On 17 July 2013 15:15, Peter Körner <osm-lists at mazdermind.de> wrote:
> >
> > > Hi vishal tiwari,
> > >
> > > Am 17.07.2013 09:58, schrieb vishal tiwari:
> > > > sorry to bother you, i just fixed it. :)
> > > would you mind telling us what your issue was, so we (partly also not
> > > that familar witc C++) can take part of your solution?
> > >
> > > Peter
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>



-- 
Vishal Tiwari
Undergraduate
Computer Science and Engineering
Lab for Spatial Informatics
IIIT-Hyderabad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20130717/66ad0d6b/attachment-0001.html>


More information about the geos-devel mailing list