I have an Android app that uses a timer to call an AsyncTask every 5-10 seconds (using java.util.Timer and java.util.TimerTask). The AsyncTask gets image data from an Amazon AWS S3 database, and loads an ImageView for the main UI Activity.
This works fine for an hour or two, but then I get a cryptic error message and the app gets killed. The error message comes from "Looper" and says either:
Could not create epoll instance. errno=24
or
Could not create wake pipe
A search on the web seems to indicate the problem may have something to do with file descriptors (too many open file descriptors ?). I've gone through the code, but don't see any place where files, streams, or connections aren't closed.
When the app is killed, logcat has a message from AndroidRuntime that says:
FATAL EXCEPTION: main
Does anyone have a clue about these messages, or how to fix? Thank you!