davbeck / ImageIOSwift

Swift wrapper around ImageIO
MIT License
111 stars 15 forks source link

EXC_BAD_ACCESS in SwiftUI in Xcode Beta 7 #7

Open melgu opened 5 years ago

melgu commented 5 years ago

Full error: Thread 1: EXC_BAD_ACCESS (code=1, address=0x9)

The error appears on the marked line:

private struct Observer: View {
    @ObservedObject fileprivate var derived: Lazy
    fileprivate var content: (Derived) -> ChildView

    var body: some View {
>>>>        return self.content(derived.value)
    }
}

I'm on the ImageIOSwift 1.0.0 branch using Xcode 11 Beta 7. In Xcode 11 Beta 6 it worked. Now it doesn't anymore.

davbeck commented 5 years ago

Hmmm. Is this with the sample app, and if not can you provide an example app or test case that reproduces this? I can’t remember if I last ran tests with beta 6 or 7, but at that time everything seemed to be working.

melgu commented 5 years ago

The example Mac App crashes as well.

I first noticed it in my TidalSwift App, but yes, the example app crashes with the same error at the same position.

davbeck commented 5 years ago

Gave this a try yesterday on Xcode beta 7, both in the simulator and on a device running 13.1 beta 2. Perhaps something got fixed between beta 1 and 2 of 13.1?

PatrikTheDev commented 5 years ago

The same thing is happening once again with Xcode 11.2, tho it doesn't tell me what's wrong. When I comment out the URLImageSourceView, it works, but once I remove it, I have the issue again. Could you please look into this? @davbeck

davbeck commented 5 years ago

I just gave the sample app another try on Xcode 11.2 beta 2 and it still works for me. If you can provide a sample app that causes the error I can maybe take a look at that.

reinhardt1053 commented 4 years ago

I got the same issue on XCode 11.2.1

PatrikTheDev commented 4 years ago

Solution: either use CocoaPods until it gets fixed or set DEAD_CODE_STRIPPING to YES in your build config file.