BradLarson / GPUImage3

GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal.
BSD 3-Clause "New" or "Revised" License
2.68k stars 330 forks source link

UnsafePointer problem in OpenGLRendering.swift #92

Closed BenK1934 closed 3 years ago

BenK1934 commented 3 years ago

Once I made the shift to either Xcode 11.5 or Beta 12 I am getting this warning in OpenGLRendering.swift

in

func withGLChar(_ operation:(UnsafePointer<GLchar>) -> ()) {
        if let value = self.cString(using:String.Encoding.utf8) {
            operation(UnsafePointer<GLchar>(value))

        } else {
            fatalError("Could not convert this string to UTF8: \(self)")
        }
    }

the line operation(UnsafePointer(value))

has the following warning Initialization of 'UnsafePointer' (aka 'UnsafePointer') results in a dangling pointer

Interestingly the project still works on local devices but once the app is sent to TestFlight users it stops working. I'm wondering if anyone has successfully fixed this?

BenK1934 commented 3 years ago

Hah! How stupid of me I mixed ups my GPUImage 2 with my GPUImage 3 so please forget all about this.