Hi, On Fri, 2014-11-07 at 12:48 +0100, Victor Haefner wrote: > Hi, > > > UPDATE: The above is still valid, I refined it to the following: > > osgInit(argc,argv); > GeoUInt8PropertyRecPtr Type = GeoUInt8Property::create(); > Type->addValue(GL_LINES); // <-- segfault here > > #0 ?? OSG::initPolyVR (argc=argc@entry=1, argv=argv@entry=0x7fffffffe2d8) > #1 0x57e7c6 main(argc=1, argv=0x7fffffffe2d8) > > InvalidWrite|====|Invalid write of size 1| > ||Call stack:| > /usr/local/include/OpenSG/OSGTypedGeoIntegralProperty.h|161|0x7A97B3: > OSG::initPolyVR(int, char**)| > /home/victor/Projects/polyvr/src/main.cpp|18|0x57E7C5: main| > ||Address 0x0 is not stack'd, malloc'd or (recently) free'd| > ||Valgrind found 1 errors!|
hmm, just looking at this, it looks like osgInit fails to initialize all the types, hence GeoUInt8Property::create creates nothing. One way would be to use a debugger and trace through GeoUInt8Property::create and see why it returns NULL. Another, could you do a 'export OSG_LOG_LEVEL=10' in your shell and send the output. That should trace a lot of the initialization part. > UPDATE 2: get the same with 09geometry_water2.cpp > > #0 0x40be92 setValue<int>(index=0, val=7, this=0x7fffd9233b40) > (/usr/local/include/OpenSG/OSGTypedGeoIntegralProperty.h:161) > #1 ?? push_back<int> (val=<optimized out>, this=0x7fffd9233b40) > (/usr/local/include/OpenSG/OSGTypedGeoIntegralProperty.h:176) > #2 ?? addValue<int> (val=<optimized out>, this=0x7fffd9233b40) > (/usr/local/include/OpenSG/OSGTypedGeoIntegralProperty.h:169) > #3 ?? createScenegraph () (/home/victor/Projects/polyvr/src/main.cpp:48) > #4 0x40b333 main(argc=1, argv=<optimized out>) (09geometry_water2.cpp:123) > this one looks more weird, why does it suddenly jump into: createScenegraph () from (/home/victor/Projects/polyvr/src/main.cpp:48) Another thing that worries me, > /usr/local/include/OpenSG/OSGTypedGeoIntegralProperty.h|161|0x709B8D: void > OSG::TypedGeoIntegralProperty<OSG::GeoUInt8PropertyDesc>::push_back<int>(int > const&)| > /usr/lib/opensg/libOSGDrawable.so.2.0.0||0x11E7D48D: > the first part, the inline code, comes from /usr/local, the second part from /usr/lib. Could it be that there are 2 OpenSG2 installs, one in /usr and one in /usr/local and those get mixed up ? kind regards gerrit ------------------------------------------------------------------------------ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users