Issue metadata
Sign in to add a comment
|
Only use video stabilization ON when supported
Reported by
somcs...@gmail.com,
May 4 2017
|
||||||||||||||||||||||
Issue descriptionExample URL: https://webrtc.github.io/samples/src/content/getusermedia/gum/ Steps to reproduce the problem: 1.Launch Chrome 2.Go to https://webrtc.github.io/samples/src/content/getusermedia/gum/ 3. It will pop out dialogs for camera permission 4.Allow permissions for both “Allow Chrome to take pictures and record video” and “webrtc.github.io wants to use your camera” What is the expected behavior? Camera can be opened successful in Chrome What went wrong? 1.Chrome has stopped at first time launch 2.After refresh the page, camera can’t be opened successful and only black screen is displayed 3.Camera can be opened successful with “Firefox” browser Did this work before? N/A Is it a problem with Flash or HTML5? N/A Does this work in other browsers? Yes Chrome version: 58.0.3029.83 Channel: stable OS Version: Flash Version: Contents of chrome://gpu: Root Cause: Chrome set CONTROL_VIDEO_STABILIZATION_MODE_ON to camera HAL layer directly. 05-04 06:17:43.120 3475 5913 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { flg=0x14 (has extras) }] 05-04 06:17:43.131 2551 22872 E camera-hal: camera_device.cpp(3656):validateCaptureSettings: Unsupported video stabilization mode 1. 05-04 06:17:43.131 2551 22872 E camera-hal: camera_device.cpp(5509):validateCaptureSettings: validateCaptureSettings failed. 05-04 06:17:43.131 2551 22872 E camera-hal: camera_device.cpp(2819):processRequest: Invalid settings for capture. Device:1 Frame Number:0 05-04 06:17:43.131 2551 22872 E Camera3-Device: Camera 1: threadLoop: RequestThread: Unable to submit capture request 0 to HAL device: Invalid argument (-22) From below code, Chrome setting a VSmode as ON https://cs.chromium.org/chromium/src/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java?dr=CSs&l=337 Instead of setting the mode ON directly chrome should get what are the modes currently it is supported as below. int[] availableVSModes = characteristics.get(CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES); Then from availableVSModesvariable it can set the stabilization mode as below previewRequestBuilder.set(CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE, availableVSModesvariable[x]);
,
May 8 2017
,
May 9 2017
,
May 19 2017
,
May 19 2017
,
May 20 2017
,
May 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/776023a087ef75be3994cb863aad523cdf5f92da commit 776023a087ef75be3994cb863aad523cdf5f92da Author: Miguel Casas-Sanchez <mcasas@chromium.org> Date: Mon May 22 17:55:21 2017 Video capture android 2: only configure CONTROL_VIDEO_STABILIZATION_MODE_ON when available This CL changes the video stabilization mode to only configure CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_ON where supported, after reports from the field (see bug) where this is not the case, and the setting of cameraSession upsets the underlying logic. Bug: 718387 Change-Id: I3992e371a6d733d804d427c88a7b149abd70cf4b Reviewed-on: https://chromium-review.googlesource.com/510005 Reviewed-by: Christian Fremerey <chfremer@chromium.org> Commit-Queue: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#473617} [modify] https://crrev.com/776023a087ef75be3994cb863aad523cdf5f92da/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
,
May 22 2017
somcsas1@gmail.com, since this is hardware-specific, could you please confirm #7 solves the problem, when this CL lands in Canary? ([1] will tell the concrete version when it lands). [1] https://storage.googleapis.com/chromium-find-releases-static/index.html#r473617
,
May 23 2017
Can you please share the Chrome apk (60.0.3108.0).
,
May 23 2017
#9: just install Canary: https://play.google.com/store/apps/details?id=com.chrome.canary
,
May 24 2017
#7: We have tested with Chrome Canary (60.0.3108.0),Still issue exists. And also we observed continuous crash on Chrome Canary while performing the steps mentioned in description. Attached bugreport for your reference.
,
May 24 2017
#11: can you please upload the adb logcat? There might be some information as to why the camera doesn't like the configuration we're trying to make. The current code is here [1] FTR, do you spot some bug? [1] https://cs.chromium.org/chromium/src/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java?q=VideoCaptureCamera2.java&sq=package:chromium&dr&l=369
,
May 26 2017
#12 Please find the adb logcat for your reference.
,
May 26 2017
somcsas1@, thanks for the logs; I still see the same failing lines:
05-26 00:58:35.742 824 12185 E camera-hal: camera_device.cpp(3656):validateCaptureSettings: Unsupported video stabilization mode 1.
05-26 00:58:35.742 824 12185 E camera-hal: camera_device.cpp(5509):validateCaptureSettings: validateCaptureSettings failed.
05-26 00:58:35.742 824 12185 E camera-hal: camera_device.cpp(2819):processRequest: Invalid settings for capture. Device:1 Frame Number:0
as trying to set CONTROL_VIDEO_STABILIZATION_MODE_ON (== 1), but given
the current code [1], it means that it's listed as supported by the HAL,
final int[] stabilizationModes = cameraCharacteristics.get(
CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES);
for (int mode : stabilizationModes) {
if (mode == CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_ON) {
mPreviewRequestBuilder.set(CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE,
CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_ON);
break;
}
}
Do you think your smartphone is giving us a false list of
|stabilizationModes|? :-)
[1] https://cs.chromium.org/chromium/src/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java?q=VideoCaptureCamera2.java&sq=package:chromium&dr&l=373
,
May 29 2017
The NextAction date has arrived: 2017-05-29
,
May 29 2017
,
Jun 1 2017
#14 We checked in latest SW for XperiaXZ. we can not get the error info like Unsupported video stabilization mode 1.
But continuous crash happens in Chrome Canary app.
And also below error we got.
06-01 17:46:52.501 19470 21669 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
06-01 17:46:52.501 19470 21669 W System.err: at org.chromium.media.VideoCaptureCamera2.getPhotoCapabilities(VideoCaptureCamera2.java:334)
06-01 17:46:52.508 19470 21669 F chromium: [FATAL:jni_android.cc(243)] Please include Java exception stack in crash report
06-01 17:46:52.608 1764 21933 I cald : 1093654104786 excal_iq_ctrl.cpp (1146) 21933 I [INF] [P] IqCtrl::doLcPrepared
06-01 17:46:52.868 1913 1913 V battery_logging: --- battery_logging battery event ---
06-01 17:46:52.961 2246 2297 W MessageQueue: Timeout messages: 179
06-01 17:46:52.961 2246 2297 W MessageQueue: Message 0: { when=-2s217ms callbac
After allowing canary to take picture, continous crash happening we couldnt go further for streaming.
06-01 17:46:54.220 19470 21669 F libc : Fatal signal 5 (SIGTRAP), code 1 in tid 21669 (Thread-11)
06-01 17:46:54.225 480 480 W : debuggerd: handling request: pid=19470 uid=10208 gid=10208 tid=21669
06-01 17:46:54.320 22058 22058 D clmlib : Got activities:0x0000000E
06-01 17:46:54.320 22058 22058 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-01 17:46:54.320 22058 22058 F DEBUG : UUID: 7f04e86d-de14-4293-a0b4-faba224c6ac5
06-01 17:46:54.320 22058 22058 F DEBUG : Build fingerprint: 'Sony/F8331/F8331:7.1.1/41.2.A.9.29/68013014:userdebug/release-keys'
06-01 17:46:54.320 22058 22058 F DEBUG : Revision: '0'
Can you please check in XperiaXZ or XperiaXCompact device from your end also.
,
Jun 1 2017
First started seeing these in version 58.0.3015.0, it's in M59, M60, and M61.
,
Jun 1 2017
Can any of you guys add some of the chrome://crashes reports please? (otherwise it's hard to trace the crash line to the source code).
,
Jun 1 2017
aluo@ thanks for opening https://crbug.com/728735 with the crash report. somcsas1@ I believe the crash you're seeing now is unrelated to this bug's root cause. Can you please upload a few of the last crash ids in your Canary to double check it's indeed the same crash? Thanks
,
Jun 5 2017
Can you please help us to dubug, still issue is exist. After giving permission, chrome canary is continuously crashing (already shared the log of same) so we couldn't check further. can you specify what exactly you are asking.
,
Jun 5 2017
#21: I tried on Fri with an Xperia Z5 E6653 and could not repro the crash, so could you please navigate to chrome://crashes in a recent Canary and copy-paste here some of the crash id's (e.g. the last 3 or 4), so I can try and correlate those? Thanks
,
Jun 6 2017
#21: Can you please try in XperiaXZ or XperiaXCompact devices, Since issue is reproducing in X series device and not in Z5 because We have given some work around, the same patch was not involved in XperiaXZ and XperiaXCompact.
Work around for Xperia Z5:
/* set control data to VS mode_off, if mode_on is not supported */
if ((staticData.dataCount == 1) && (staticData.data[0] == ControlVideoStabilizationMode_Off ))
data = ControlVideoStabilizationMode_Off;
We made an upload of few crashes for your reference.
Crash Report ID: d4d70bc1f0000000 and 60a9d92e40000000
Please let me know if you need any information from our side.
Thanks!
,
Jun 6 2017
The NextAction date has arrived: 2017-06-06
,
Jun 6 2017
Yeah so those crashes are also https://crbug.com/728735; it's weird because the crash is systematically reported to be java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference at org.chromium.media.VideoCaptureCamera2.getPhotoCapabilities (VideoCaptureCamera2.java:340 ) but at such line [1] we're not in getPhotoCapabilities() (and never were), so we'll need to dig some more. At any rate, it seems like the current crash is not stabilization related, so this very issue should be fixed, unless you can give some more information? [1] https://cs.chromium.org/chromium/src/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java?q=VideoCaptureCamera2.java&sq=package:chromium&dr&l=340
,
Jun 6 2017
Yeah so those crashes are also https://crbug.com/728735; it's weird because the crash is systematically reported to be java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference at org.chromium.media.VideoCaptureCamera2.getPhotoCapabilities (VideoCaptureCamera2.java:340 ) but at such line [1] we're not in getPhotoCapabilities() (and never were), so we'll need to dig some more. At any rate, it seems like the current crash is not stabilization related, so this very issue should be fixed, unless you can give some more information? [1] https://cs.chromium.org/chromium/src/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java?q=VideoCaptureCamera2.java&sq=package:chromium&dr&l=340
,
Jun 7 2017
Can you please let us know what information do you need from our side. Thanks!
,
Jun 8 2017
#27: while I try to get my hands on one of these devices, perhaps you could either compile and run a Chromium build [1] or just download it from [2], run it and figure out where is the crashing line? [1] https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md [2] https://download-chromium.appspot.com/?platform=Android&type=snapshots
,
Jun 9 2017
#28 Installed both apk using command adb install <apk path> org.chromium.chrome is crashing while opening. And in ContentShell apk, after enter URL ( https://webrtc.github.io/samples/src/content/getusermedia/gum/) camera is not opening.
,
Jun 9 2017
#29: What would be the culprit line(s) and/or the adb log cat?
,
Jun 10 2017
horo@ has been kind enough to repro on a Xperia XZ (F8332) and landed a fix that should be available in Canary soon: https://storage.googleapis.com/chromium-find-releases-static/index.html#r478515 could you please verify it when it lands? Thanks!
,
Jun 12 2017
The crashes seem to have subsided after 61.0.3127.0, so I'm going to tentatively mark this issue as Fixed, let me know if you experience this issue any further !
,
Jun 12 2017
,
Jun 13 2017
The NextAction date has arrived: 2017-06-13
,
Feb 20 2018
This issue is still reproducing in Xperia XZ with Chrome 64.0.3282.137. Device: Xeria XZ Android : 7.1.1 and 8.0.0 |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by somcs...@gmail.com
, May 8 2017