简体   繁体   English

启用Guard Malloc时,UIImagePNGRepresentation中的EXC_BAD_ACCESS错误

[英]EXC_BAD_ACCESS error in UIImagePNGRepresentation when Guard Malloc enabled

I am getting EXC_BAD_ACCESS error at UIImagePNGRepresentation() when Guard Malloc enabled and when I disable I am not getting any error while converting image. 启用Guard Malloc时在UIImagePNGRepresentation()处获得EXC_BAD_ACCESS错误,当我禁用时,我在转换图像时没有收到任何错误。 I have gone through google for solution but I am not find any working solution approach. 我已经通过谷歌解决方案,但我找不到任何有效的解决方案方法。 below is the code. 下面是代码。

UIImage  *image, *newImage;
NSData *imageData = [NSData dataWithContentsOfFile:@"somepath"];
            image = [UIImage imageWithData:imageData];
NSData* data = nil;
        data = UIImagePNGRepresentation(image);
        // write to temp directory and return URI
        NSString* docsPath = [NSTemporaryDirectory ()stringByStandardizingPath];
// more code

this is a part of phonegap plugin code and any suggestions are really helpful. 这是phonegap插件代码的一部分,任何建议都非常有用。 Thanks. 谢谢。

Information in not sufficient. 信息不充分。 But I can give you a hint that some delegate or property is de-allocated. 但我可以告诉你一些代表或财产被解除分配。 Define it as a strong 将其定义为强者

If you can give you the stack trace it will be more helpful. 如果你能给你堆栈跟踪它会更有帮助。

Good Luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM