[comp.windows.x] Strange behavior of XOpenDisplay when trying to run Tk

aipdc@castle.ed.ac.uk (Paul D. Crowley) (06/04/91)

I'm having a problem running Tk.  Everything builds fine, but when I run
"wish", it exits silently with error code 1.  Using printfs and a
debugger, I've tracked the problem down to the call to XOpenDisplay. 
XOpenDisplay calls _XRead, which calls XDefaultIOHandler, which calls
exit(1).  According to the documentation, XOpenDisplay should always
either exit successfully or return NULL.  Also XOpenDisplay is being
handed a valid display name. 

Furthermore, I can't pin the problem down any further with the debugger
because it goes away when you look too hard at it! If you place a trace
on XRead, and step through the first few lines at least once, it goes
away, so I think it has something to do with wild pointers. 

I'm running DYNIX(R) V3.0.17.9 on a Sequent Symmetry, on a TekXpress
X11R4 terminal.  I'm also completely lost. 

My apologies for asking again, I hope that the extra data would produce
a response.

Any help will be greatly appreciated.  Thanks in advance.
                                         ____
\/ o\ Paul Crowley aipdc@castle.ed.ac.uk \  /
/\__/ Part straight. Part gay. All queer. \/
"I say we kill him and eat his brain."
"That's not the solution to _every_ problem, you know!" -- Rudy Rucker