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 

Multiple update callbacks per node (bug in Callback?)


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
pete
Newbie


Joined: 11 Jun 2014
Posts: 6

PostPosted: Fri Jun 20, 2014 10:05 am    Post subject:
Multiple update callbacks per node (bug in Callback?)
Reply with quote

Hi everyone,

Be warned, this is a newbie question.
I am currently trying to add several update callbacks (their execution order is irrelevant) to a same node, and all my attempts miserably failed.
I tried to rely on nested callbacks, but to no avail.
I must be missing something obvious... so any help would be more than welcome.

I am playing with OSG-3.2.1-rc3 compiled with Visual Studio 10 on Windows 7 (x64).

Both the following pieces of code ends up with a stack overflow in NodeCallback::run. :(
Thanks in advance.

The problem seems to come from the statement in the file Callback.cpp:25 which does not seem to delegate computation to the nested callback if present:
Code:
if (_nestedCallback.valid()) return run(object, data);


Would calling
Code:
if (_nestedCallback.valid()) return _nestedCallback->run(object, data)
instead be enough?

Regards.
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11237

PostPosted: Mon Jun 23, 2014 10:43 am    Post subject:
Multiple update callbacks per node (bug in Callback?)
Reply with quote

Hi Pierre,

I think you must be using svn/trunk rather than 3.2.1 as the
Callback.cpp only exists in svn/trunk and not in the 3.2 branch :-)

You analysis of the bug and suggestion of fix looks correct to me so
I've applied this change to svn/trunk and checked this in. Could you
do an svn update and let me know how you get on.

Thanks,
Robert.

On 20 June 2014 11:05, Pierre Landes <> wrote:
Quote:
Hi everyone,

Be warned, this is a newbie question.
I am currently trying to add several update callbacks (their execution order is irrelevant) to a same node, and all my attempts miserably failed.
I tried to rely on nested callbacks, but to no avail.
I must be missing something obvious... so any help would be more than welcome.

I am playing with OSG-3.2.1-rc3 compiled with Visual Studio 10 on Windows 7 (x64).

Both the following pieces of code ends up with a stack overflow in NodeCallback::run. Sad
Thanks in advance.

The problem seems to come from the statement in the file Callback.cpp:25 which does not seem to delegate computation to the nested callback if present:

Code:
if (_nestedCallback.valid()) return run(object, data);



Would calling
Code:
if (_nestedCallback.valid()) return _nestedCallback->run(object, data)

instead be enough?

Regards.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59829#59829








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
pete
Newbie


Joined: 11 Jun 2014
Posts: 6

PostPosted: Mon Jun 23, 2014 1:53 pm    Post subject:
Reply with quote

Hi Robert,

This change did the trick for me so far.

Actually, I was a bit worried about the possibility it would conflict with the way NodeVisitors (and most specifically the CullVisitor) currently worked.
I am glad it is apparently not the case.

Thanks for the feedback. :)

Cheers,
Pierre
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General 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 multiple views + instancing d_a_heitbrink General 2 Wed Nov 15, 2017 7:06 pm View latest post
No new posts Multiple video textures using ffmpeg ... mmaurus Plugins [osgPlugins] 6 Thu Oct 05, 2017 10:02 am View latest post
No new posts Executing subtree multiple times / re... antiro42 General 2 Thu Sep 14, 2017 10:10 am View latest post
No new posts Problem blending multiple render passes antiro42 General 5 Sat Sep 09, 2017 9:44 am View latest post
No new posts Multiple pointlights deferred renderi... antiro42 General 0 Fri Sep 08, 2017 2:39 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