Hello Rakesh,
I have followed this link to load collada plugin in OSG,
i am getting this error in cmake ui tool.
Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR).
This is not related to Collada and should not cause any problems.
i just genearated the solution file despite of this error ,i got dae
plugin into osg plugin but getting crash in this API
viewer.setSceneData( osgDB::readNodeFile("dummy.dae")
First you need to do normal debugging to see if the problem is really
the Collada plugin or something else. Start with separating the two
statements you have on their own lines, and upping the verbosity level
in OSG:
osg::setNotifyLevel( osg::DEBUG_FP );
osg::Node* node = osgDB::readNodeFile( "dummy.dae" );
viewer.setSceneData( node );
Then put a breakpoint on the third line, it will stop after the
readNodeFile(). Then run that in the debugger.
It might crash even before hitting the breakpoint, which would probably
mean (if you're on Windows) that you're mixing release and debug
binaries, or something like that.
If it doesn't crash before hitting the breakpoint, when it stops at the
breakpoint, check if node is NULL. If it is, check the console. The
cause might be one of the following four things:
* It might say that the "dummy.dae" file could not be found, in which
case it's not related to Collada at all. You just need to give the right
path to readNodeFile() so that it can find your file.
* It might say that it didn't find the Collada plugin, in which case
check that your plugin folder is in the right place relative to your OSG
DLLs and that your app can find plugins (if this is the case, trying to
read a .osg file would have given the same problem). With notify level
DEBUG_FP, OSG will print all the paths it checks to try and find the
plugin. The osgPlugins-x.y.z folder should always be parallel to your
OSG DLLs, and not on your PATH.
* It might say that it found the Collada plugin, but could not load it.
That would mean that the Collada plugin's DLL (osgdb_dae.dll) is in the
right place, but some DLL it needs was not on your PATH or in your app's
directory.
* It might say that the plugin was not able to read the file. That would
mean that the "dummy.dae" file is not a valid Collada file, or that the
Collada plugin doesn't understand something in it for some reason,
though I think in that case it would just read what it can understand,
return that, and print warnings about anything it doesn't understand.
If node is not null at that point, then continue after the breakpoint
and see where it crashes, and check the stack trace to see what's going on.
In any case, as you see, just saying "it crashes" is not enough. You
need to spend some debugging time yourself and try to find out where it
crashes and what's causing it to crash.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org