SwinjectStoryboard icon indicating copy to clipboard operation
SwinjectStoryboard copied to clipboard

EXC_BAD_ACCESS

Open markmadlangbayan opened this issue 7 years ago • 4 comments

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 avatar Aug 09 '18 18:08 markmadlangbayan

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?

markmadlangbayan avatar Aug 22 '18 01:08 markmadlangbayan

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

kanwal-bhagat avatar Sep 07 '18 14:09 kanwal-bhagat

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.

markmadlangbayan avatar Sep 07 '18 15:09 markmadlangbayan

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?

kanwal-bhagat avatar Sep 12 '18 07:09 kanwal-bhagat