Issue 19733: Setting image parameter of a button crashes with Cocoa Tk (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/63932

classification

Title: Setting image parameter of a button crashes with Cocoa Tk
Type: crash Stage: resolved
Components: macOS, Tkinter Versions: Python 3.3, Python 3.4, Python 2.7

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: Arfrever, Dima Pasechnik, miss-islington, ned.deily, python-dev, ronaldoussoren, serhiy.storchaka, zhtw1234
Priority: normal Keywords: patch

Created on 2013-11-23 13:09 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23785 merged serhiy.storchaka,2020-12-15 17:01
PR 23799 merged miss-islington,2020-12-16 10:32
Messages (12)
msg203999 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-23 13:09
From : With Cocoa Tk 8.5.15 or Cocoa Tk 8.6.1 on OS X 10.8.5, test_widgets.ButtonTest crashes Tk: test_image (tkinter.test.test_tkinter.test_widgets.ButtonTest) ... 2013-11-03 01:52:53.498 pytest_10.8[82465:f07] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /SourceCache/AppKit/AppKit-1187.40/AppKit.subproj/NSBitmapImageRep.m:1242 2013-11-03 01:52:53.499 pytest_10.8[82465:f07] An uncaught exception was raised 2013-11-03 01:52:53.499 pytest_10.8[82465:f07] Invalid parameter not satisfying: cgImage != NULL 2013-11-03 01:52:53.502 pytest_10.8[82465:f07] ( 0 CoreFoundation 0x965eae8b __raiseError + 219 1 libobjc.A.dylib 0x956d152e objc_exception_throw + 230 2 CoreFoundation 0x9654a698 +[NSException raise:format:arguments:] + 136 3 Foundation 0x966a5364 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 4 AppKit 0x98a34525 -[NSBitmapImageRep initWithCGImage:] + 145 5 Tk 0x00725a48 CreateNSImageWithPixmap + 151 6 Tk 0x00725b1c TkMacOSXGetNSImageWithTkImage + 149 7 Tk 0x0071eb2f TkpComputeButtonGeometry + 2550 8 Tk 0x0069849d TkButtonWorldChanged + 470 9 Tk 0x00698e99 ConfigureButton + 1981 10 Tk 0x0069980f ButtonWidgetObjCmd + 440 11 Tcl 0x00579c2f TclEvalObjvInternal + 770 12 Tcl 0x0057ac1a Tcl_EvalObjv + 72 13 _tkinter.so 0x0055db81 Tkapp_Call + 673 [...]
msg204008 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-23 13:34
New changeset 9d0a76349eda by Serhiy Storchaka in branch '3.3': Issue #19733: Temporary disable test_image on MacOSX. http://hg.python.org/cpython/rev/9d0a76349eda New changeset 71e091ed2588 by Serhiy Storchaka in branch 'default': Issue #19733: Temporary disable test_image on MacOSX. http://hg.python.org/cpython/rev/71e091ed2588 New changeset 3912934e99ba by Serhiy Storchaka in branch '2.7': Issue #19733: Temporary disable test_image on MacOSX. http://hg.python.org/cpython/rev/3912934e99ba
msg204189 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2013-11-24 07:56
> New changeset 3912934e99ba by Serhiy Storchaka in branch '2.7': > Issue #19733: Temporary disable test_image on MacOSX. > http://hg.python.org/cpython/rev/3912934e99ba This commit introduced SyntaxError in Lib/lib-tk/test/test_tkinter/test_widgets.py
msg204230 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-24 16:27
Oh-oh. Thank you Arfrever.
msg204231 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-24 16:27
New changeset 77e3e395f446 by Serhiy Storchaka in branch '2.7': Fixed merging error in changeset 3912934e99ba (issue #19733). http://hg.python.org/cpython/rev/77e3e395f446
msg379417 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-10-23 09:02
It looks like the test can be reenabled. System: macOS 10.15, with Python 3.9 from Python.org ``python3.9 -m tkinter.test.test_tkinter.test_widgets`` runs without problems (571 tests, no crash), even if I remove the skip for test_image. Likewise for ``python3.9 -m unittest discover tkinter.test.test_tkinter`` (703 tests)
msg383142 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-16 10:32
New changeset 5f0fe8ec70120f4586d08978b0911b436f82c421 by Serhiy Storchaka in branch 'master': bpo-19733: Re-enable tests for -image option in Tkinter (GH-23785) https://github.com/python/cpython/commit/5f0fe8ec70120f4586d08978b0911b436f82c421
msg383145 - (view) Author: miss-islington (miss-islington) Date: 2020-12-16 10:54
New changeset cd7412e3c4a2805009d0baa948cd4026d6fa6f3d by Miss Islington (bot) in branch '3.9': bpo-19733: Re-enable tests for -image option in Tkinter (GH-23785) https://github.com/python/cpython/commit/cd7412e3c4a2805009d0baa948cd4026d6fa6f3d
msg383392 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-19 17:49
Thank you for tracking it Ronald. Could this issue be closed now?
msg386478 - (view) Author: Dima Pasechnik (Dima Pasechnik) Date: 2021-02-04 12:29
was it tested on macOS 11.2 ? Tests fail there with Python 3.9.1
msg386491 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-02-04 19:18
> was it tested on macOS 11.2 ? > Tests fail there with Python 3.9.1 The change to re-enable the previously crashing test will first be released in 3.9.2 and AFAICT no longer causes a crash. There are other Tk-related test failures on macOS with Tk 8.6.11 but no crashes like this as far as I know.
msg386492 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-02-04 19:19
> The change to re-enable the previously crashing test will first be released in 3.9.2 It's also in the recently-released 3.10.0a5 release preview.
History
Date User Action Args
2022-04-11 14:57:54 admin set github: 63932
2021-02-04 19:19:58 ned.deily set messages: +
2021-02-04 19🔞34 ned.deily set messages: +
2021-02-04 12:29:42 Dima Pasechnik set nosy: + Dima Pasechnikmessages: +
2020-12-22 09:12:18 ronaldoussoren set status: open -> closedresolution: fixedstage: patch review -> resolved
2020-12-19 17:49:00 serhiy.storchaka set status: pending -> openmessages: +
2020-12-19 17:47:47 serhiy.storchaka set status: open -> pending
2020-12-16 11:11:24 ned.deily set hgrepos: - hgrepo395
2020-12-16 11:10:47 ned.deily set files: - IMAG0215(5).jpg
2020-12-16 11:10:22 ned.deily set messages: -
2020-12-16 11:05:50 zhtw1234 set messages: +
2020-12-16 11:04:40 ned.deily set messages: -
2020-12-16 11:04:08 ned.deily set messages: -
2020-12-16 11:03:39 zhtw1234 set messages: +
2020-12-16 11:01:05 zhtw1234 set files: + IMAG0215(5).jpgnosy: + zhtw1234messages: + hgrepos: + hgrepo395
2020-12-16 10:54:24 miss-islington set messages: +
2020-12-16 10:32:46 miss-islington set nosy: + miss-islingtonpull_requests: + <pull%5Frequest22657>
2020-12-16 10:32:10 serhiy.storchaka set messages: +
2020-12-15 17:01:14 serhiy.storchaka set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest22642>
2020-10-23 09:02:34 ronaldoussoren set messages: +
2013-11-24 16:27:33 python-dev set messages: +
2013-11-24 16:27:03 serhiy.storchaka set messages: +
2013-11-24 07:56:27 Arfrever set nosy: + Arfrevermessages: +
2013-11-23 13:34:54 python-dev set nosy: + python-devmessages: +
2013-11-23 13:09:46 serhiy.storchaka create