Swinject / SwinjectStoryboard

Swinject extension for automatic dependency injection via Storyboard
MIT License
268 stars 141 forks source link

EXC_BAD_ACCESS #105

Open markmadlangbayan opened 6 years ago

markmadlangbayan commented 6 years ago

After upgrading to Xcode 9.4.1, we're getting EXC_BAD_ACCESS when deploying to device. Any clue what's going on?

github "Swinject/Swinject" "2.4.1" github "Swinject/SwinjectAutoregistration" "2.1.1" github "Swinject/SwinjectStoryboard" "2.0.2"

image

Thanks!

markmadlangbayan commented 6 years ago

Update on this, we were able to isolate the issue. It's not related to Xcode version, but deploying a debug build on a device with OTHER_SWIFT_FLAGS=-Onone build setting caused a EXC_BAD_ACCESS.

We fixed the issue by removing the "-Onone" optimization flag at OTHER_SWIFT_FLAGS build settings.

Anyone know why this is happening?

kanwal-bhagat commented 5 years ago

Hello,

I tried your solution OTHER_SWIFT_FLAGS=-Onone on the application target but it didnt worked out. Am I missing something? I am facing the similar crash.

Regards KB

markmadlangbayan commented 5 years ago

Sorry, that's the only think I did to resolve my issue. It took me days, but what I end up doing was stripping my app and removed dependencies until I got to the OTHER_SWIFT_FLAGS.

kanwal-bhagat commented 5 years ago

Thanks!! not sure why its not working in my case. I don't have any other dependency other than swinject. i updated the build settings as - optimization level for debug to -O (optimize for speed) as shown in the screenshot.

screenshot

I hope I have changed the right setting. Can you please confirm?