AHA!!! I found out that the problems I was having are only on the RELEASE versions. When I link to the debug versions of the OSG libraries, all seems to work well. Anyone know why?
-- Rick On 3/18/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I just used the latest stable build, OSG 2.2.0, and I got a crash at > precisely the same point. I do not think it is a versioning problem. > Looking at the call stack, I wonder if there is something I am doing wrong > with setting up memory, either in the OSG build, or in the managed code that > uses the unmanaged code. I am new to VS2005 (have been using VS2003 for a > long time), but I just followed the existing instructions, and everything > compiles. > > The call stack seems to have a problem with a dynamic cast: > > kernel32.dll!7c812a5b() > [Frames below may be incorrect and/or missing, no symbols loaded for > kernel32.dll] > kernel32.dll!7c812a5b() > ntdll.dll!7c9106eb() > > msvcr80.dll!malloc(unsigned int size=3765269347) Line 163 + 0x63 > bytes C > msvcr80.dll!_CxxThrowException(void * pExceptionObject=0x0012ea24, const > _s__ThrowInfo * pThrowInfo=0x781b55e0) Line 161 C++ > msvcr80.dll!__RTDynamicCast(void * inptr=0xcd010001, long VfDelta=0, > void * SrcType=0x005cb25c, void * TargetType=0x005cc438, int isReference=0) > Line 315 C++ > osg25-osgViewer.dll!005a1516() > osg25-osgViewer.dll!005a1a69() > msvcr80.dll!operator new(unsigned int size=1) Line 59 + 0x8 bytes C++ > osg25-osgViewer.dll!005aa741() > osg25-osgViewer.dll!005a1bfd() > osg25-osg.dll!1007d866() > [Managed to Native Transition] > osgNETDemo.exe!osgNETDemo::osgNETDemoForm::InitOSG() Line 65 + 0x18 > bytes C++ > > osgNETDemo.exe!osgNETDemo::osgNETDemoForm::osgNETDemoForm_Load(System::Object^ > sender = 0x0012ec40, System::EventArgs^ e = 0x0012ec4c) Line 330 C++ > > > Thanks Again > -- Rick > > > On Tue, Mar 18, 2008 at 2:30 AM, hesicong2006 <[EMAIL PROTECTED]> > wrote: > > > I wrote the osgCppCLIDemo.rar. I use lastest OSG SVN version, you > > should try upgrade your OSG. > > > > > > [EMAIL PROTECTED] wrote: > > > > Hello All, > > > > I have been working with Phil Tessier on some work using OSG in a > > managed code environment. We tried using OsgDotNet, but we had some > > problems with that, and others on this list recommended we use C++/CLI > > directly to wrap just what we need form OSG directly, and there is an > > example provided on the language wrappers page (osgCppCLIDemo.rar). I > > was able to get that compiled, but it crashes with a __RTDynamicCast > > exception deep within osgViewer.dll. The last thing I can see in the > > call stack is in the InitOSG() function, in the line that uses > > osg::GraphicsContext::createGraphicsContext(traits.get()); > > > > The call stack looks funny to me, because it calls osg.dll, and then > > osgViewer.dll. I am using OSG version 2.0 (because it is compatible > > with OsgDotNet) and Visual Studio 2005. Perhaps I need to upgrade OSG? > > > > Thanks, > > -- Rick > > > > > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > -- > Check us out at http://fringe-online.com/ -- Check us out at http://fringe-online.com/
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org