mow10 / cvblob

Automatically exported from code.google.com/p/cvblob
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Version 0.10.1 Access Violation in cvtrack.cpp:292 #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. result = cvLabel(chB, labelImg, blobs);
2. cvRenderBlobs(labelImg, blobs, frame, frame);
3. cvUpdateTracks(blobs, tracks,5., 50);
4. cvRenderTracks(tracks, frame, frame,
CV_TRACK_RENDER_ID|CV_TRACK_RENDER_BOUNDING_BOX);

What is the expected output? What do you see instead?
Access Violation in cvtrack.cpp at line 292 :
track->label = blob->label;

What version of the product are you using? On what operating system?
Version 10.1 used with CodeGear Borland C++ 2009 on Windows XP

Please provide any additional information below.
cvblob is used to follow about 100 particles. Version 0.9.15 works
perfectly, while version 0.10.1 get access violation after a 40 frames
analysed.

Original issue reported on code.google.com by xdub...@lambda-x.com on 3 Jun 2010 at 8:55

GoogleCodeExporter commented 8 years ago
Hello,

Have you any way to reproduce the problem? A video or something that you can 
send to
me to test? Can you run "test_tracking" from "test" folder? Does it works well?

Thanks!

Original comment by grendel....@gmail.com on 7 Jun 2010 at 8:48

GoogleCodeExporter commented 8 years ago
I've had the problem as well.  Can't reproduce it reliably, but there is an 
obvious bug in cvtrack.cpp that is causing the crash.

Line 261 allocates CvTrack *track but does not initialize it.  *track is only 
set inside the tt iterator when  (a > area), and if for some reason that 
condition never executes then track will exit the loop while still set to 
garbage.

The next block below that updates track will crash on the dereference of track 
when copying the data.  

Changing the declaration of track to "track = NULL" and checking for null when 
updating the track helps block the crash, but doesn't fix the underlying 
problem that might be causing it.  

(BTW thanks for this library, it's been a great help in my project!)

Original comment by louiskoz...@gmail.com on 28 Jul 2010 at 2:32

GoogleCodeExporter commented 8 years ago
Thank you very much for your reports!

It'll be going to be difficult to debug it. Perhaps I'll include the check for 
null pointer. I didn't include it before now because I didn't want to mask any 
error.

Original comment by grendel....@gmail.com on 30 Jul 2010 at 11:14