SFML community forums

Help => General => Topic started by: Pinkii on August 20, 2016, 11:36:14 am

Title: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: Pinkii on August 20, 2016, 11:36:14 am
Have anyone had memory leaks when upgrading from 2.3.2 to 2.4.0?

2.3.2
http://pastebin.com/vU0iXxBg (http://pastebin.com/vU0iXxBg)
==8625== LEAK SUMMARY:
==8625==    definitely lost: 60 bytes in 1 blocks
==8625==    indirectly lost: 0 bytes in 0 blocks
==8625==      possibly lost: 0 bytes in 0 blocks
==8625==    still reachable: 66,350 bytes in 545 blocks
==8625==         suppressed: 0 bytes in 0 blocks
 

2.4.0
http://pastebin.com/wiakFQNT (http://pastebin.com/wiakFQNT)
==9871== LEAK SUMMARY:
==9871==    definitely lost: 2,580,736 bytes in 152 blocks
==9871==    indirectly lost: 2,720 bytes in 18 blocks
==9871==      possibly lost: 42,897,582 bytes in 7,444 blocks
==9871==    still reachable: 155,318 bytes in 774 blocks
==9871==         suppressed: 0 bytes in 0 blocks
 

My OS is Ubuntu 14.04 and I dont have any minimal code.

Its my first post, so sorry if is not the right place to post it or is not formatted well.

Pinkii
Title: AW: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: eXpl0it3r on August 20, 2016, 11:57:12 am
I dont have any minimal code.
Why not?
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: Pinkii on August 20, 2016, 02:08:39 pm
Didnt have at that moment.

I have tried the sfml pong example https://github.com/SFML/SFML/tree/master/examples/pong (https://github.com/SFML/SFML/tree/master/examples/pong) and the result of valgrind:

==4716== LEAK SUMMARY:
==4716==    definitely lost: 578,736 bytes in 19 blocks
==4716==    indirectly lost: 0 bytes in 0 blocks
==4716==      possibly lost: 42,878,414 bytes in 7,325 blocks
==4716==    still reachable: 155,291 bytes in 785 blocks
==4716==         suppressed: 0 bytes in 0 blocks
 

I was just asking if anyone had the same problem or was that I'm derp or something.
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: binary1248 on August 20, 2016, 02:23:07 pm
Try out PR #1135 (https://github.com/SFML/SFML/pull/1135).
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: Pinkii on August 20, 2016, 02:48:11 pm
Try out PR #1135 (https://github.com/SFML/SFML/pull/1135).

Tried and didnt fix it. The pong still has memory leaks.
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: binary1248 on August 20, 2016, 02:49:41 pm
Care to provide the trace?
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: Pinkii on August 20, 2016, 03:00:36 pm
Care to provide the trace?

What I have to do to provide the trace? I dont know what do you mean. Sorry
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: binary1248 on August 20, 2016, 03:09:18 pm
The same things you pasted on pastebin in your first post.
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: Pinkii on August 20, 2016, 03:14:23 pm
yup sorry  ;D

http://pastebin.com/4eTPZiQf (http://pastebin.com/4eTPZiQf)

I have tried to compile the sfml with the -g flag, but it doesn't show the line of the trace.
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: binary1248 on August 20, 2016, 03:25:21 pm
The leak we can fix was fixed in the PR I submitted. On my system, valgrind reports 0 bytes lost after applying the patch. The remaining bytes (there are less with the patch than without) you are seeing is coming from somewhere inside the Intel graphics driver. This has been an issue for a very long time. There is nothing we can do about it.
Title: Re: Memory leaks when upgrading to 2.4.0 from 2.3.2
Post by: Pinkii on August 20, 2016, 03:33:25 pm
Oki. Thanks for your effort and time!

I will look if I have any driver than is not updated.

Thanks!
Pinkii