iOS: fix crash from overrelease in UIImageToMat#3340
Merged
opencv-pushbot merged 1 commit intoopencv:2.4from Oct 17, 2014
Merged
iOS: fix crash from overrelease in UIImageToMat#3340opencv-pushbot merged 1 commit intoopencv:2.4from
opencv-pushbot merged 1 commit intoopencv:2.4from
Conversation
Contributor
|
👍 |
vpisarev
added a commit
that referenced
this pull request
Oct 17, 2014
bugttle
pushed a commit
to bugttle/opencv
that referenced
this pull request
Feb 18, 2015
- previous pull request: opencv#3340
|
您好,在iOS9设备上,我发现OpenCV2.4.9的版本,在我使用UIImageToMat次数过多时,会crash。然后我用iOS12的设备测试并没有问题。2.4.9版本的OpenCV是没有UIImageToMat和MatToUIImage实现的。我是把OpenCV3.0以上版本的方法拷贝过来用的。而且我看了#3741的解决方案(适用于3.0),并不能解决iOS9上的crash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is an overrelease occurring in UIImageToMat. This overrelease will randomly cause a crash with the following assertion:
Assertion failed: (!space->is_singleton), function color_space_dealloc, file ColorSpaces/CGColorSpace.c, line 178.
This overrelease is reported by the Xcode analyzer with the following message:
Incorrect decrement of the reference count of an object that is not owned at this point by the caller
The crash tends to occur after a large number of calls to UIImageToMat, around the 20th time it is called in a loop.