Tk Source Code

View Ticket
Login
2005-05-31
12:12 Closed ticket [1159367fff]: Crash/Core dump with bad color resource in option db plus 7 other changes artifact: 42e98f3325 user: hobbs
2005-03-09
16:38 Ticket [1159367fff]: 7 changes artifact: 6075f79e4f user: dkf
2005-03-08
21:10 New ticket [1159367fff]. artifact: 3267477bd9 user: bschofield

Ticket UUID: 1159367
Title: Crash/Core dump with bad color resource in option db
Type: Bug Version: obsolete: 8.4.9
Submitter: bschofield Created on: 2005-03-08 21:10:08
Subsystem: 10. Generic Menus Assigned To: hobbs
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2005-05-31 12:12:27
Resolution: Fixed Closed By: hobbs
    Closed on: 2005-05-31 05:12:27
Description:
The following code produces a core dump or crash on
unix variants and on Windows with at least 8.4.9 and 8.4.8



% option add *background coredump
%  menu .m
unknown color name "coredump"
%  menu .m
unknown color name "coredump"
%  menu .m
Segmentation fault (core dumped)


This problem seems centered around the menu widget to
some degree and appears to be the direct result of
failling to create a menu widget because of an invalid
color in the tk option  database. Note that core dump
usually occurs while creating certain widgets after the
menu widget has failed to be created.
User Comments: hobbs added on 2005-05-31 12:12:27:
Logged In: YES 
user_id=72656

Fixed in 8.4.10 and 8.5 head.  The menu creation was not
being consistent about destruction, so the command token
remained on an option db creation error.

dkf added on 2005-03-09 16:38:39:
Logged In: YES 
user_id=79902

Bug also exists on 8.5a2 on WinXP with the following typed
commands:

  % option add *background foo
  % menu .m
  unknown color name "foo"
  % option clear
  % menu .m
  => CRASH

Crash doesn't happen if I create a menu with a name other
than .m between the 'option clear' and the second invokation
of 'menu .m'