I'm working in a project that represents multiples roads in a landscape. I add an ElevationLayer with a custom TileSource, a few ImageLayers (gdal), a lot of MaskLayers and many ModelLayers that represents the road surfaces.
When I work with a few roads the projects works fine, but if i use a lot of roads it produces aleatory access errors (0xC0000005) always when the application tries to use as a LayerPointer, a pointer from the LayerVector return from map->getLayers.
for (LayerVector::const_iterator i = layers.begin(); i != layers.end(); ++i)
Layer* layer = i->get();
if (layer->getEnabled()) // access error
If you run the application again, this same error appears with another random pointer of the vector.
I think I'm accessing the Map only from the main thread.
I believe that my problem would be when i try to create the node
that represents the road. For each road I have points, triangles,
normals and textures and I put them directly into a class (named
OSGAxeModelLayer) inherit from class ModelLayer . I do this
because this layers doesn´t change and the interaction with the
terrain is throw the MaskLayer of each road than go in other
I enclose a small summary of what i am doing in case it would
have been hepful.
El 03/07/2019 a las 20:19, gwaldron [via osgEarth] escribió:
Are you accessing the Map only from the main thread (or OSG's
Can you produce a Debug-mode stack trace?
Waldron / Pelican Mapping
If you reply to this email, your
message will be added to the discussion below: