1. Can't write ex.err
- Posted by ChrisB (moderator) Jan 31, 2009
- 952 views
What does it mean?
Running an SDL program on Linux, (eu 3.11), after approximately one and a half hours of continuous looping, the program crashes with the above message. Obviously there is no ex.err, and all the permissions are in place for writing in the directory.
My feeling is that my program using SDL has a memory leak - I though I'd solved a lot of these (monitoring showed the memory staying fairly constant), but would this be enough to not allow the interpreter to write ex.err?
Any other ideas?
Chris
2. Re: Can't write ex.err
- Posted by m_sabal Jan 31, 2009
- 926 views
It sounds like either you aren't writing to the directory you think you are, or the disk is full or corrupted. If it's a network share, there could be enough of a momentary drop to cause that kind of problem, too.
3. Re: Can't write ex.err
- Posted by ChrisB (moderator) Jan 31, 2009
- 919 views
Hi
Nope, none of those things. Crashes normally with other errors, in the directory run from, all permissions and so on in place, and all wrappers for SDL in the current directory. Also the interpreter is in user space.
The SDL shared libs are in user space, which user doesn't have write access to, but why would the interpreter want to write there?
Chris
4. Re: Can't write ex.err
- Posted by ChrisB (moderator) Jan 31, 2009
- 939 views
The SDL shared libs are in user space, which user doesn't have write access to, but why would the interpreter want to write there?
Chris
Oops - no they're not - they're in /usr/lib, which is what I meant to say, instead of trying to multitask with Facebook.
Chris
5. Re: Can't write ex.err
- Posted by AndyDrummond Jan 31, 2009
- 941 views
When I had that problem, it was because I was opening files and not closing them. After a few - in my case - weeks, there were too many open, I couldn't open any more, so the program crashed and couldn't create ex.err either. See if that is the problem... Andy
6. Re: Can't write ex.err
- Posted by ChrisB (moderator) Feb 01, 2009
- 940 views
Hi
Hmm, seem to have a close associated with every open, may be an SDL image loading problem.
As an aside is there any way to get the number of handles a program has open, either from within the program, or monitoring outside?
Chris
7. Re: Can't write ex.err
- Posted by Bellthorpe Feb 01, 2009
- 919 views
'lsof' will show you all open files.
'fuser -m' will show you processes using a given file.
These might help.
Craig
8. Re: Can't write ex.err
- Posted by ChrisB (moderator) Feb 02, 2009
- 905 views
Hi, yes, that gave me the clue.
lsof was listing that the image files were open 600 odd times (not all at one, but opening them as they went through the loop). I was using IMG_LoadJPG(), which opens the files for reading, but seemingly doesn't close them. Using IMG_Load() instead seems to open and close the files as you need them.
Just ruuning it now, so will see how long it goes on for.
Thanks
Chris