CameraView icon indicating copy to clipboard operation
CameraView copied to clipboard

[BUG]Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

Open Yyilin001 opened this issue 6 months ago • 6 comments

Prerequisites

  • [ ] I checked the documentation and found no answer
  • [ ] I checked to make sure that this issue has not already been filed

Expected Behavior

Please describe the behavior you are expecting

Current Behavior

What is the current behavior?

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Code Sample

If you can, please include a code sample that we can use to debug the bug.

Screenshots

If applicable, add screenshots to help explain your problem.

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Name Version
SDK e.g. 3.0.0
Xcode e.g. 14.0
Operating System e.g. iOS 18.0
Device e.g. iPhone 14 Pro

Yyilin001 avatar Jun 25 '25 06:06 Yyilin001

func setGridVisibility(_ isGridVisible: Bool) {
    guard isGridVisible != attributes.isGridVisible, !isChanging else { return }
    cameraGridView.setVisibility(isGridVisible)
}

Yyilin001 avatar Jun 25 '25 06:06 Yyilin001

    createCameraOutputView()
        .ignoresSafeArea()
        .background(Color.black)
        .onAppear{
            setOutputType(.video)
            setGridVisibility(false)
        }

Yyilin001 avatar Jun 25 '25 06:06 Yyilin001

@FulcrumOne any updates on this one? It pops up pretty often.

The issue poorly described tho...

mattisssa avatar Aug 12 '25 10:08 mattisssa

Setting the hidden grid before camera authorization will cause this problem

Yyilin001 avatar Aug 13 '25 06:08 Yyilin001

@FulcrumOne any updates on this one? It pops up pretty often.这个有更新吗?它经常出现。

The issue poorly described tho...但这个问题描述得很差...

Setting the hidden grid before camera authorization will cause this problem

Yyilin001 avatar Aug 13 '25 06:08 Yyilin001

@FulcrumOne any updates on this one? It pops up pretty often.这个有更新吗?它经常出现。 The issue poorly described tho...但这个问题描述得很差...

Setting the hidden grid before camera authorization will cause this problem

👍

I've already forked and fixed many other stuff in the framework

mattisssa avatar Aug 13 '25 14:08 mattisssa