-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash on 10.10 yosemite and Xcode 6 dp4 #152
Comments
i get the same error when i try to do encode Dictionary to JSON string. iOS 8.0 |
I also got the error too, running on Mac OSX Yosemite with the same case as @yoon-boom |
This change worked for me... ---from--- |
This is due to the recent addition of NSTaggedPointerString, which allows inline storage of strings within the pointer value. Thus a short string, like @"email" gets strored inline within a pointer value like 0x0000656D61696C55. Depending on your application memory usage, this value might or might not point to a valid memory location. More, due to the double indirection in the problematic line, the chances of getting to an invalid memory location are quite high, resulting in crashes. What JSONKit tries to do at that line is to retrieve the Class object for the given key, and for performance reasons it tries to directly access the "isa" pointer. The fix would be to use runtime's object_getClass() function, instead of using the direct access: void *keyObjectISA = (void*)object_getClass(keys[idx]); |
Fixed in #158. |
@jcbertin I faced this problem, your fix fixed the problem for me. |
The text was updated successfully, but these errors were encountered: