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 

ref null pointer in Group::traverse


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


Joined: 02 Mar 2016
Posts: 35

PostPosted: Thu Mar 16, 2017 3:06 pm    Post subject:
ref null pointer in Group::traverse
Reply with quote

Sometimes my app is crashing in
Code:

void Group::traverse(NodeVisitor& nv)
{
    for(NodeList::iterator itr=_children.begin();
        itr!=_children.end();
        ++itr)
    {
        (*itr)->accept(nv);
    }
}

where the first element of children is present (a MatrixTransform node), but the _ptr of the second child is 0x0.

It always happens during the initialization of my scene.

Its also mentionable that im using osg 3.0.1 with ThreadPerCamera and a separate ReaderWriter plugin that is drawing texture to PagedLOD objects.
Back to top
View user's profile Send private message
Meldryt
User


Joined: 02 Mar 2016
Posts: 35

PostPosted: Mon Mar 20, 2017 3:19 pm    Post subject:
Reply with quote

Sry for the lack of information.
Im using a CompositeViewer with two Views.
One for the scenegraph and one for the GUI.

The crash happens after i call CompositeViewer::run in a function where i dynamically add/change nodes of the scenegraph.

In
CompositeViewer::updateTraversal
-> scene->updateSceneGraph(*_updateVisitor);

I added viewer->stopThreading() and viewer->startThreading() in my custom function and it seems to work for now.

Unfortunately i get most of the crashes in Release mode and its harder to debug it.
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 Removing stateset for all assoc nodes... YuraIU02 General 1 Wed Apr 12, 2017 12:10 pm View latest post
No new posts NodeCallback does not traverse children YuraIU02 General 3 Mon Apr 10, 2017 8:43 am View latest post
No new posts Fast move a lot of nodes to another g... YuraIU02 General 27 Fri Mar 31, 2017 8:05 am View latest post
No new posts Having problems running the osgViewer... retrotrap General 2 Thu Nov 24, 2016 12:43 pm View latest post
No new posts How to group many objects so that the... BoraDrljaca General 0 Mon Aug 22, 2016 3:38 am 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