_X11TransSocketOpen: socket() failed
I just set up a program which would read in a large number of data files and out put frames to the screen, then windowdump them. Since the files are not numbered consecutively, it starts at the know lowest number and checks to see if the file exists. If it does then it opens it; if not it increments the number in the name of the file by one and checks that.
When a viable file is found; the program calls another program to display it; take 3 "snapshots" and then exit. It then continues checking for files.
When I run it; it works fine for the first 300 or so frames. It then begins giving an error from my window dump function that it Failed to open file for window dump. It seems to be still capturing 2 frames though. Finally; towards the end of the list it gives a new, _X11TransSocketOpen: socket() failed error, and seems to be only generating one frame. It may then stop again after a few frames; I can't tell.
The error may be a linux based one; but is there anything in OpenGL that would trigger it? Based on the depreciation of frames captured; is it a memory issue? I'll post the code if needed; thanks!
I'd check to make sure your X11 system is patched. IIRC, there's an xlib bug that can cause the wrong error message to be displayed if you open too many files at once.
That being said, you probably aren't freeing some resources properly, probably by not closing down file descriptors.
That being said, you probably aren't freeing some resources properly, probably by not closing down file descriptors.
Quote: Original post by SiCrane
I'd check to make sure your X11 system is patched. IIRC, there's an xlib bug that can cause the wrong error message to be displayed if you open too many files at once.
That being said, you probably aren't freeing some resources properly, probably by not closing down file descriptors.
I doubt that its patched. At least not by me. The system is new (well; 2-3 months) with RedHat linux installed.
The closing down file descriptors does sound likely though; in my filecheck I'm sure
if(fopen(filename,"r")!=NULL)
and likely my incremental loop; while(fopen(fname,"r")!=NULL)
So; just use file pointers to store the fopen; then fclose them?
Or is there something else that I just don't know about....
Thanks!
That fopen() part sounds like it could be the culprit. Everytime you do a successful fopen(), you should fclose() the FILE *, since you aren't keeping track of the FILE * that you receive from the fopen() calls, then the file descriptors are probably leaking.
Quote: Original post by SiCrane
That fopen() part sounds like it could be the culprit. Everytime you do a successful fopen(), you should fclose() the FILE *, since you aren't keeping track of the FILE * that you receive from the fopen() calls, then the file descriptors are probably leaking.
Alright! I added the pointers and the fclose's. They were there originaly but gave me an "integer cast" error with out enough '('s.
Added them again; and it runs like clockwork.
Thanks very much; I know that wasn't strictly an OpenGL problem.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement