I'm using Plwindow.tcl to provide plot windows inside a
GUI written with Itcl/Itk/Iwidgets. The GUI works fine
under Windows 2000 (with TclPro 1.4, or Tcl 8.3 with
Itcl/Itk/Iwidgets added). The GUI crashes on Linux
(Red Hat Enterprise Workstation 3.1). I've created a
short (67 lines) script to demonstrate the behavior.
The script creates a window with a single button
"Toggle Plot". When the user clicks on the button,
Plwindow.tcl is used to create a PLPLOT widget that is
packed into the window above the "Toggle Plot" button.
When "Toggle Plot" is clicked again, the PLPLOT
window is destroyed and the window contains only the
"Toggle Plot" button. On Windows 2000, clicking the
button again brings the plot back (created anew by
On Windows, you can alternate back and forth by
repeatedly clicking on the button.
On Linux (using Tcl 8.3 with Itcl/Itk/Plplotter), the
window first appears with the "Toggle Plot" button.
Clicking on the button brings up the plot. Clicking on
the button a second time destroys the plot. Clicking
on the button a third time (to create the plot again)
causes a crash (the window is destroyed and I get
bounced out of Wish).
I added some instrumentation to PLPLOT using
fprintf(stderr,... statements. The problem seems to be
in the tkwin.c driver. The first error reported is
"Error in XCreatePixmap: BadWindow (invalid Window
I've attached a ZIP file containing:
(1) the test script (test_frames.tcl),
(2) error messages from fprintf(stderr,... statements
in the Linux PLPLOT
(3) details of how I built the PLPLOT library on Linux
from the 5.3.1 distribution for use with Itcl/Itk/Iwidgets.
I built the PLPLOT library on Windows 2000 using the
Any ideas about what is causing the problem on Linux?