guardianproject / guardianproject/tor-android
crashes on slow devices when obtaining the control socket's file descriptor
- Dominant language
- Java
- Stars
- 286
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
Testing with an ancient Samsung Galaxy S (!), I saw nullpointer exceptions, when [attempting to obtain the filedescriptor of the control socket](https://github.com/guardianproject/tor-android/blob/c43cea7492903d3b8fd9544a77f650e642bbe6ae/tor-android-binary/src/main/java/org/torproject/jni/TorService.java#L293)
```
FileDescriptor controlSocketFd = prepareFileDescriptor(getControlSocket(TorService.this).getAbsolutePath());
```
I haven't tested that fix https://github.com/guardianproject/tor-android/pull/76, but what I did is to [iterate over that line with a little delay](https://0xacab.org/leap/android_libs/tor-android/-/blob/main/tor-android-binary/src/main/java/org/torproject/jni/TorService.java#L350). It's not well designed, but it fixed my real-world problem and reduced the crash rate.
Feel free to close this issue, might just be an idea.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.