Menu

#1016 Core dump on tk_getOpenFile

obsolete: 8.3.1
closed-out-of-date
nobody
5
2001-06-04
2001-05-29
John Seal
No

The following script will demonstrate the problem:

set DISPLAY "[info hostname]:0.0"
toplevel .foo -screen $DISPLAY
set mb [menu .foo.menu]
.foo configure -menu $mb
tk_getOpenFile

Here is a wish transcript that demonstrates it on my platform:

% parray tcl_platform
tcl_platform(byteOrder) = bigEndian
tcl_platform(machine) = sun4m
tcl_platform(os) = SunOS
tcl_platform(osVersion) = 5.6
tcl_platform(platform) = unix
tcl_platform(user) = sealj
% puts $tcl_patchLevel
8.3.1
% puts $tk_patchLevel
8.3.1
% toplevel .foo -screen "[info hostname]:0.0"
.foo
% .foo configure -menu [menu .foo.menu]
% tk_getOpenFile
Tk_Get3DBorderFromObj called with non-existent border!
Abort (core dumped)

The crash does not always occur instantaneously, sometimes it doesn't occur until you either move
the tk_getOpenFile window or the mouse enters another window. The problem does not occur if

* You use the original "." toplevel, or
* You omit the -screen argument to the new toplevel, or
* You don't configure the new toplevel with a -menu.

If you call tk_getOpenFile before doing those things, then sometimes it will still work afterward
without crashing.

Discussion

  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    Works just fine for me with 8.3.2 under SunOS 5.8 (whatever
    version of Solaris that is! Sun's naming schemes are
    confusing...)

     
  • Donal K. Fellows

    • labels: --> 37. [tk_get*File]
     
  • John Seal

    John Seal - 2001-05-30

    Logged In: YES
    user_id=231769

    Could this be related to my use of focus-follows-mouse in X?

    Also, I routinely run TkDesk 1.0b3, which uses Tcl 7.6/Tk 4.2, but the sample script still crashes whether or
    not TkDesk is running.

     
  • D. Richard Hipp

    D. Richard Hipp - 2001-05-30

    Logged In: YES
    user_id=69293

    The "-screen" option for "toplevel" was busted
    in Tk8.3.1. The error caused Tk to (sometimes)
    core when a menu was launched or when a Image
    after the toplevel with an alternative -display
    was created. The problem was fixed in Tk8.3.2.

    I suspect that this is the same problem.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2001-06-04
    • status: open --> closed-out-of-date
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2001-06-04

    Logged In: YES
    user_id=72656

    This is as Richard noted, fixed in 8.3.2.