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 

using osgShadow messes ref_ptrs on exit


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Trajce Nikolov NICK
Guest





PostPosted: Wed Feb 24, 2016 6:48 pm    Post subject:
using osgShadow messes ref_ptrs on exit
Reply with quote

Hi Community,

I've been fighting with cleaning of ref_ptrs when using osgShadow. It crashes in deleting the pointer. This is odd but attached is very simple example, osgviewer just with adding it to a shadowed scene with some technique.


Any clue? Sample attached




Thanks a bunch as always !


Cheers,
Nick


void Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) const
{
#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet.get());
#else
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet);
#endif


    if (observerSet && signalDelete)
    {
        observerSet->signalObjectDeleted(const_cast<Referenced*>(this));
    }


    if (doDelete)
    {
        if (_refCount!=0)
            OSG_NOTICE<<"Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount="<<_refCount<<std::endl;


        if (getDeleteHandler()) deleteUsingDeleteHandler();
        CRASHES HERE -----> else delete this;
    }
}


--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
andersb (Anders Backman)
User


Joined: 07 Jun 2010
Posts: 72

PostPosted: Wed Feb 24, 2016 8:25 pm    Post subject:
using osgShadow messes ref_ptrs on exit
Reply with quote

I believe this has been fixed in the trunk. But there is no official release containing this fix just yet.It happens with just about any osg::Program/Shader.


/A


On Wed, Feb 24, 2016 at 7:42 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Community,

I've been fighting with cleaning of ref_ptrs when using osgShadow. It crashes in deleting the pointer. This is odd but attached is very simple example, osgviewer just with adding it to a shadowed scene with some technique.


Any clue? Sample attached




Thanks a bunch as always !


Cheers,
Nick


void Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) const
{
#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet.get());
#else
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet);
#endif


    if (observerSet && signalDelete)
    {
        observerSet->signalObjectDeleted(const_cast<Referenced*>(this));
    }


    if (doDelete)
    {
        if (_refCount!=0)
            OSG_NOTICE<<"Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount="<<_refCount<<std::endl;


        if (getDeleteHandler()) deleteUsingDeleteHandler();
        CRASHES HERE -----> else delete this;
    }
}


--
trajce nikolov nick




_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
__________________________________________
Anders Backman, HPC2N
90187 Umeå University, Sweden
(
Only registered users can see emails on this board!
Get registred or enter the forums!
http://www.hpc2n.umu.se
Cell: +46-70-392 64 67

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Wed Feb 24, 2016 8:26 pm    Post subject:
using osgShadow messes ref_ptrs on exit
Reply with quote

Thanks Anders, I am on 3.5.1 .. Let me try the trunk then .. Thanks again!





On Wed, Feb 24, 2016 at 9:19 PM, Anders Backman < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I believe this has been fixed in the trunk. But there is no official release containing this fix just yet.It happens with just about any osg::Program/Shader.


/A


On Wed, Feb 24, 2016 at 7:42 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:


Quote:
Hi Community,

I've been fighting with cleaning of ref_ptrs when using osgShadow. It crashes in deleting the pointer. This is odd but attached is very simple example, osgviewer just with adding it to a shadowed scene with some technique.


Any clue? Sample attached




Thanks a bunch as always !


Cheers,
Nick


void Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) const
{
#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet.get());
#else
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet);
#endif


    if (observerSet && signalDelete)
    {
        observerSet->signalObjectDeleted(const_cast<Referenced*>(this));
    }


    if (doDelete)
    {
        if (_refCount!=0)
            OSG_NOTICE<<"Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount="<<_refCount<<std::endl;


        if (getDeleteHandler()) deleteUsingDeleteHandler();
        CRASHES HERE -----> else delete this;
    }
}


--
trajce nikolov nick






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
__________________________________________
Anders Backman, HPC2N
90187 Umeå University, Sweden
(
Only registered users can see emails on this board!
Get registred or enter the forums!
http://www.hpc2n.umu.se
Cell: [url=tel:%2B46-70-392%2064%2067]+46-70-392 64 67[/url]


_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
Trajce Nikolov NICK
Guest





PostPosted: Wed Feb 24, 2016 8:39 pm    Post subject:
using osgShadow messes ref_ptrs on exit
Reply with quote

Anders, the thing is not only for Programs/Shaders .. I take these out and i starts just about anything else: StateSets, Uniforms, UserDataContainers .....

On Wed, Feb 24, 2016 at 9:21 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Thanks Anders, I am on 3.5.1 .. Let me try the trunk then .. Thanks again!





On Wed, Feb 24, 2016 at 9:19 PM, Anders Backman < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I believe this has been fixed in the trunk. But there is no official release containing this fix just yet.It happens with just about any osg::Program/Shader.


/A


On Wed, Feb 24, 2016 at 7:42 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:


Quote:
Hi Community,

I've been fighting with cleaning of ref_ptrs when using osgShadow. It crashes in deleting the pointer. This is odd but attached is very simple example, osgviewer just with adding it to a shadowed scene with some technique.


Any clue? Sample attached




Thanks a bunch as always !


Cheers,
Nick


void Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) const
{
#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet.get());
#else
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet);
#endif


    if (observerSet && signalDelete)
    {
        observerSet->signalObjectDeleted(const_cast<Referenced*>(this));
    }


    if (doDelete)
    {
        if (_refCount!=0)
            OSG_NOTICE<<"Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount="<<_refCount<<std::endl;


        if (getDeleteHandler()) deleteUsingDeleteHandler();
        CRASHES HERE -----> else delete this;
    }
}


--
trajce nikolov nick






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
__________________________________________
Anders Backman, HPC2N
90187 Umeå University, Sweden
(
Only registered users can see emails on this board!
Get registred or enter the forums!
http://www.hpc2n.umu.se
Cell: [url=tel:%2B46-70-392%2064%2067]+46-70-392 64 67[/url]


_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--


trajce nikolov nick






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
Trajce Nikolov NICK
Guest





PostPosted: Wed Feb 24, 2016 11:03 pm    Post subject:
using osgShadow messes ref_ptrs on exit
Reply with quote

Hi Again,

the trunk has "fixed" it somehow, the case I posted, but it is not fixed completely .. I am getting it now on DefaultUserDataContainer .. in the destructor it crashes, Referenced on same place ....


On Wed, Feb 24, 2016 at 9:33 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Anders, the thing is not only for Programs/Shaders .. I take these out and i starts just about anything else: StateSets, Uniforms, UserDataContainers .....

On Wed, Feb 24, 2016 at 9:21 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Thanks Anders, I am on 3.5.1 .. Let me try the trunk then .. Thanks again!





On Wed, Feb 24, 2016 at 9:19 PM, Anders Backman < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I believe this has been fixed in the trunk. But there is no official release containing this fix just yet.It happens with just about any osg::Program/Shader.


/A


On Wed, Feb 24, 2016 at 7:42 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:


Quote:
Hi Community,

I've been fighting with cleaning of ref_ptrs when using osgShadow. It crashes in deleting the pointer. This is odd but attached is very simple example, osgviewer just with adding it to a shadowed scene with some technique.


Any clue? Sample attached




Thanks a bunch as always !


Cheers,
Nick


void Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) const
{
#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet.get());
#else
    ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet);
#endif


    if (observerSet && signalDelete)
    {
        observerSet->signalObjectDeleted(const_cast<Referenced*>(this));
    }


    if (doDelete)
    {
        if (_refCount!=0)
            OSG_NOTICE<<"Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount="<<_refCount<<std::endl;


        if (getDeleteHandler()) deleteUsingDeleteHandler();
        CRASHES HERE -----> else delete this;
    }
}


--
trajce nikolov nick






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
__________________________________________
Anders Backman, HPC2N
90187 Umeå University, Sweden
(
Only registered users can see emails on this board!
Get registred or enter the forums!
http://www.hpc2n.umu.se
Cell: [url=tel:%2B46-70-392%2064%2067]+46-70-392 64 67[/url]


_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--


trajce nikolov nick








--
trajce nikolov nick






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
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 osgShadow and gl3 wernerM General 1 Fri Feb 24, 2017 2:54 pm View latest post
No new posts Crash on exit (graphics thread removi... scrawl General 9 Sun Aug 14, 2016 6:02 pm View latest post
No new posts osgShadow with GLES PJPetitprez General 1 Mon Jul 04, 2016 3:48 pm View latest post
No new posts osgShadow: shadow is seen on the oppo... PJPetitprez General 0 Mon Nov 16, 2015 1:50 pm View latest post
No new posts Error when using osgShadow davboub General 4 Mon Jun 29, 2015 11:30 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