gorastudio-git / SCNRecorder

The best way to record your AR experience!
MIT License
201 stars 51 forks source link

Ios 13.5.1 throws [CAMetalLayerDrawable texture] error #12

Closed hizzlehoff closed 4 years ago

hizzlehoff commented 4 years ago

Hi there, thanks so much for building this!

I am getting an error when starting the recording (although it works):

[CAMetalLayerDrawable texture] should not be called after already presenting this drawable. Get a nextDrawable instead.

There's also a framework that has been renamed.

And one last thing, I have to handle the saved videos yes? When a recording is finished and I don't do anything with the video file, is that file temporary and will it automatically be cleaned up?

Thanks!

v-grigoriev commented 4 years ago

Hi @hizzlehoff!

Unfortunately, the warning is a price of performance. SCNRecroder uses the texture of the already drawn frame and this is ok. The warning makes sense only if we'd try to write into the texture.

The framework name will be changed in the next version. I'm planning the release in a couple of weeks.

By default, it's saved to the FileManager.default.temporaryDirectory, so default policies are applied. But

Your app should remove files from this directory when it determines they are no longer needed.

SCNRecorder can't determine this, so clean up videos when you don't need them.

hizzlehoff commented 4 years ago

Thanks for the response and thanks again for building and sharing this!

pathaderavi-zz commented 4 years ago

@hizzlehoff I am facing the same issue. The main thread freezes multiple times. What would be the best approach to solve this?