Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - mperic

Pages: [1]
1
General / loadFromFile() randomly fails
« on: March 30, 2022, 06:24:10 pm »
Hi.

I am using SFML for the graphics of an ant simulation, and I am loading textures and fonts using loadFromFile(). All of these loadFromFile() calls are happening under one iteration of a loop, and when the simulation ends, the loop restarts, and loadFromFile() is called again. This works fine, but after about 3-5 hours of the loop restarting (one iteration of the loop takes appoximately 30 minutes) some of my textures won't load. And then usually, the next iteration will have no textures load.

Any idea why this may be happening?

I suspect that there may be some kind of problems occurring with file buffers since I am not closing the streams at the end of each iteration/

Is there any way to close the loadFromFile() file streams manually? Is there another possible problem here?

Thanks,
mperic

Pages: [1]
anything