-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
SIGSEGV crash on Android 6.0.1 #50
Comments
12-16 17:14:52.250 218-218/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
Do you get this same issue when you run without safeDetector? Note that safeDetector won't be necessary anymore in the next release. |
It does happen with the instance of the FaceDetector as well. Since it only happens at the first run after install or clean up of the app, my guess is that even though the detector.isOperational() returns true but the library hasn't been downloaded and installed. |
@pm0733464 any thoughts on this? |
Does it always crash in the same place? That is, does it always have this line with "pc 0002f30f": 12-16 17:14:52.289 218-218/? A/DEBUG: #1 pc 0002f30f /data/data/com.google.android.gms/files/com.google.android.gms.vision/face/libs/armeabi-v7a/libmobile_vision_face.so I was able to track down where in the code this is occurring. As best as I can tell, I think that it looks like your app was close to running out of memory when it called the face detector, and a memory allocation failed inside the native face detector code due to OOM conditions. A known issue is that the face detector code could be more resilient to OOM. Although it wouldn't be able to succeed if not enough memory was available, it shouldn't crash either. We will make the code more resilient in the future. I'd suggest looking at how much memory your app is using the first time that it runs, and be careful not to hold onto too many objects in memory (especially large images). Also note that there is no benefit to passing large images to the face detector. Any image whose width or height is greater than 1280 will be scaled down to between 640 - 1280 before face detection is performed. If it is possible for your app to work with smaller images, I think that you'd be less likely to hit this issue and the app would also run a little bit faster. |
Here is log for few crashes: 12-21 14:29:15.107 218 218 F DEBUG : backtrace: |
Thanks, I'll look at this some more. I wonder if the .so file is just corrupted on the device? You might try clearing the library from the device and downloading again, to see if you still get the same issue. Try this:
|
@pm0733464 |
Looks like permission is not granted. 12-16 17:14:52.245 218-218/? W/debuggerd: type=1400 audit(0.0:150): avc: denied { search } for name="com.google.android.gms" dev="dm-2" ino=403 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 |
Hi there, I faced the similar issue on Android 4.4.4 with latest vision library (9.6.1). As per my investigations, I noticed that the problem occurs when image height is not a multiple of two (probably 4). e.g. 102x1295. |
We'll have to look into this. In the mean time, I'd suggest adapting this class to work around specific image sizes that are problematic for you: This class wraps the face detector and can pad the size of the image to avoid problems like this. |
@pm0733464 yeah, that was my plan. |
I get the following crash the first time I run safeDetector.detect(), but after the first crash I don't get it any more. And I don't get any crash on older versions of android.
A/libc: invalid address or address of corrupt block 0xab516628 passed to dlfree
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xd08081c in tid 14568 (Thread-251)
Any inside on this is really appreciated.
The text was updated successfully, but these errors were encountered: