Comments (7)
https://github.com/jcbertin/JSONKit
use it
from jsonkit.
I've replaced the still crash tip:
Sep 19 14:18:35 XXXX[718] : CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 19 14:18:35 XXXX[718] : CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 19 14:18:35 XXXX[718] : CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
from jsonkit.
@BadSuNian I have same problem. I thought it was because of JSONKit, but I still have crash after applied @h532930330's patch. And then I find out that another third party library TXJSONKitSerializing defines same category method which crashes app.
How I fix: I changed JSONKit's category method name to another to avoid using TXJSONKitSerializing because TXJSONKitSerializing is inside some lib.a so I can't change.
Chinese comment (中文解释)
我根据上面的comment解决后,还是有问题,后来发现,在运行的时候,方法JSONString其实是调用了某个第三方库的TXJSONKitSerializing定义的方法,而不是JSONKit里的。
看样子,在运行时,第三方库的方法覆盖了源码里的同样的方法。
解决办法就是,把JSONKit里的方法加个前缀,然后代码里面使用这个加了前缀的方法,这样就不会误用到TXJSONKitSerializing里的。
这也强调了一个写Category方法的要求,尤其是提供给别人使用的第三方库的时候,一定要加上前缀,以防影响到使用者。
from jsonkit.
@caisd1998 cool,you are right.
多亏遇到你,找了好几天终于解决了,感谢分享
from jsonkit.
@caisd1998 my email [email protected] your? Please explain in detail.
from jsonkit.
My project crashed here :
void objectISA = (JK_EXPECT_F(workAroundMacOSXABIBreakingBug)) ? NULL : *((void *)objectPtr);
my codes are like this below:
NSArray * josnArry = [[NSArray alloc] init];
NSString * josnString = [josnArry JSONString];
inside josnArry are NSDictionary(s) ! help !
from jsonkit.
Im used "JSONKit" MAJK ?????????????? what
s this?
- thread #1: tid = 0x41774f, 0x000000010995c315 EverVCiOSClient
MAJK_encode_add_atom_to_buffer + 6377, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x000000010995c315 EverVCiOSClient
MAJK_encode_add_atom_to_buffer + 6377
frame #1: 0x000000010995c6ba EverVCiOSClientMAJK_encode_add_atom_to_buffer + 7310 frame #2: 0x000000010995a554 EverVCiOSClient
-[MAJKSerializer serializeObject:options:encodeOption:block:delegate:selector:error:] + 990
frame #3: 0x000000010995cc2e EverVCiOSClient`-[NSArray(MAJSONKitSerializing) JSONString] + 71
from jsonkit.
Related Issues (20)
- Any popular replacement for JSONKit? HOT 2
- BSD two-clause or three-clause license? HOT 2
- crash at JSONKit.m:2598:77 HOT 2
- Error in serializing NSNumber HOT 2
- Supporting gzip decompression
- Swift HOT 7
- can not use with xcode 7 HOT 4
- crash with iOS9 Xcode7 HOT 5
- Should be #import <JSONKit/JSONKit.h> or <GCJSONKit/JSONKit.h>? HOT 1
- please ignore
- Crash when NSDictionary to String json format. HOT 1
- about convert json to NSDictioanry (error if json string contains double field) HOT 7
- JsonKit message JSONDataWithOptions crashes in macOS Sierra HOT 1
- JSONKit Installation error in X-code 7.3.1 iOS 9.3 HOT 1
- iOS TRAP_TRACE crash
- JSONKit semantic issue after updating the pod HOT 3
- Tagged pointer format changes in iOS 14 break JSONKit on ARM64 HOT 8
- @serkrapiv Not necessarily verboten, just that they must be escaped. The first paragraph of 2.5 Strings says: HOT 1
- Yea
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonkit.