sayre@sbcs.sunysb.edu (Johannes Sayre) (03/25/89)
Hello - I've written an Xlib client which crashes the server when it terminates. The client creates a relatively large (?) number of resources - 409 windows, 89 pixmaps, etc. At the moment, my shutdown routine is pretty crude in that it simply doees an XCloseDisplay - it doesn't destroy the windows or free the pixmaps. Since the Xlib manual says the server will deallocate a client's resources when the client closes its connection, I thought doing a CloseDisplay would be enough for now. But, apparently it isn't - the server consistently crashes with a segmentation violation when my client exits. When I run dbx on Xsun and the core file, it gets a core file read error with the reason that the text space address is too high (??). Does anyone have any idea about what's going on ? Should the server deallocate properly regardless of how many resources I get ? Or would having the client free everything before exiting help ? I'm running on a Sun 3/110 running OS 3.2; X11R3 with -dev /dev/cgfour0. The same thing also happens on a color 3/260 (running the same stuff, no cg4). Thanks in advance for any ideas, information, flames about lazy programming, etc. Johannes -- Johannes Sayre Dept. of Computer Science Internet: sayre@sbcs.sunysb.edu SUNY Stony Brook UUCP: {allegra,philabs,sunybcs,research}!sbcs!sayre Stony Brook, NY 11794 CSnet: sayre@suny-sb
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (03/27/89)
Since the Xlib manual says the server will deallocate a client's resources when the client closes its connection, I thought doing a CloseDisplay would be enough for now. Yes, it should be. Should the server deallocate properly regardless of how many resources I get ? Yes. Does anyone have any idea about what's going on ? Have you applied the public fixes (especially fix 8)? If not, that might explain it. If you have, then no idea. Try running the server under dbx directly, rather than post mortem, so you can get a stack trace.