piston
piston copied to clipboard
Question: Piston Game Engine has memory leak?
result: http://paste.ubuntu.com/23781446/ code: http://paste.ubuntu.com/23781447/ Cargo.toml: http://paste.ubuntu.com/23781450/
This is probably https://github.com/tomaka/winit/issues/79
Also you should try running valgrind on a non-Rust OpenGL application to make sure they are not a problem in the OpenGL driver instead.
@tomaka glxgears counts?
╭─mindcat@mindcat-linux-pc ~/workspace/tictactoe ‹master*›
╰─➤ valgrind glxgears 127 ↵
==17178== Memcheck, a memory error detector
==17178== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==17178== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==17178== Command: glxgears
==17178==
==17178== Conditional jump or move depends on uninitialised value(s)
==17178== at 0x4C31CA6: rawmemchr (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17178== by 0x5762421: _IO_str_init_static_internal (in /usr/lib/libc-2.24.so)
==17178== by 0x5755BE6: vsscanf (in /usr/lib/libc-2.24.so)
==17178== by 0x5750356: sscanf (in /usr/lib/libc-2.24.so)
==17178== by 0x776416A: ??? (in /usr/lib/libdrm.so.2.4.0)
==17178== by 0x77644A2: ??? (in /usr/lib/libdrm.so.2.4.0)
==17178== by 0x7767F18: drmGetDevice (in /usr/lib/libdrm.so.2.4.0)
==17178== by 0x4E82246: ??? (in /usr/lib/mesa/libGL.so.1.2.0)
==17178== by 0x4E81604: ??? (in /usr/lib/mesa/libGL.so.1.2.0)
==17178== by 0x4E55938: ??? (in /usr/lib/mesa/libGL.so.1.2.0)
==17178== by 0x4E51B5A: ??? (in /usr/lib/mesa/libGL.so.1.2.0)
==17178== by 0x4E51CC2: glXChooseVisual (in /usr/lib/mesa/libGL.so.1.2.0)
==17178==
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
^C==17178==
==17178== Process terminating with default action of signal 2 (SIGINT)
==17178== at 0x57CCAC5: ioctl (in /usr/lib/libc-2.24.so)
==17178== by 0x7764A27: drmIoctl (in /usr/lib/libdrm.so.2.4.0)
==17178== by 0x91F89FA: ??? (in /usr/lib/libdrm_intel.so.1.0.0)
==17178== by 0x899C69B: ??? (in /usr/lib/xorg/modules/dri/i965_dri.so)
==17178== by 0x89AB7AC: ??? (in /usr/lib/xorg/modules/dri/i965_dri.so)
==17178== by 0x4E85C2E: ??? (in /usr/lib/mesa/libGL.so.1.2.0)
==17178== by 0x401D5B: ??? (in /usr/bin/glxgears)
==17178== by 0x570C290: (below main) (in /usr/lib/libc-2.24.so)
==17178==
==17178== HEAP SUMMARY:
==17178== in use at exit: 24,508,849 bytes in 7,859 blocks
==17178== total heap usage: 20,497 allocs, 12,638 frees, 53,739,107 bytes allocated
==17178==
==17178== LEAK SUMMARY:
==17178== definitely lost: 71,664 bytes in 17 blocks
==17178== indirectly lost: 1,697 bytes in 17 blocks
==17178== possibly lost: 23,828,137 bytes in 7,531 blocks
==17178== still reachable: 607,351 bytes in 294 blocks
==17178== suppressed: 0 bytes in 0 blocks
==17178== Rerun with --leak-check=full to see details of leaked memory
==17178==
==17178== For counts of detected and suppressed errors, rerun with: -v
==17178== Use --track-origins=yes to see where uninitialised values come from
==17178== ERROR SUMMARY: 9 errors from 1 contexts (suppressed: 0 from 0)
Oops, it is.
Closing.