OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Indentation problem, OutputIterator::isEndl() no longer works after upgrading to Microsoft VC12 toolchain


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins]
View previous topic :: View next topic  
Author Message
Judson Weissert
Guest





PostPosted: Wed Feb 18, 2015 5:12 pm    Post subject:
Indentation problem, OutputIterator::isEndl() no longer works after upgrading to Microsoft VC12 toolchain
Reply with quote

Hello,

I was recently working on upgrading compilers from VC10 to VC12, and
came across the following regression when exporting *.osgt files.

VC10:

osg::Group {
UniqueID 1
Children 5 {
osg::Group {
UniqueID 2
Children 3 {
osg::Switch {
UniqueID 3
UpdateCallback TRUE {
osg::NodeCallback {
UniqueID 4
}
}
Children 2 {
osg::Group {
UniqueID 5
UpdateCallback TRUE {
osg::NodeCallback {
UniqueID 6
}
}
Children 1 {
osg::Geode {
<snip>

VC12:

#Ascii Scene
#Version 100
#Generator OpenSceneGraph 3.2.1

osg::Group {
UniqueID 1
Children 5 {
osg::Group {
UniqueID 2
Children 3 {
osg::Switch {
UniqueID 3
UpdateCallback TRUE {
osg::NodeCallback {
UniqueID 4
}
}
Children 2 {
osg::Group {
UniqueID 5
UpdateCallback TRUE {
osg::NodeCallback {
UniqueID 6
}
}
Children 1 {
osg::Geode {
<snip>

Notice that the indentation has changed between VC10 and VC12
unexpectedly. I have traced the problem to OutputIterator::isEndl() in
the osgDB/StreamOperator header. In VC10, the "fn" variable comes from
msvcp100.dll for all calls to isEndl(). In VC12, some calls show "fn"
coming from osg100-osgdb.dll, and some calls come from
osgdb_serializers_osg.dll. Thus, the std::endl() address does not match
(and the function returns false) if "fn" originates from
osgdb_serializers_osg.dll.

Applying the __sun workaround does appear to fix the problem. I am
leaning towards thinking that the address check logic is not portable
due to most of the functions involved being inline. This is particularly
problematic since the osgdb_serializers_osg library is explicitly
linked, and therefore, the one definition rule behavior cannot be
applied by the linker when linking the application or other OSG dlls.

Perhaps there is a better way to "detect" std::endl, or refrain from
having to detect std::endl entirely?

Regards,

Judson


------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts A problem with regard to std:istream ... first_gle General 2 Fri May 26, 2017 6:11 am View latest post
No new posts Regarding Lod problem in osg Rambabu General 0 Fri Apr 28, 2017 5:12 am View latest post
No new posts osgFX::Outline Redraw Problem sshaw General 3 Tue Apr 25, 2017 6:51 pm View latest post
No new posts Scale problem while transforming obje... YuraIU02 General 1 Sat Apr 15, 2017 4:26 pm View latest post
No new posts OSG 3.4 and Qt 5 cmake problem. Found... Elias Tarasov General 1 Mon Apr 10, 2017 12:26 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP