Home Where could I get Clion crash location?
Reply: 0

Where could I get Clion crash location?

user1041
1#
user1041 Published in April 26, 2018, 5:28 am

I am using Clion to code with opencv(a computer vision library), sometimes my code crashed , and clion show the crash code in opencv library,but I need to know where the code crashed in my code ,not in the opencv library. Add some print could help, but it's too slow to solve problem.

For example:I write some code below:

Mat image = imread("../1.jpg");
Rect rect1;
Rect rect2;
.
.
.
ROI_1 = image(rect1);
ROI_2 = image(rect2);

if the code crashed and show: OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /home/sgks/00-software/opencv-3.2.0/modules/core/src/matrix.cpp, line 522 terminate called after throwing an instance of 'cv::Exception'

Now I want to know, is code ROI_1 = image(rect1); is wrong or ROI_2 = image(rect2);is wrong

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302188 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO