Programme crashes while add a modellayer from shp

classic Classic list List threaded Threaded
3 messages Options
tttlll tttlll
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Programme crashes while add a modellayer from shp

I try to add a modellayer from shapefile with my codes or earth file , they both crashes for "0xC0000005: read location 0xfeeefef6 when the access conflict occurs" in vs2010,osgearth2.8.
Also,when I choose to agglite rendering the modellayer or remove the modellayer , it will be fine.
when I try to run the osgearth_viewerd.exe with feature_models.earth , it crashed ,too.
I was confused that maybe the bug is in osgearth.
my code  is here:
//加载shp数据
OGRFeatureOptions featureOptions;
featureOptions.url() = osgEarth::URI(filePath.toStdString());
osg::ref_ptr<FeatureSource> featureSource = osgEarth::Features::FeatureSourceFactory::create( featureOptions);
osgEarth::Status status = featureSource->open();
osgEarth::Drivers::FeatureGeomModelOptions geomOptions;
geomOptions.featureOptions() = featureoptions;
geomOptions.styles() = new StyleSheet();
geomOptions.styles()->addStyle( style );
geomOptions.enableLighting() = false;//openGL照明模式
osg::ref_ptr<osgEarth::ModelLayer> newLayer = new osgEarth::ModelLayer(osgEarth::ModelLayerOptions( filename,geomOptions ));
_manager->map()->addModelLayer( newLayer.get());



my earth file is the same as feature_models.earth.
<map name="Model Demo" type="geocentric" version="2">
               
    <model name="points" driver="feature_geom">
                     
        <features name="points" driver="ogr">
            <url>../data/points.shp</url>
            <build_spatial_index>true</build_spatial_index>
        </features>
               
        <styles>
            <style type="text/css"> points { model: "../data/red_flag.osg.5500.scale"; altitude-clamping: terrain; } </style>        </styles>   
       
    </model>
   
    <image name="ReadyMap.org - Imagery" driver="tms">
        <url>http://readymap.org/readymap/tiles/1.0.0/7/</url>
    </image>
       
    <external>         
                <viewpoints>
                        <viewpoint name="Models" lat="25.311" long="-80.807" pitch="-21" range="177351"/>
                </viewpoints>
    </external>
 
</map>
 
looking forward to replies.
Thanks.
tttlll
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Programme crashes while add a modellayer from shp

tttlll,

You will need to run a debug build and get a stack trace to locate the source of the crash.

Please register for the forum when you get a chance, thanks.
Glenn Waldron / Pelican Mapping
Lily Lily
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Programme crashes while add a modellayer from shp

It turns out that osgearthd.dll have bugs,but I do not know find out exactly which one?How to solve it?
Loading...