top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

HandlerThread won't clean its File Descriptors on Android?

+1 vote
181 views

I am having a peculiar problem regarding HandlerThreads and Dialog boxes. I create a new HandlerThread object to show a dialog box (this is from a non ui class, using the callers context) and then quit the thread once the dialog box closes.

The thread gets stopped alright, but the object does not get GC'd and the file descriptor count for the process has increased. When I do this repeatedly, the app reaches 1024 open fd's and crashes. Am I missing something or Is this an OS issue?

posted Jun 4, 2014 by Naveena Garg

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Has anyone archived some third-party libs like jars, .so files into a module to generate an aar file? I put the .so files into jniLibs, but when I generate an aar files, I found the menu of the files was wrong with some empty dirs. And I put this aar file into my project, something goes wrong (crashes) when it calls .so files.

Can u help me to make it right?

+3 votes

I want to send a file (video) from android to server and vice versa. And I want the setup to work for N number of devices (more than 1). I assume we can use socket, yet I am not sure if using Socket for this requirement is the best way. Thanks in advance.

...