[error] EXC_BAD_ACCESS (code=2, address=0x7ffee3638ff8)

Jameskrauser Lee
1 min readMar 21, 2018

--

when i just write a function to assign nsstring to my class’s nsstring ,
xcode raise EXC_BAD_ACCESS (code=2, address=0x7ffee3638ff8)!

i trace the code, found it will run into infinite loop
at self.message = Message.
after few time the program will crash.

reason:
if you use dot . in setter function , objective-c will raise infinite loop!

Resolution: move message from Company1Base to Company1

Reference Data:
https://kaochenlong.com/2010/12/08/property-and-synthesize/

--

--

Jameskrauser Lee
Jameskrauser Lee

Written by Jameskrauser Lee

For the last few years. i was involved mostly in the development of Automatic Fare collection system for the Chennai Metro. Familiar with C++ and iOS.

No responses yet