Error 2003332927 when accessing AVCaptureDevice?

Can anyone tell me what error 2003332927 means? I am getting this when trying to connect to my UVC based slide scanner, but I can't find any good indicating what the code means and what the suggested resolution method is? BTW it has worked on previous occasions.

A sample of the code in question:

Code Block swift
     let device: AVCaptureDevice = self.devices[defaultDevice];
     
    if (captureSession != nil) {
      /* if we are "restarting" a session but the device is the same exit early */
      let currentDevice = (self.captureSession.inputs[0] as! AVCaptureDeviceInput).device
      guard currentDevice != device else { return }
       
      captureSession.stopRunning();
    }
    captureSession = AVCaptureSession();
     
    do {
self.input = try AVCaptureDeviceInput(device: device);
       self.captureLayer = AVCaptureVideoPreviewLayer(session: self.captureSession);
      self.captureSession.addInput(input);
      self.captureSession.startRunning();
      self.captureLayer = AVCaptureVideoPreviewLayer(session: self.captureSession);
// other code here
} catch {
// catch logic here
}


The following line is where we first see the error logged in the console:

Code Block swift
self.captureLayer = AVCaptureVideoPreviewLayer(session: self.captureSession);


I am trying to work out if there is an initialisation or parameter missing? Or maybe the issue is closer to the device, but I still need to know the significance of the error to better communicate to the user how to deal with this.

BTW checking the status of the device:

Code Block
NSLog(String(device.isSuspended)); // result: false
NSLog(String(device.isInUseByAnotherApplication)); // result: false
NSLog(String(device.isConnected)); // result: true


Project Context: https://github.com/simonguest/quick-camera
2003332927 is 0x77686F3F or 'who?' (the macOS Calculator is your friend, use cmd-2 for the programmer's version).
'who?' is kCMIOHardwareUnknownPropertyError
Sorry I can't help you further than that

I am also seeing this on macOS 12.0.1:

[aqme]        MEMixerChannel.cpp:1639  client <AudioQueueObject@0x1240e0c00; Unknown FigPlayer; [0]; play> got error 2003332927 while sending format information

After:

CMTime newTime = CMTimeMakeWithSeconds(time, 600); [self.player seekToTime:newTime completionHandler:^(BOOL finished) { // optional debug logging if not finished

}];

Using either .mp3 or .mp4 files. Each time I use a slider or 'go forward' or 'go backward' buttons to adjust playback location, these messages pop up on the Xcode debug console.

If this may help in any way: https://developer.apple.com/forums/thread/5278

I have a similar message, yet everything is working fine.

[aqme]            AQMEIO_HAL.cpp:1211  Error 2003332927('who?')  getting headset info

or

AQMEIO_HAL.cpp:736 kAudioDevicePropertyMute returned err 2003332927

depending if I chose my headphones or the monitor sound on macOS.

Error 2003332927 when accessing AVCaptureDevice?
 
 
Q