Hello Michael, Michael Raab wrote: > I think I got it. We tried to read vrml using a filestream, like this: > > std::ifstream is(filename.c_str(), std::ios::binary); > NodePtr n = VRMLSceneFileType::the().read(is, ".wrl"); > > Without inlines this works well, but using a filestream directory information > necessary for loading inlines are missing. I think that caused the crash.
yes, when using streams the directory information is lost and the files referenced from the 'inline' nodes can not be found - of course it should not result in a crash, I'll see if I can reproduce it now. One way to use streams and make the loading of inlines work is to manually set some paths on the PathHandler of the SceneFileHandler. Normally calling SceneFileHandler::read() will add the directory where the currently loading file is to the PathHandler, but when using streams that directory is not known, so this step can not be done. > Workaround for us is to use something like this: > NodePtr n = SceneFileHandler::the().read(filename.c_str()); That is another way to work around this, of course. Cheers, Carsten ------------------------------------------------------------------------------ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users