为什么使用 ARKit 和 RealityKit 会出现这么多调试错误?

2023-12-24

在我的项目中,我只是包装了一个 ARView,设置了配置并在我的真实设备上运行它,当我启动应用程序 Xcode 时,打印出以下错误调试消息。

2021-10-08 17:59:06.476537+0800 RealityKit_Shell[8247:2500396] Metal GPU Frame Capture Enabled
2021-10-08 17:59:06.476699+0800 RealityKit_Shell[8247:2500396] Metal API Validation Enabled
2021-10-08 17:59:07.219091+0800 RealityKit_Shell[8247:2500396] [AssetTypes] Registering library (/System/Library/PrivateFrameworks/CoreRE.framework/default.metallib) that already exists in shader manager. Library will be overwritten.
2021-10-08 17:59:07.374894+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/suFeatheringCreateMergedOcclusionMask.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.395024+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arKitPassthrough.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.395929+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/drPostAndComposition.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.396642+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arSegmentationComposite.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.397378+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute0.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.398275+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute1.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.398553+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute2.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.409981+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute3.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.410269+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute4.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.410527+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute5.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.410791+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute6.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.411055+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute7.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.411755+0800 RealityKit_Shell[8247:2500396] [Foundation.Serialization] Json Parse Error line 18: Json Deserialization; unknown member 'EnableARProbes' - skipping.
2021-10-08 17:59:07.411781+0800 RealityKit_Shell[8247:2500396] [Foundation.Serialization] Json Parse Error line 20: Json Deserialization; unknown member 'EnableGuidedFilterOcclusion' - skipping.
2021-10-08 17:59:07.542203+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543025+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543069+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543108+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543155+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543307+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543690+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543802+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543918+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.880459+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_64/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880514+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_32/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880530+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_16/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880546+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_8/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880559+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_4/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880572+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_2/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:08.396967+0800 RealityKit_Shell[8247:2500615] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 11 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.410508+0800 RealityKit_Shell[8247:2500613] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 12 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.425793+0800 RealityKit_Shell[8247:2500615] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 13 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.443037+0800 RealityKit_Shell[8247:2500711] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 14 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.460984+0800 RealityKit_Shell[8247:2500613] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 15 ARFrames. This can lead to future camera frames being dropped.
add ancora 
2021-10-08 17:59:08.520791+0800 RealityKit_Shell[8247:2500613] [Technique] ARWorldTrackingTechnique <0x138ae1710>: World tracking performance is being affected by resource constraints [2]

下面是我的简单代码

struct ARViewWrapped: UIViewRepresentable {
    let arManager: ARManager
     
    func makeUIView(context: Context) -> some UIView {
        arManager.setupARView()
        
        return arManager.arView
    }
    
    func updateUIView(_ uiView: UIViewType, context: Context) {
        
    }
}

我的经理班:


class ARManager: NSObject, ARSessionDelegate, ObservableObject {
    static var shared = ARManager()
    
    var arView = ARView(frame: .zero, cameraMode: .ar, 
                   automaticallyConfigureSession: false)
    
    func setupARView() {
        let configuration = ARWorldTrackingConfiguration()
        configuration.planeDetection = [.vertical]
        configuration.environmentTexturing = .automatic
        configuration.isAutoFocusEnabled = true
        if type(of: configuration).supportsFrameSemantics(.sceneDepth) {
            configuration.frameSemantics = .personSegmentationWithDepth
        }
        arView.debugOptions = []
        arView.session.delegate = self
        
        arView.session.run(configuration, options: .resetTracking)
    }

    func session(_ session: ARSession, didAdd anchors: [ARAnchor]) {
        print("add ancora")
    }
}

AR 体验正常启动,但我想知道为什么打印出所有这些错误消息?


如果您使用,您可以删除一些消息ARView代替some UIView:

func makeUIView(context: Context) -> ARView { ... }
func updateUIView(_ uiView: ARView, context: Context) { ... }

您应该忽略其余的控制台消息,因为即使您在 RealityKit 中有一个完全空的场景并且禁用了渲染选项,Xcode 13.3 也会生成它们。只需尝试以下代码:

struct ARViewContainer: UIViewRepresentable {
    
    let arView = ARView(frame: .zero)
         
    func makeUIView(context: Context) -> ARView {

        arView.environment.lighting.resource = nil
        
        arView.renderOptions = [.disablePersonOcclusion,
                                .disableAREnvironmentLighting,
                                .disableCameraGrain,
                                .disableDepthOfField,
                                .disableFaceMesh,
                                .disableGroundingShadows,
                                .disableHDR,
                                .disableMotionBlur]
        return arView
    }
    func updateUIView(_ uiView: ARView, context: Context) { }
}

Result:

2022-05-01 13:54:09.705211+0300 dell[28410:1243021] Metal GPU Frame Capture Enabled
2022-05-01 13:54:09.705618+0300 dell[28410:1243021] Metal API Validation Enabled
2022-05-01 13:54:11.584702+0300 dell[28410:1243021] [AssetTypes] Registering library (/System/Library/PrivateFrameworks/CoreRE.framework/default.metallib) that already exists in shader manager. Library will be overwritten.
2022-05-01 13:54:11.802761+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/suFeatheringCreateMergedOcclusionMask.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.844584+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arKitPassthrough.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.845894+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/drPostAndComposition.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.846809+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arSegmentationComposite.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.847909+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute0.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.849259+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute1.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.849770+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute2.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.860031+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute3.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.860581+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute4.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.861061+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute5.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.861551+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute6.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.862043+0300 dell[28410:1243021] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute7.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2022-05-01 13:54:11.862930+0300 dell[28410:1243021] [Foundation.Serialization] Json Parse Error line 18: Json Deserialization; unknown member 'EnableARProbes' - skipping.
2022-05-01 13:54:11.862969+0300 dell[28410:1243021] [Foundation.Serialization] Json Parse Error line 20: Json Deserialization; unknown member 'EnableGuidedFilterOcclusion' - skipping.
2022-05-01 13:54:12.069798+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.071608+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.071787+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.071929+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.072155+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.072412+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.072587+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.072861+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:12.073079+0300 dell[28410:1243021] throwing -10878
2022-05-01 13:54:13.111680+0300 dell[28410:1243229] [Technique] ARWorldTrackingTechnique <0x114229fb0>: World tracking performance is being affected by resource constraints [2]

关闭消息

如果这些消息确实让您烦恼,请将其关闭。

Go to Xcode's menu Product Scheme Edit Scheme and add your environment variable.

OS_ACTIVITY_MODE = disable
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么使用 ARKit 和 RealityKit 会出现这么多调试错误? 的相关文章

随机推荐

  • 使用 php 处理 Jquery Ajax 表单提交

    最近 我在尝试使用 Jquery 和 Ajax 提交表单时一直在与它们作斗争 我有一个非常简单的表单 其中包含用户名字段和密码字段以及提交按钮 该表单应该做的是 一旦提交表单 信息将通过 Ajax 发送到 php 文件 然后该文件将所述表单
  • 停止更新*无效反应输入

    我正在寻找停止的方法update Input使我的 Shiny 应用程序中的无功值无效的函数 我希望更新函数仅更改可视 UI 组件 而不更改底层反应值 这是一个代表 library shiny ui lt fluidPage sliderI
  • 如何在 Midnight Commander 中过滤目录

    也许是一个愚蠢的问题 但如何在 Midnight Commander 中过滤目录 例如 我有一个包含很多目录的文件夹 其命名如下 holidays 2016 birthdays 2016 holidays 2015 我怎样才能过滤像 201
  • 绘制平滑曲线 - 所需方法

    如何在移动时平滑 iOS 绘图应用程序中的一组点 我尝试过 UIBezierpaths 但当我只是将点 1 2 3 4 2 3 4 5 移动时 我得到的只是它们相交处的锯齿状末端 我听说过样条曲线和所有其他类型 我对 iPhone 编程很陌
  • ConfigurationManager.GetSection(sectionName) 在执行单元测试时返回 null

    我有一个自己的单元测试项目app config文件 它是由正在测试的目标项目定义的真实配置文件的模拟 该模拟文件由单元测试代码 而不是目标项目 加载和处理 如果我仅在这一个测试项目中运行测试 则它可以正常工作 ConfigurationMa
  • WCF:更新服务参考提供重复的配置条目

    我有一个使用 WCF 服务的服务引用的 WPF 应用程序 在对服务进行更新时 我需要更新服务引用 因此我右键单击它并点击 更新服务引用 执行此操作会导致客户端项目的 App config 文件中出现重复条目 它复制了下面的绑定wsHttpB
  • 在SVN Trunk中完全禁用Django的CSRF保护

    我沮丧地花了几个小时 试图禁用 Django 现在试图强加给我的 CSRF 但没有成功 还有其他人尝试过更成功吗 我对任何有效的东西都很好 除了源补丁 但猴子补丁还可以 不要这样做 但如果你必须的话 try this http johnmc
  • NativeActivity 活动的父活动类型

    有什么方法可以从 NativeActivity 中查看其父 Activity 的类型Execute http msdn microsoft com en us library dd781091 aspx方法 是的 您可以执行以下代码块 它将
  • 带有请求的“单击”按钮

    我有一个小网站 我想用请求库填写表格 问题是我在填写表单数据并点击按钮时无法到达下一个站点 Enter 不起作用 重要的是我无法通过某种点击机器人来做到这一点 需要完成此操作 以便我可以在没有图形的情况下运行 info name JohnJ
  • Scrapy如何避免重新下载最近下载的媒体?

    根据https doc scrapy org en latest topics media pipeline html https doc scrapy org en latest topics media pipeline html Sc
  • C++中基类对象和派生类对象的大小

    include
  • .htaccess、Wordpress 和个性 URL

    我一直在研究我能在 WordPress 中的 htaccess 和虚荣 url 上找到的每个 Stack Overflow 主题 但我完全不明白为什么我的主题不起作用 我对 htaccess 完全是个菜鸟 所以我确信这与它有很大关系 我正在
  • Python:使用 chroot 和 chjail 保护不受信任的脚本/子进程?

    我正在编写一个基于 Python 的 Web 服务器 它应该能够执行 插件 以便可以轻松扩展功能 为此 我考虑了一种方法 即拥有多个文件夹 每个插件一个 和多个 shell python 脚本 其中以可能发生的不同事件的预定义名称命名 一个
  • c - “writev”中“iovcnt”参数允许的最大值?

    我读过手册页writev并发现错误部分指出 EINVAL 向量计数iovcnt小于零或大于允许的最大值 但我怎样才能得到最大值呢 PS 在我的操作系统 Ubuntu 14 04 x64 上它似乎是1024 我通过以下代码检查它 includ
  • 在 Android 中成功建立蓝牙连接

    我对 Android 中建立 BT 连接的两种方法感到困惑 从我记事起 这就是我所做的事情 它从 2 3 设备到早期的 4 x 都有效 这是什么Android 文档描述 http developer android com referenc
  • 来自removeObjectsInRange的NSRangeException:但传递的范围在边界内

    我收到下面的错误 这没有意义 由于未捕获的异常 NSRangeException 而终止应用程序 原因 NSMutableArray removeObjectsInRange 范围 11 15 超出范围 0 15 我在这里做错了什么 我在数
  • Java中关闭数据库连接

    我有点困惑了 我正在阅读以下内容Java 数据库连接 http en wikipedia org wiki Java Database Connectivity Connection conn DriverManager getConnec
  • 在 Azure 中从哪里获取 IssuerName 和 IssuerKey

    我正在关注这个tutorial http azure microsoft com en us documentation articles cloud services dotnet multi tier app using service
  • 在 Apache 中启用 css 和 js 文件的缓存

    在 Debian 8 2 上使用 Apache 2 4 我尝试启用所有 css 和 js 文件的缓存 图像缓存效果很好 也就是说 浏览器收到 304 状态 因此不会再次下载 但我无法缓存其他文件 我在虚拟主机文件中使用它
  • 为什么使用 ARKit 和 RealityKit 会出现这么多调试错误?

    在我的项目中 我只是包装了一个 ARView 设置了配置并在我的真实设备上运行它 当我启动应用程序 Xcode 时 打印出以下错误调试消息 2021 10 08 17 59 06 476537 0800 RealityKit Shell 8