Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift iOS13场景基特错误–;清除从未释放的纹理_Swift_Scenekit_Augmented Reality_Arkit_Ios13 - Fatal编程技术网

Swift iOS13场景基特错误–;清除从未释放的纹理

Swift iOS13场景基特错误–;清除从未释放的纹理,swift,scenekit,augmented-reality,arkit,ios13,Swift,Scenekit,Augmented Reality,Arkit,Ios13,我有一个ARKit应用程序,在iOS 12.x上运行良好。在iOS 13上,我在控制台日志中遇到以下错误: [SceneKit] Error: Purging never freed texture <AGXA9FamilyTexture: 0x11d688240> label = <none> textureType = MTLTextureType2D pixelFormat = MTLPixelFormatR16Float wi

我有一个ARKit应用程序,在iOS 12.x上运行良好。在iOS 13上,我在控制台日志中遇到以下错误:

[SceneKit] Error: Purging never freed texture <AGXA9FamilyTexture: 0x11d688240>
    label = <none> 
    textureType = MTLTextureType2D 
    pixelFormat = MTLPixelFormatR16Float 
    width = 240 
    height = 1 
    depth = 1 
    arrayLength = 1 
    mipmapLevelCount = 1 
    sampleCount = 1 
    cpuCacheMode = MTLCPUCacheModeDefaultCache 
    storageMode = MTLStorageModePrivate 
    hazardTrackingMode = MTLHazardTrackingModeTracked 
    resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModePrivate MTLResourceHazardTrackingModeTracked  
    usage = MTLTextureUsageShaderRead MTLTextureUsageShaderWrite 
    shareable = 0 
    framebufferOnly = 0 
    purgeableState = MTLPurgeableStateNonVolatile 
    swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha] 
    isCompressed = 0 
    parentTexture = <null> 
    parentRelativeLevel = 0 
    parentRelativeSlice = 0 
    buffer = <null> 
    bufferOffset = 512 
    bufferBytesPerRow = 0 
    allowGPUOptimizedContents = YES
    label = <none>
[SceneKit]错误:清除从未释放的纹理
标签=
textureType=MTLTextureType2D
pixelFormat=MTLPixelFormatR16Float
宽度=240
高度=1
深度=1
阵列长度=1
mipmapLevelCount=1
样本数=1
cpuCacheMode=MTLCPUCacheModeDefaultCache
storageMode=MTLStorageModePrivate
危险跟踪模式=MTLHHARDTRACKINGMODE TRACKED
resourceOptions=MTLResourcePuccacheModeDefaultCache MTLResourceTorageModePrivate MTLResourceHazardTrackingModeTracked
用法=MTLTextureUsageShaderRead MTLTextureUsageShaderWrite
可共享=0
framebufferOnly=0
purgeableState=mtlPurgeAbleState非易失性
swizzle=[MTLTextureswizzled,MTLTextureSwizzleGreen,MTLTextureSwizzleBlue,MTLTextureSwizzleAlpha]
isCompressed=0
父纹理=
parentRelativeLevel=0
parentRelativeSlice=0
缓冲区=
bufferOffset=512
bufferBytesPerRow=0
allowGPUOptimizedContents=是
标签=
它每隔几毫秒重复一次,并使整个日志混乱不堪。我无法缩小它的来源

有趣的是,当场景中没有单个节点时,甚至会发生这种情况。如果我从视图中删除整个sceneView,则它将消失…(不是选项)

有人知道或暗示如何找到这个吗


谢谢

我找到了问题代码行。在iOS 13中,任何呼叫

SceneView.snapshot()
产生这个错误。苹果的文档说:

此方法是线程安全的,可以随时调用


但这似乎在iOS13中有所改变。我将提交一份错误报告,不希望快速解决;-)

我通过更新场景摄影机的设置修复了此问题:

var sceneView: ARSCNView!
...
sceneView.pointOfView?.camera?.wantsHDR = false

希望这有帮助。

请显示您的代码。