Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubnetDevices.java - IllegalAccessError #79

Open
grolschie opened this issue Nov 1, 2020 · 5 comments
Open

SubnetDevices.java - IllegalAccessError #79

grolschie opened this issue Nov 1, 2020 · 5 comments

Comments

@grolschie
Copy link

grolschie commented Nov 1, 2020

Hi. I have seen this error on 2 devices so far, one actual device running Android 10 with over 5GB RAM (showing in Android Vitals) and one test device running Android 5 with 2GB RAM (showing in Pre-launch Reports).

FATAL EXCEPTION: AsyncTask #3
Process: [redacted] PID: 21041
java.lang.RuntimeException: An error occured while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:300)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.IllegalAccessError: Could not access local ip address
	at com.stealthcopter.networktools.SubnetDevices.fromLocalAddress(SubnetDevices.java:47)

I'm not really sure what to do about this, besides just catching it. (And yes, at some stage I plan to move away from AsyncTask.)

Your thoughts please? I'm not seeing anything relating to being out of memory.

@grolschie
Copy link
Author

Is this project dead?

@stealthcopter
Copy link
Owner

stealthcopter commented Dec 13, 2020

@grolschie It's not quite dead, but my day job has switched away from Android development so work on this has taken a back seat. This library is still used in some of my apps, so I will likely still make infrequent updates. I welcome pull requests with fixes and improvements though.

For this error, it looks like it's just failing because no IPv4 addresses are found. It's not ideal for the library to handle it like this, but a try/catch should suffice for now.

@grolschie
Copy link
Author

Thank you for that. Understood. 👍

After posting this I'm catching that exception as well as reducing the number of threads to 128. And I haven't seen the error since (obviously). So is the reduction of threads unnecessary? 256 is ok?

By the way, thanks for this library. It was a real lifesaver for me!

@eksencncozay
Copy link

Hi. I have seen this error on 2 devices so far, one actual device running Android 10 with over 5GB RAM (showing in Android Vitals) and one test device running Android 5 with 2GB RAM (showing in Pre-launch Reports).

FATAL EXCEPTION: AsyncTask #3
Process: [redacted] PID: 21041
java.lang.RuntimeException: An error occured while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:300)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.IllegalAccessError: Could not access local ip address
	at com.stealthcopter.networktools.SubnetDevices.fromLocalAddress(SubnetDevices.java:47)

I'm not really sure what to do about this, besides just catching it. (And yes, at some stage I plan to move away from AsyncTask.)

Your thoughts please? I'm not seeing anything relating to being out of memory.

@grolschie
Copy link
Author

Try setting the number of threads to 128. According to the readme file, the default is 255 for this tool. I haven't had the problem since doing this. You may have to wait just a little longer for the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants