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] 反复拍照选择图片, IOS内存溢出并闪退 #162

Closed
zhangshuqi opened this issue Feb 20, 2023 · 6 comments · Fixed by #244
Closed

[BUG] 反复拍照选择图片, IOS内存溢出并闪退 #162

zhangshuqi opened this issue Feb 20, 2023 · 6 comments · Fixed by #244
Labels
i: lack of information Further information is requested

Comments

@zhangshuqi
Copy link

zhangshuqi commented Feb 20, 2023

Describe the bug

反复拍照选择图片, IOS 闪退 ANDROID暂未发现这个问题

How to reproduce

demo可复现这个问题

Steps to reproduce the behavior:

反复选满9张,接着反复拍照选择图片,重复步骤。

Screenshots (If contains)

相关日志

The selected imageFormatGroup is not supported by iOS. Defaulting to brga8888
[CameraPicker - LOG] 0:00:00.119587 for controller's initialization.
[CameraPicker - LOG] 0:00:00.416829 for config's update.
[Process] 0x12f000940 - [PID=2624] WebProcessProxy::didClose: (web process 0 crash)
[Process] 0x12f000940 - [PID=2624] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
[ProcessSuspension] 0x12d004240 - ProcessAssertion: Failed to acquire RBS Background assertion 'ConnectionTerminationWatchdog' for process because PID 0 is invalid
[ProcessSuspension] 0x12d004240 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=0, error: (null)
[ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
[Process] 0x1220bd618 - [pageProxyID=6, webPageID=7, PID=2624] WebPageProxy::processDidTerminate: (pid 2624), reason 4
[Loading] 0x1220bd618 - [pageProxyID=6, webPageID=7, PID=2624] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
[XPC] Handle connection with error: Connection interrupted
[Process] 0x12f001230 - [PID=2629] WebProcessProxy::didClose: (web process 0 crash)
[Process] 0x12f001230 - [PID=2629] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
[ProcessSuspension] 0x12d004360 - ProcessAssertion: Failed to acquire RBS Background assertion 'ConnectionTerminationWatchdog' for process because PID 0 is invalid
[ProcessSuspension] 0x12d004360 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=0, error: (null)
[Process] 0x107f65c18 - [pageProxyID=16, webPageID=17, PID=2629] WebPageProxy::processDidTerminate: (pid 2629), reason 4
[Loading] 0x107f65c18 - [pageProxyID=16, webPageID=17, PID=2629] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[ProcessSuspension] 0x12d0043c0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=2629, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[ProcessSuspension] 0x12d004420 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=2629, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
The selected imageFormatGroup is not supported by iOS. Defaulting to brga8888
[CameraPicker - LOG] 0:00:00.126541 for controller's initialization.
[CameraPicker - LOG] 0:00:00.506570 for config's update.
[Process] 0x12f001540 - [PID=2633] WebProcessProxy::didClose: (web process 0 crash)
[Process] 0x12f001540 - [PID=2633] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
[ProcessSuspension] 0x12d0041e0 - ProcessAssertion: Failed to acquire RBS Background assertion 'ConnectionTerminationWatchdog' for process because PID 0 is invalid
[ProcessSuspension] 0x12d0041e0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=0, error: (null)
[Process] 0x1220bd618 - [pageProxyID=6, webPageID=7, PID=2633] WebPageProxy::processDidTerminate: (pid 2633), reason 4
[Loading] 0x1220bd618 - [pageProxyID=6, webPageID=7, PID=2633] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
[Process] 0x1220bd618 - [pageProxyID=6, webPageID=7, PID=2633] WebPageProxy::tryReloadAfterProcessTermination: process crashed and the client did not handle it, not reloading the page because we reached the maximum number of attempts
[Process] 0x12d0241a0 - NetworkProcessProxy::didClose (Network Process 0 crash)
[CameraPicker - LOG] 0:00:00.059450 for controller's initialization.
The selected imageFormatGroup is not supported by iOS. Defaulting to brga8888
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
jce type: 107
[CameraPicker - LOG] 0:00:00.813543 for config's update.
flutter: SQFENTITIY: delete AppEventModel invoked (id=1)
flutter: SQFENTITIY: delete AppEventModel invoked (id=2)
flutter: SQFENTITIY: delete AppEventModel invoked (id=3)
flutter: SQFENTITIY: delete AppEventModel invoked (id=4)
flutter: SQFENTITIY: delete AppEventModel invoked (id=5)
flutter: SQFENTITIY: delete AppEventModel invoked (id=6)
flutter: SQFENTITIY: delete AppEventModel invoked (id=7)
flutter: SQFENTITIY: delete AppEventModel invoked (id=8)
flutter: SQFENTITIY: delete AppEventModel invoked (id=9)
flutter: SQFENTITIY: delete AppEventModel invoked (id=10)
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
* thread #156, queue = 'com.apple.root.user-initiated-qos', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=1450 MB, unused=0x0)
    frame #0: 0x00000001a6f03444 vImage`vConvert_420Yp8_CbCr8ToARGB8888_vec + 732
vImage`vConvert_420Yp8_CbCr8ToARGB8888_vec:
->  0x1a6f03444 <+732>: stp    q22, q20, [x8, #0x20]
    0x1a6f03448 <+736>: tbl.16b v19, { v19 }, v16
    0x1a6f0344c <+740>: tbl.16b v20, { v21 }, v16
    0x1a6f03450 <+744>: tbl.16b v21, { v23 }, v16
Target 0: (Runner) stopped.

Version information

  • Device: iPhone8
  • OS: IOS 15.6
  • Package Version: 3.7.0
  • Flutter Version: 3.7.1

Additional context

@zhangshuqi zhangshuqi added the await investigate The issue is waiting for further investigation. label Feb 20, 2023
@zhangshuqi zhangshuqi changed the title [BUG] Error with something [BUG] 反复拍照选择图片, IOS内存溢出并闪退 Feb 20, 2023
@AlexV525
Copy link
Member

AlexV525 commented May 7, 2023

Try with the camera package's example and see if it's reproducible.

@AlexV525 AlexV525 added i: lack of information Further information is requested await response Issue require customer's further response. r: camera Related to the camera package. and removed await investigate The issue is waiting for further investigation. labels May 7, 2023
@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2023
@AlexV525 AlexV525 removed await response Issue require customer's further response. r: camera Related to the camera package. labels Oct 28, 2023
@NamBuiDanh2001
Copy link

same issue

@hadi7khan
Copy link

Same issue. How did you fix it?

@zhoudajun-ola
Copy link

不是 camera 包的问题!
问题出在:
if (viewType == CameraPickerViewType.image) { await precacheImage(FileImage(File(file.path)), context); }
每次拍照返回的路径都是不一样的;一直拍照,会一直增加缓存,10次左右内存就爆了;
解决办法就是删掉这个判断;
precacheImage

@AlexV525
Copy link
Member

不是 camera 包的问题! 问题出在: if (viewType == CameraPickerViewType.image) { await precacheImage(FileImage(File(file.path)), context); } 每次拍照返回的路径都是不一样的;一直拍照,会一直增加缓存,10次左右内存就爆了; 解决办法就是删掉这个判断; precacheImage

@zhoudajun-ola 可以测试 #244 是否有效

@AlexV525
Copy link
Member

尝试 debug 了整个流程,跟 precache 没有关系,因为每次 image 释放后 cache 也会自己处理掉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i: lack of information Further information is requested
Projects
None yet
5 participants