[osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged

28 views
Skip to first unread message

Robert Osfield

unread,
May 6, 2018, 2:55:33 AM5/6/18
to OpenSceneGraph Users
Hi All,

I have tagged 3.6.1-rc3 :

https://github.com/openscenegraph/OpenSceneGraph/tree/OpenSceneGraph-3.6.1-rc3

There a several bugs fixes since rc2, details below in ChangeLog and
also a purge of use of std::auto_ptr<> as this is deprecated in C++11
and will be removed in C++17.

Please test and report success/failure.

Thanks,
Robert.


-- ChangeLog since rc2

Sat, 5 May 2018 15:47:28 +0100
Author : Robert Osfield
Restructed the handling of SCREEN_COORD scaling to better handle window resizing

Sat, 5 May 2018 12:31:00 +0100
Author : Robert Osfield
Added C++ specific path for calling std::map<>::erase() to avoid
issues with std::map<>::erase implementation that invalidates
iterators

Sat, 5 May 2018 12:28:45 +0100
Author : Robert Osfield
Replaced std::auto_ptr<> usage as it's deprecated in C++11 and will be
removed in C++17

Fri, 4 May 2018 16:11:31 +0100
Author : OpenSceneGraph git repository
Merge pull request #545 from emminizer/fix-gl3-text-bad-modeText only
applies GL_TEXTURE_2D modes when fixed function is availabl…

Fri, 4 May 2018 06:44:13 -0400
Author : Daniel Emminizer
Text only applies GL_TEXTURE_2D modes when fixed function is
available. Prevents GL3 Core Profile console spam.

Fri, 4 May 2018 10:54:02 +0100
Author : Robert Osfield
Added non const version of State::getActiveDisplaySettings()

Fri, 4 May 2018 09:44:43 +0100
Author : Robert Osfield
Added check for null to prevent null entries getting into the cache

Fri, 18 Nov 2016 14:56:05 +0000
Author : Robert Osfield
Added osg::MakeString class to make it easier to create std::string's
using std::ostream style << usage.

Fri, 4 May 2018 09:22:54 +0100
Author : Robert Osfield
Fixed null pointer warning

Thu, 3 May 2018 12:56:08 +0200
Author : Björn Blissing
Check existence of path before reading imageWhen loading texture
images inside the FBX plugin check that the path
exists before trying to read the image. This is done to avoid
unnecessary warnings inside the readRefImageFile function.
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Daniel Emminizer, Code 5773

unread,
May 7, 2018, 7:16:21 AM5/7/18
to OpenSceneGraph Users
Hi Robert,

Attached is an osgtext.cpp that demonstrates the problem I'm seeing in our application with text in SCREEN_COORDS scaling improperly.

In this particular app, we're using a FIXED projection matrix mapping (-1,-1) to the lower-left corner, and (+1,+1) to the upper-right corner (ortho 2D). We have a layout system in this application that uses matrix transforms to position items in the layout.

In this section, the text is nested in two matrix transforms. These transforms update values as a result of window resizes. I omitted this code because it did not seem particularly relevant, and it is not required to reproduce the behavior. I got the current values for both matrices by saving the scene to an .osg file and extracting the subgraph.

What you're seeing in this app is 4 text labels that form the text part of a 2D "compass", serving as a set of labels for a plot's X-axis. Obviously this is just a subset of the whole scene.


When you resize the window with 3.6.1-rc2, you'll notice that the text skews significantly. If you run the same app in OSG 3.4.1, the text looks correct regardless of window size.

Side discovery -- setting the backdrop had a weird impact on text placement. Not entirely sure that I understand why. It doesn't really impact us in our application, but I thought I'd mention it just in case it's important.

- Dan

osgtext.cpp

Bolstad, Mark

unread,
May 10, 2018, 11:05:18 AM5/10/18
to OpenSceneGraph Users
I’m getting a compile failure on OS X 10.12 with the latest version:

DisplaySettings.cpp:243:25: error:
use of undeclared identifier 'OSG_GL_CONTEXT_VERSION'
_glContextVersion = OSG_GL_CONTEXT_VERSION;
^
1 error generated.

I’ve traced this down to an order of includes issue. flags.cmake has the order of -I <osg_source_include> followed by -I <osg_build_dir_include>. The order needs to be reversed as it is in the build dir where OSG_GL_CONTEXT is set.

Mark

Robert Osfield

unread,
May 10, 2018, 11:08:09 AM5/10/18
to OpenSceneGraph Users
Hi Mark,

Could you let me know the build steps you took to see this eror i.e.
the command line steps. I want to see if I can recreate the build
issue under Linux.

Robert.

Bolstad, Mark

unread,
May 10, 2018, 11:27:33 AM5/10/18
to OpenSceneGraph Users
Mostly it’s just configuring cmake followed by make. Turn on build examples, delete the paths for inventor and sdl/sdl2 as I don’t need them and they typically cause compile problems due to age. Configure, Configure, Configure, Generate, Make.

I’ve attached the CMakeCache file.

Also, I just noticed that I’m on HEAD and not the rc3 candidate. Do you want me to switch and test there?

Mark
CMakeCache.txt

Robert Osfield

unread,
May 10, 2018, 11:32:12 AM5/10/18
to OpenSceneGraph Users
Hi Dan,

I finally had a chance to look at the your example. It works the same
under 3.6 branch and 3.4 branch for me, I don't ever see any issues
with the texture become skewed regardless of the size of the window.

Robert.

On 7 May 2018 at 12:15, Daniel Emminizer, Code 5773

Robert Osfield

unread,
May 10, 2018, 11:40:09 AM5/10/18
to OpenSceneGraph Users
Hi Mark,

Are you building out of source?

Robert.

Daniel Emminizer, Code 5773

unread,
May 10, 2018, 11:42:06 AM5/10/18
to OpenSceneGraph Users
Hi Robert,

Thanks for trying the example. I'm perplexed why it's OK for you but not me. In case you're curious, I'm attaching the screenshots of the output.

I should note again that I am running with OPENGL_PROFILE="GLCORE" / GL3 mode. Would that make a difference?


I will rebuild on Linux and test there; I have not done that yet. This doesn't seem like the kind of thing that would matter Windows vs Linux, but who knows. I will update this thread once I can check Linux.

- Dan
Size1.png
Size2.png
Size3.png

Robert Osfield

unread,
May 10, 2018, 12:18:10 PM5/10/18
to OpenSceneGraph Users
Hi Mark,

I am trying to work out why you have the build problem. Is there a
chance you've done an in source build previously that set the
include/osg/GL prior the OSG_GL_CONTEXT was added, then you're out of
source build is not overriding this as the out of date in source
version of include/osg/GL is being picked up?

Robert.

On 10 May 2018 at 16:05, Bolstad, Mark <bols...@janelia.hhmi.org> wrote:

Daniel Emminizer, Code 5773

unread,
May 10, 2018, 12:33:40 PM5/10/18
to OpenSceneGraph Users
Hi Robert,

I got my build on Linux done. I test both GLCORE configuration and non-GLCORE configuration on OpenSceneGraph-3.6.

I am seeing the error in all 3 configurations:

1) Linux Ubuntu 14.04; default OSG 3.6 branch build (GL compatibility mode); NVidia Quadro K1000M GL 4.5, 384.11 driver; Ubuntu 14.04

2) Linux Ubuntu 14.04; GLCORE OSG 3.6 branch build; NVidia Quadro K1000M GL 3.3, 384.11 driver

3) Windows 10; GLCORE OSG 3.6 branch build; NVidia NVS 510, 388.19 driver


Can you just please reconfirm that when you run on OSG 3.6 branch build, and run "./osgtext --size2" (or resize the view to be short), that the text is all readable and you can clearly see "330 000 030 060" in the display with no significant overlap?

Thanks,

- Dan


-----Original Message-----
From: Daniel Emminizer, Code 5773
Sent: Thursday, May 10, 2018 11:42 AM
To: 'OpenSceneGraph Users'
Subject: RE: [osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged

Hi Robert,

Thanks for trying the example. I'm perplexed why it's OK for you but not me. In case you're curious, I'm attaching the screenshots of the output.

I should note again that I am running with OPENGL_PROFILE="GLCORE" / GL3 mode. Would that make a difference?


I will rebuild on Linux and test there; I have not done that yet. This doesn't seem like the kind of thing that would matter Windows vs Linux, but who knows. I will update this thread once I can check Linux.

- Dan


-----Original Message-----
From: osg-users [mailto:osg-user...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Thursday, May 10, 2018 11:32 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged

Hi Dan,

I finally had a chance to look at the your example. It works the same under 3.6 branch and 3.4 branch for me, I don't ever see any issues with the texture become skewed regardless of the size of the window.

Robert.

Bolstad, Mark

unread,
May 10, 2018, 1:30:37 PM5/10/18
to OpenSceneGraph Users
I’m doing an out-of-source build. I’ll try and prune all the directories and re-git the source.

Mark

Bolstad, Mark

unread,
May 10, 2018, 1:38:24 PM5/10/18
to OpenSceneGraph Users
It looks like you hypothesis was correct, I must have fat-fingered a build in-source as a clean checkout of the code fixed the issue.

Thanks

Mark

Robert Osfield

unread,
May 10, 2018, 1:58:21 PM5/10/18
to OpenSceneGraph Users
On 10 May 2018 at 18:38, Bolstad, Mark <bols...@janelia.hhmi.org> wrote:
> It looks like you hypothesis was correct, I must have fat-fingered a build in-source as a clean checkout of the code fixed the issue.

I was able to recreate this on my system : I built OSG-3.4 in source
then 3.6 out of source and got a conflict.

As you suggested, moving the include for the build include directory
in front of the source include directory avoids to conflict so I have
checked this fix in.

Mixing in source and out of source builds still isn't a recommended
practice but at least we'll have caught one obscure way of breaking
the build so that others won't get tripped up :-)

Robert.

Alberto Luaces

unread,
May 10, 2018, 4:21:01 PM5/10/18
to osg-...@lists.openscenegraph.org
Hi, I think this issue was commented somewhere else, but I couldn't find
it again: there is something broken with the cloning of osgDB::Options.
This minimal working example works fine with 3.4.x, but SIGSEVs with
3.6.1-rc3 and current master:

#include <osgDB/ReadFile>

int main(){
auto globalopts = new osgDB::Options;
globalopts->setObjectCacheHint(osgDB::Options::CACHE_NODES);

// any.obj is not needed to get the crash.
auto *node = osgDB::readNodeFile("any.obj", globalopts);
}

--
Alberto

Robert Osfield

unread,
May 11, 2018, 4:06:49 AM5/11/18
to OpenSceneGraph Users
Hi Alberto,

Thanks for the minimal crashing program. The crash wasn't straight
forward to pinpoint the cause but eventually I traced it back to the
the ObjectCache taking a ref_ptr<Options> when search for entries in
the ObjectCache. To avoid this I wrote a ObjectCache::find(..) method
that doesn't create a temporary ref_ptr<> to the Options being passed
in. This fix is checked in the OpenSceneGaprh-3.6 branch and master.

https://github.com/openscenegraph/OpenSceneGraph/commit/fcde92ad89af44a9724a5ebf9fbfdf59b6e41d68

As a general comment use of C++11's auto is something you should be
careful about using, easy to hide the face that you just have C
pointers and associated memory leaks.

Robert.

Alberto Luaces

unread,
May 11, 2018, 6:47:05 AM5/11/18
to osg-...@lists.openscenegraph.org
Robert Osfield writes:

> Hi Alberto,
>
> Thanks for the minimal crashing program. The crash wasn't straight
> forward to pinpoint the cause but eventually I traced it back to the
> the ObjectCache taking a ref_ptr<Options> when search for entries in
> the ObjectCache. To avoid this I wrote a ObjectCache::find(..) method
> that doesn't create a temporary ref_ptr<> to the Options being passed
> in. This fix is checked in the OpenSceneGaprh-3.6 branch and master.
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/fcde92ad89af44a9724a5ebf9fbfdf59b6e41d68
>

Thank you very much, Robert! I confirm it is also working for here.

>
> As a general comment use of C++11's auto is something you should be
> careful about using, easy to hide the face that you just have C
> pointers and associated memory leaks.

Oh, yes, thanks as well for the advice. Nowadays I even don't trust
myself anymore, so I just rely on what Valgrind is saying to me :-)

Robert Osfield

unread,
May 12, 2018, 6:49:59 AM5/12/18
to OpenSceneGraph Users
Hi Dan,

I have had another look at this bug and using your text example I do
see some odd behaviour so I've rewritten TextBase::computeMatrix() so
use higher level matrix maths that is easier to understand than the
"fast" maths version that unrolled all the the matrix ops but was very
hard to follow. Hard to follow -> Hard to debug...

The new version of the scale maths now works better on your two text
test programs, and osgtext looks to behaving itself too.

https://github.com/openscenegraph/OpenSceneGraph/commit/362e355db28582c839c88ddd6ede1d1ae1d74237

Now that this is fixed I will create another 3.6.1-rc, hopefully this
next one will be the last and we can finally get 3.6.1 out the door.

Robert.


On 10 May 2018 at 17:33, Daniel Emminizer, Code 5773

Daniel Emminizer, Code 5773

unread,
May 12, 2018, 9:25:58 AM5/12/18
to OpenSceneGraph Users
Hi Robert,

Tested out on my apps and everything regarding window resizing and text size is completely fixed now. Thanks a lot.

I spent several hours yesterday going over the code and trying to understand the transforms and shortcuts that were being taken. I was not able to come up with anything concrete. Looking at the new version, the code is a lot easier to understand. I had gotten to a point where I had understood most everything that was going on in the old version, but I still could not spy the problem.

You've got top notch support and I appreciate your time on this and all the other text issues in the last month. I'll be testing the RC next week but looking good so far.

- Dan


============================
  Dan Emminizer
  Code 5773.40
  Naval Research Laboratory
  https://simdis.nrl.navy.mil



> -----Original Message-----
> From: osg-users [mailto:osg-user...@lists.openscenegraph.org] On
> Behalf Of Robert Osfield
> Sent: Saturday, May 12, 2018 6:50 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged
>
> Hi Dan,
>
> I have had another look at this bug and using your text example I do
> see some odd behaviour so I've rewritten TextBase::computeMatrix() so
> use higher level matrix maths that is easier to understand than the
> "fast" maths version that unrolled all the the matrix ops but was very
> hard to follow. Hard to follow -> Hard to debug...
>
> The new version of the scale maths now works better on your two text
> test programs, and osgtext looks to behaving itself too.
>
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/362e355db
> 28582c839c88ddd6ede1d1ae1d74237
>
> Now that this is fixed I will create another 3.6.1-rc, hopefully this
> next one will be the last and we can finally get 3.6.1 out the door.
>
> Robert.
>

Reply all
Reply to author
Forward
0 new messages