Segmentation fault from Tk_Init() call whle running X11
Michael Rogers
michael_lloyd_rogers@yahoo.com
Fri Aug 8 19:11:00 GMT 2008
This is spill-over from my eariler thread about trying to get a graphing library working that uses X11 with Tcl/Tk. But I think this is what it's come down to. But it seems like a pretty basic Tcl/Tk problem so I figured it was time to start a new thread about it.
The initialization routines for the library call Tk_Init(interp) (interp is a data structure that's created by an earlier call to Tcl/Tk routine) after successfully initializing xwindows via XInit() and various calls to initialize colors and fonts and then calling Tcl_Init(interp). Everything worked up until Tk_Init.
So heres the problem: Tk_Init(interp) is causing a segmentation fault.
Eariler, Yaakov, said that cygwin's Tcl/Tk is based on GDI and he's pushing to get a native X11/*Nix version pushed out in the next cygwin release. So I've known this might be part of the problem for a while, but I went ahead and tried to make the library and test files work with the existing Tcl/TK implementation, thinking that they should at least be simultaneously operable with X11. But I'm porting this library from a *Nix distribution and the makefiles didn't know anything about cygwin initially. So it has no special provisions for anything cygwin specific other than what might be in the platform-dependent Tcl/Tk header files.
Is there something I need to know about before proceeding any further with this? Is this a previously known problem? Maybe one with a work-around, like calling things, or linking, in a different order or something? Unless cygwin's Tk, or my version of it, is broken, it seems like there should be a way to get this to work, even with X11 also loaded. Is there some call I need to make first or something. This graphing library was last updated by its maintainers about 3 or 4 years ago so perhaps something has changed with Tk since then. I don't know. Or do I need to just get the X11/*Nix version of the Tcl/Tk libraries that Yaakov told me about out on Cygwin Ports?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
More information about the Cygwin-xfree
mailing list