Tk Source Code

View Ticket
Login
Ticket UUID: 1785511
Title: "unknown display passed to Tk_PreserveColormap"
Type: Bug Version: obsolete: 8.4.15
Submitter: nobody Created on: 2007-08-31 11:10:24
Subsystem: 05. Canvas Items Assigned To: hobbs
Priority: 8 Severity:
Status: Pending Last Modified: 2026-09-28 14:38:51
Resolution: None Closed By:
    Closed on:
Description:
This error is hard to reproduce. The number of images
is not critical. The reuse of the image names when recreating the images may be.

Basic method.

   create a canvas widget
   create three gif images with "image create photo"
   create three image items on the canvas.

   delete the three images
   re-source the script above.
   do not call update or update idletasks between
   image deletion and re-creation.

The panic appears to happen at the time the images are recreated and before they are added to the canvas although this cannot be confirmed.
   
It is likely that the cause of the error is the fact that the original images are deleted via an idle callback which has not fired by the time they are re-created and the new images that are recreated using the same names are being deleted by the idle call back which now fires for the three original images.
User Comments: serhiy.storchaka added on 2026-09-28 14:38:51:

I cannot reproduce it with 8.4.15 (the reported version), 8.6, 9.0 and 9.1, also under valgrind: photo images displayed on a canvas were deleted and recreated with the same names hundreds of times without update, with the old canvas items removed or kept.

The panic is only possible if a photo instance refers to a display which is not open. Please provide a script if it still happens.


[email protected] added on 2007-12-02 12:47:56:
Logged In: NO 

I can confirm this is still an issue in 8.4.16.