Page MenuHomeWildfire Games
Paste P173

GUIRenderer::Draw(DrawCalls& Calls, float Z) possible leak
ActivePublic

Authored by elexis on Sep 9 2019, 7:59 PM.
==362884== 136 bytes in 1 blocks are possibly lost in loss record 2,222 of 2,942
==362884== at 0x483877F: malloc (vg_replace_malloc.c:299)
==362884== by 0x258937B8: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25893A36: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25891167: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25EACB3E: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25EABDC5: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25DFFF6A: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25E9BCBC: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x25E9BD73: ??? (in /usr/lib/dri/r600_dri.so)
==362884== by 0x6445A9: GUIRenderer::Draw(GUIRenderer::DrawCalls&, float) (GUIRenderer.cpp:411)
==362884== by 0x61BBB7: CImage::Draw() (CImage.cpp:41)
==362884== by 0x6128BA: void IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (IGUIObject.h:276)

Event Timeline

elexis created this paste.Sep 9 2019, 7:59 PM
elexis created this object with visibility "Public (No Login Required)".
elexis added a comment.Sep 9 2019, 8:02 PM

The affected line in GUIRenderer::Draw is glDrawArrays(GL_TRIANGLES, 0, 6);.

Wrong use of glDrawArrays can leak:
https://community.khronos.org/t/gldrawarrays-and-memory-fragmentation/76369/3

Correct use of glDrawArrays can leak if the driver is broken:
https://community.khronos.org/t/memory-leak-in-gldrawarrays/61299