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

[BUG] 华为手机,频繁进入/退出拍照界面可能会黑屏 #282

Open
Tindtily opened this issue Oct 28, 2024 · 1 comment
Open
Labels
await investigate The issue is waiting for further investigation. b: third party This is a third party package issue. p: Android This issue only happens on Android platform. r: camera Related to the camera package. s: bug Something isn't working

Comments

@Tindtily
Copy link

Describe the bug
华为手机,频繁进入/退出拍照界面可能会黑屏

How to reproduce

任意一个flutter app,频繁进入退出,即有概率复现

Steps to reproduce the behavior:
1、点击拍照按钮
2、退出拍照界面
3、重复1、2步骤

Expected behavior

正常打开摄像头

Version information

  • Device: [HUAWEI Mate 30E Pro 5G]
  • OS: [HarmonyOS 2.0.0]
  • Package Version: [4.3.1]
  • Flutter Version:
  • Flutter 3.24.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 80c2e84975 (3 months ago) • 2024-07-30 23:06:49 +0700 Engine • revision b8800d88be Tools • Dart 3.5.0 • DevTools 2.37.2

Additional context

  1. 通过跟踪发现,下面这个文件的第485行-498行之间的这段future有可能会阻塞整个future[]的执行,从而导致整个页面黑屏

if (description.lensDirection != CameraLensDirection.front &&

  1. 因为当出现黑屏的时候,第503行的debug日志,不会打印出来。正常情况下,503行的日志可以打印出来。

  2. 实测删除485-498行,黑屏就不会出现了。只不过不能设置闪光灯的初始设置了。

  3. camera官方的demo是不会出现黑屏问题的。

@Tindtily Tindtily added the await investigate The issue is waiting for further investigation. label Oct 28, 2024
@AlexV525 AlexV525 added s: bug Something isn't working b: third party This is a third party package issue. p: Android This issue only happens on Android platform. r: camera Related to the camera package. labels Oct 28, 2024
@Lorenzo-GrafosTech
Copy link

Same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
await investigate The issue is waiting for further investigation. b: third party This is a third party package issue. p: Android This issue only happens on Android platform. r: camera Related to the camera package. s: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants