Hi David,
Dummy check: are you loading from a different (uninitialized) thread?
Cheers
/Marcus
David Molyneaux wrote:
> Hi everyone,
>
> I have an application which is trying to load some basic VRML files (such as
> a cube) and display them with GLUT. Unfortunately I'm getting a crash in
> osgthread.cpp with Opensg CVS version libraries compiled in MSVC2005 on
> Win32. The error occurs when trying to access the Thread Local Storage in
> the function UInt32 WinThreadBase::getAspect(void)
>
> At line: pUint = (UInt32 *) TlsGetValue(_aspectKey);
> The _aspectKey is 10, but windows returns NULL when calling TlsGetValue. I
> know this function is already being called successfully multiple times with
> the same _aspectKey value during the SceneFileHandler intialisation.
>
> Error Message:
> Unhandled exception at 0x00e46e69 (OSGSystemD.dll) in project.exe:
> 0xC0000005: Access violation reading location 0x00000000.
>
> The library and application are both compiled with Multi-threaded Debug DLL,
> using the standard support libraries. Both debug and release versions of my
> application crash at the same place.
>
> My code where the crash is occuring:
>
> bool OpenSGObject:: LoadGeometryToScenegraph( const string &filename )
> {
> NodePtr nodeGeometry = SceneFileHandler::the().read( filename.c_str() );
> // Crashes on this call...
>
> if ( nodeGeometry == NullFC )
> return false;
>
> // Add node to scenegraph root
> beginEditCP(root, Node::ChildrenFieldMask);
>
> ....etc...
>
> Loading works correctly in the tutorial 10loading.cpp with the same VRML
> file. I'm using the same include files, libraries, DLLs and C++
> pre-processor options in my application, so I'm a bit mystified.
>
> Any suggestions or ideas what this crash might indicate?
>
> Could I somehow define OSG_ASPECT_USE_DECLSPEC rather than
> OSG_ASPECT_USE_LOCALSTORAGE to get around this (I say this without knowing
> anything about the internals of OpenSG...).
>
> Thanks,
> Dave Molyneaux
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users