EXC_BAD_ACCESS on iOS 8.1 with Dictionary

两盒软妹~` 提交于 2019-12-01 15:08:51

Looks like a compiler bug.

Have you tried switching between Release and Debug then rebuilding? If debug works but not release it can be an indication of a compiler/optimizer bug.

Does it happen in the simulator also?

Your code works for me on iOS 8.1 with XCode 6.1.

By chance, do you have an iPhone 6 with 64Gb ? I have one and I had the same issue using Dictionaries twice.

In the news (well the tech news ...), I read that the defective memory modules delivered by Toshiba for precisely this iPhone model could cause incorrect allocations in memory.

Try adjusting the Swift compiler optimization level to "None" (Build Settings).

I had a similar issue with a class being deallocated for no apparent reason, it is mostly a compiler bug like Lee said.

Faced similar kind of issues with swift code and fixed such issues by disabling swift compiler optimisation in the build settings of the application target.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!