johnno1962 / HotReloading

Hot reloading as a Swift Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash on SwiftUI project EXC_BAD_ACCESS

clementprem opened this issue · comments

Injection keeps crashing on save

Screen Shot 2021-03-05 at 10 41 41 PM

Hi, are you using .eraseToAnyView() on all View properties?

Hey yes, I used to work for some time, after I started adding complicated structures to the view it started to crash. I am closing this for now, because I am unable to test this beginning of the week.

This seems strange to me and I'm interested in perusing this further to see what the problem is. I've never had an injection of SwiftUI fail for a reason I didn't eventually work out what the problem was. Are you adding .eraseToAnyView to everything that returns "some View"? The Opaque type changeing due to adding an element this is the only thing I can think of that would cause a crash. Or perhaps you added new properties to a struct though this should have given you a warning. If you have the time I'd like to teamview this to get to the bottom of it!