bugRole Playing Game Engine - Bugs: bug #22687, imagestack.cgen: Memory leak on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #22687: imagestack.cgen: Memory leak on image removal

Submitted by:  Remco Bras <rvbras>
Submitted on:  Sat 22 Mar 2008 09:32:43 AM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Remco Bras <rvbras>
Open/Closed: Closed

Sat 22 Mar 2008 01:54:35 PM UTC, comment #3:

Hmm, the rendering code apparently COULD find it by not having to, since I was testing an in-use tile so the cached, pre-rendered tilegrid would handle that. However, some printf debugging showed some not properly NULLed pointers and we don't want concurrent adding and/or removing or rendering images to happen. Therefore, mutexing this stuff would still be good, but remove_image doesn't seem to be too buggy, so I'll go ahead and close this one.

P.S.:I should really, really remember more of my own project....

Remco Bras <rvbras>
Project AdministratorIn charge of this item.
Sat 22 Mar 2008 10:55:34 AM UTC, comment #2:

Perhaps the bugs I just described were caused by the thread-unsafety of the image functions, so I'll postpone this bug for a while until the task to improve thread-safety of the global data structures of RPGE is completed.

Remco Bras <rvbras>
Project AdministratorIn charge of this item.
Sat 22 Mar 2008 10:40:15 AM UTC, comment #1:

I've added free statements to get rid of most memory, though tests seem to be doing the very weird thing of instantly reallocating whatever image I try to crush. In short, even after calling remove_image and explicitly NULLing every single related pointer, it seems the rendering code can still find the image, don't ask me how.

Remco Bras <rvbras>
Project AdministratorIn charge of this item.
Sat 22 Mar 2008 09:32:43 AM UTC, original submission:

Ages ago, the imagestack.c (now imagestack.cgen) code caused double frees or corruptions when freeing image-related filenames and/or surfaces. As a 'fix', the current code simply doesn't bother. Fix this immediately, since the very point of imagestacks is to not have superfluous surfaces around.

Remco Bras <rvbras>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rvbras (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Mar 2008 02:49:26 PM UTCrvbrasStatusPostponed=>Fixed
    Sat 22 Mar 2008 01:54:35 PM UTCrvbrasOpen/ClosedOpen=>Closed
    Sat 22 Mar 2008 10:55:34 AM UTCrvbrasStatusConfirmed=>Postponed

    Back to the top


    Powered by Savane 3.1-cleanup1