1. Can't write ex.err

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

new topic     » topic index » view message » categorize

2. Re: Can't write ex.err

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Can't write ex.err

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: Can't write ex.err

ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: Can't write ex.err

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: Can't write ex.err

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: Can't write ex.err

'lsof' will show you all open files.

'fuser -m' will show you processes using a given file.

These might help.

Craig

new topic     » goto parent     » topic index » view message » categorize

8. Re: Can't write ex.err

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu