Thread 1 exc_bad_access(code=1 address=0x0) is the most common exc (exception) function in the C language. It is used to test whether or not an object is a valid variable or structure. A successful exc_bad_access() can return the value 0, which allows you to do whatever you want with the object, or it can return a nonzero value if the object is not an object.
In this case, you are in trouble. The reason why the exc_bad_access function is the cause of the exc_bad_access is that it does not take any more control over the object than it would do otherwise. It will do so by using the object’s global scope (the global scope of your code) instead of the global scope of the exc_bad_access function. So if you’re using exc_bad_access, you’re in trouble.
Exc_bad_access is a little more than just “bad access.” It requires you to provide a function that will return a value as you wish. For example, if your code requires that you call a function to read an integer variable into a string variable, you might instead call exc_bad_access and create a function that simply returns a string.
So what are you going to do with this exc_bad_access function? You can return it to the global scope or you can return the integer variable instead. The latter is not bad, but it is really bad. The global scope of a function is usually pretty limited, and thus its scope is usually restricted to the location of the global function. So you can do bad things with this function. It is very bad.
The function you created as a local variable was inside of the global scope, and so it can do bad things. This is not a problem with the code, but with the global scope. You have to remember to get rid of that function at all.
This is not a code error. This is a variable scope problem. A variable scope problem is something like “hey, I like to have this as a global variable, but I don’t want to have it be public. I know how to get rid of it, but is it too much trouble?” A local variable is a function, and thus has a scope that is limited to the function. So, as long as you don’t do anything bad with it, it should be fine.
I agree that it is not too much trouble. It might be easier to just delete it from the global scope and then use that as a variable. If you have to change the scope inside your code to some other way, then go for it. If you have to change the scope inside your code to something else, then you have to do something else.
A local variable is a function, and thus has a scope that is limited to the function. So, as long as you dont do anything bad with it, it should be fine.
I agree that code that starts with an ‘i’ should not have access to other code as long as it is a local variable.