Title: Memory Leak in Agg · Issue #3197 · matplotlib/matplotlib · GitHub
Open Graph Title: Memory Leak in Agg · Issue #3197 · matplotlib/matplotlib
X Title: Memory Leak in Agg · Issue #3197 · matplotlib/matplotlib
Description: First, the relevant output of valgrind with --tool=memcheck --leak-check=full --show-leak-kinds=all: ==2657== 4,841,396 bytes in 2 blocks are still reachable in loss record 4,337 of 4,341 ==2657== at 0x4C2BC79: operator new[](unsigned lo...
Open Graph Description: First, the relevant output of valgrind with --tool=memcheck --leak-check=full --show-leak-kinds=all: ==2657== 4,841,396 bytes in 2 blocks are still reachable in loss record 4,337 of 4,341 ==2657== ...
X Description: First, the relevant output of valgrind with --tool=memcheck --leak-check=full --show-leak-kinds=all: ==2657== 4,841,396 bytes in 2 blocks are still reachable in loss record 4,337 of 4,341 ==2657== ...
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3197
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Memory Leak in Agg","articleBody":"First, the relevant output of valgrind with `--tool=memcheck --leak-check=full --show-leak-kinds=all`:\n\n```\n==2657== 4,841,396 bytes in 2 blocks are still reachable in loss record 4,337 of 4,341\n==2657== at 0x4C2BC79: operator new[](unsigned long) (vg_replace_malloc.c:384)\n==2657== by 0x2D592353: RendererAgg::tostring_rgba_minimized(Py::Tuple const&) (_backend_agg.cpp:2382)\n==2657== by 0x2D5A3363: Py::PythonExtension\u003cRendererAgg>::method_varargs_call_handler(_object*, _object*) (ExtensionOldType.hxx:291)\n==2657== by 0x54BB13: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x577BE1: ??? (in /usr/bin/python2.7)\n==2657== \n==2657== 55,424,972 bytes in 33 blocks are definitely lost in loss record 4,339 of 4,341\n==2657== at 0x4C2BC79: operator new[](unsigned long) (vg_replace_malloc.c:384)\n==2657== by 0x2D592353: RendererAgg::tostring_rgba_minimized(Py::Tuple const&) (_backend_agg.cpp:2382)\n==2657== by 0x2D5A3363: Py::PythonExtension\u003cRendererAgg>::method_varargs_call_handler(_object*, _object*) (ExtensionOldType.hxx:291)\n==2657== by 0x54BB13: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x577BE1: ??? (in /usr/bin/python2.7)\n==2657== \n==2657== 56,230,256 bytes in 25 blocks are possibly lost in loss record 4,340 of 4,341\n==2657== at 0x4C2BC79: operator new[](unsigned long) (vg_replace_malloc.c:384)\n==2657== by 0x2D592353: RendererAgg::tostring_rgba_minimized(Py::Tuple const&) (_backend_agg.cpp:2382)\n==2657== by 0x2D5A3363: Py::PythonExtension\u003cRendererAgg>::method_varargs_call_handler(_object*, _object*) (ExtensionOldType.hxx:291)\n==2657== by 0x54BB13: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x54C027: PyEval_EvalFrameEx (in /usr/bin/python2.7)\n==2657== by 0x575D91: PyEval_EvalCodeEx (in /usr/bin/python2.7)\n==2657== by 0x577BE1: ??? (in /usr/bin/python2.7)\n==2657== \n==2657== LEAK SUMMARY:\n==2657== definitely lost: 55,490,524 bytes in 83 blocks\n==2657== indirectly lost: 20,256 bytes in 407 blocks\n==2657== possibly lost: 56,383,520 bytes in 481 blocks\n==2657== still reachable: 11,403,937 bytes in 13,860 blocks\n==2657== suppressed: 179,227,068 bytes in 27,533 blocks\n```\n\nI am drawing many maps (with basemap) with polygon collections using the agg backend and then save them as png or svg. I always close the figures and start fresh. The more I draw the higher the memory usage gets, which is why I ran memcheck. I will try to come up with a minimal example that reproduces this.\n\nI am using mpl 1.3.1, basemap 1.0.7, Python 2.7.3.\n","author":{"url":"https://github.com/letmaik","@type":"Person","name":"letmaik"},"datePublished":"2014-07-08T10:03:22Z","url":"https://github.com/matplotlib/matplotlib/issues/3197"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fd8fe6d8-41f8-615f-9485-46eacf8282d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB30:1EFD:E422D:13C579:6B069334 |
| html-safe-nonce | eb46433063ac5694bf1bead5f47aa5fc4c00dc4c4e4463b6ccb3fcd9ac534956 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjMwOjFFRkQ6RTQyMkQ6MTNDNTc5OjZCMDY5MzM0IiwidmlzaXRvcl9pZCI6Ijc5Njg0Nzc1MzkzMDYyMTQxOTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2e2eb32e36c872f9479c069c13055d626430a6ba351364a87813e777def1afa7 |
| hovercard-subject-tag | issue:37351726 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/3197/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6301a46a43ef906e5b8929516bfbbd2ee8545feb9539a5d3e2a2756b32323eb4/matplotlib/matplotlib/issues/3197 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6301a46a43ef906e5b8929516bfbbd2ee8545feb9539a5d3e2a2756b32323eb4/matplotlib/matplotlib/issues/3197 |
| og:image:alt | First, the relevant output of valgrind with --tool=memcheck --leak-check=full --show-leak-kinds=all: ==2657== 4,841,396 bytes in 2 blocks are still reachable in loss record 4,337 of 4,341 ==2657== ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | letmaik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width