Giter Club home page Giter Club logo

Comments (6)

diafero avatar diafero commented on July 28, 2024

I did a bisect, with the following result:

1219763c443b91b7b18be79335a24894312c54ef is the first bad commit
commit 1219763c443b91b7b18be79335a24894312c54ef
Author: Bartek Bok <[email protected]>
Date:   Thu Jul 26 21:48:25 2012 +0200

    Load callbacks

from libhsplasma.

diafero avatar diafero commented on July 28, 2024

The problem is as follows: Scene objects add callbacks to themselves to all their modifiers. However, when the modifier is removed from the scene object or the scene object is deleted, the callbacks stay - and later, they are called even though the scene object has already been deleted. The call is happening in plKeyData::setObj.

I wrote a temporary patch to fix the problem so that I can continue using my scripts, you can find it at diafero@1d890aa. It's probably not a proper fix though...

from libhsplasma.

zrax avatar zrax commented on July 28, 2024

The key leaks are the immediate issue here, and those have been fixed by 5c93fdd... However, the other half of this is that the std::bind parameter references an object which can potentially be deleted before the callback is called. I feel it's slightly less important, but it should be fixed at some point (e.g. by assigning owners to callbacks).

from libhsplasma.

diafero avatar diafero commented on July 28, 2024

The key leaks are the immediate issue here, and those have been fixed
by 5c93fdd... However, the other half of this is that the
std::bind parameter references an object which can potentially be
deleted before the callback is called. I feel it's slightly less
important, but it should be fixed at some point (e.g. by assigning
owners to callbacks).

Well, I tend to disagree (crashes seem more serious to me than memory
leaks), but my immediately problem is fixed ;-)

from libhsplasma.

zrax avatar zrax commented on July 28, 2024

Well, this fixes both the crash and the memory leak for your case... What I meant was that the case where the code fails (crashes) is now significantly less likely to occur than it was before (you'd actually have to try to do it) -- and we may have fixed other unseen bugs as well in the process.

from libhsplasma.

diafero avatar diafero commented on July 28, 2024

This bug is no longer present.

from libhsplasma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.