
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2018-09-24 21:30 bydtalkin, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| leak_demo.py | dtalkin,2018-09-25 14:24 | |||
| leak_demo2.py | serhiy.storchaka,2018-10-21 11:56 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 9559 | closed | serhiy.storchaka,2018-09-25 08:07 | |
| PR 10025 | merged | serhiy.storchaka,2018-10-21 11:57 | |
| PR 10069 | merged | miss-islington,2018-10-23 19:41 | |
| PR 10070 | merged | miss-islington,2018-10-23 19:41 | |
| PR 10181 | merged | serhiy.storchaka,2018-10-28 16:50 | |
| Messages (8) | |||
|---|---|---|---|
| msg326289 -(view) | Author: David Talkin (dtalkin) | Date: 2018-09-24 21:30 | |
The Tkinter.PhotoImage class leaks memory with each change of the 'data' Attribute due to Image calling tk._createbytearray, which allocates memory, but never frees it.The offending method is in the TkApp class, _createbytearray(). | |||
| msg326327 -(view) | Author: Karthikeyan Singaravelan (xtreak)*![]() | Date: 2018-09-25 06:55 | |
Thanks for the report David. Feel free to attach reproducible script if any that might trigger this. I am adding Serhiy who might have a better understanding of this. Relevant issue where _createbytearray was added :issue21580 . | |||
| msg326355 -(view) | Author: David Talkin (dtalkin) | Date: 2018-09-25 14:24 | |
Attached please find a Python script that demonstrates the bug.DavidOn Tue, Sep 25, 2018 at 2:55 AM Karthikeyan Singaravelan <report@bugs.python.org> wrote:>> Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment:>> Thanks for the report David. Feel free to attach reproducible script if> any that might trigger this. I am adding Serhiy who might have a better> understanding of this. Relevant issue where _createbytearray was added :>issue21580 .>> ----------> nosy: +serhiy.storchaka, xtreak>> _______________________________________> Python tracker <report@bugs.python.org>> <https://bugs.python.org/issue34794>> _______________________________________> | |||
| msg328205 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-10-21 11:56 | |
Here is a simpler reproducer.Actually the problem was not in _createbytearray(), but in converting the Python wrapper around Tcl_Obj into Tcl_Obj. _createbytearray() just exposed it. The leak exists in Python 3 too, but it is hard to reproduce it. | |||
| msg328338 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-10-23 19:40 | |
New changesetdf13df41a25765d8a39a77220691698498e758d4 by Serhiy Storchaka in branch 'master':bpo-34794: Fix a leak in Tkinter. (GH-10025)https://github.com/python/cpython/commit/df13df41a25765d8a39a77220691698498e758d4 | |||
| msg328342 -(view) | Author: miss-islington (miss-islington) | Date: 2018-10-23 20:25 | |
New changeset2c549250d8fd6755e3338a771d250e34c78bdb50 by Miss Islington (bot) in branch '3.6':bpo-34794: Fix a leak in Tkinter. (GH-10025)https://github.com/python/cpython/commit/2c549250d8fd6755e3338a771d250e34c78bdb50 | |||
| msg328347 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2018-10-23 21:46 | |
New changesetf7cefb427cbc50d89a4f19f7f334a4f5421cefd3 by Victor Stinner (Miss Islington (bot)) in branch '3.7':bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10069)https://github.com/python/cpython/commit/f7cefb427cbc50d89a4f19f7f334a4f5421cefd3 | |||
| msg328715 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-10-28 17:36 | |
New changesetaaea2802da0a074c695ab86911d8bcc0b2dd5ec5 by Serhiy Storchaka in branch '2.7':[2.7]bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10181)https://github.com/python/cpython/commit/aaea2802da0a074c695ab86911d8bcc0b2dd5ec5 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:06 | admin | set | github: 78975 |
| 2018-10-28 19:14:46 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-10-28 17:36:06 | serhiy.storchaka | set | messages: +msg328715 |
| 2018-10-28 16:50:30 | serhiy.storchaka | set | pull_requests: +pull_request9504 |
| 2018-10-23 21:46:43 | vstinner | set | nosy: +vstinner messages: +msg328347 |
| 2018-10-23 20:25:57 | miss-islington | set | nosy: +miss-islington messages: +msg328342 |
| 2018-10-23 19:41:18 | miss-islington | set | pull_requests: +pull_request9403 |
| 2018-10-23 19:41:10 | miss-islington | set | pull_requests: +pull_request9402 |
| 2018-10-23 19:40:58 | serhiy.storchaka | set | messages: +msg328338 |
| 2018-10-21 12:05:09 | serhiy.storchaka | set | title: memory leak in TkApp:_createbytearray -> Memory leak in Tkinter |
| 2018-10-21 11:57:08 | serhiy.storchaka | set | pull_requests: +pull_request9364 |
| 2018-10-21 11:56:54 | serhiy.storchaka | set | files: +leak_demo2.py messages: +msg328205 versions: + Python 3.6, Python 3.7, Python 3.8 |
| 2018-09-25 14:24:46 | dtalkin | set | files: +leak_demo.py messages: +msg326355 |
| 2018-09-25 08:07:04 | serhiy.storchaka | set | keywords: +patch stage: patch review pull_requests: +pull_request8961 |
| 2018-09-25 06:55:24 | xtreak | set | nosy: +serhiy.storchaka,xtreak messages: +msg326327 |
| 2018-09-24 21:30:12 | dtalkin | create | |