sawpawan / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

JavaCV crashes during IplImage deallocation #182

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
--------------------------------------
Not reproducible! Happens only after a while using many cvLoadImage() calls (or 
IplImage.createFrom() calls), and has something to do with the Java Garbage 
Collector.

What is the expected output? What do you see instead?
-----------------------------------------------------
The process crashes, reporting:
======= Backtrace: =========
/lib/libc.so.6(+0x776d6)[0x7f86014dd6d6]
/lib/libc.so.6(+0x7ab41)[0x7f86014e0b41]
/lib/libc.so.6(cfree+0x73)[0x7f86014e3ea3]
/usr/local/lib/libopencv_core.so.2.3.1(cvReleaseData+0x20f)[0x7f85f122be0f]
/usr/local/lib/libopencv_core.so.2.3.1(cvReleaseImage+0x41)[0x7f85f122bf41]
/tmp/libjniopencv_core486893478120925274.so(Java_com_googlecode_javacv_cpp_openc
v_1core_cvReleaseImage+0x35)[0x7f85f0cf6815]
[0x7f85fcd73d6e]

And sometimes other messages...

What version of the product are you using? On what operating system?
--------------------------------------------------------------------
Linux 2.6.35-31-generic #63-Ubuntu SMP Mon Nov 28 19:29:10 UTC 2011 x86_64 
GNU/Linux
OpenCV 2.3.1, JavaCV Revision: 212

Please provide any additional information below
-----------------------------------------------
Happens also after recompiling JavaCV on the targeted machine, but less 
frequently - thus recompiling helps, but doesn't solve the problem.

Original issue reported on code.google.com by tsure...@gmail.com on 8 Apr 2012 at 4:37

GoogleCodeExporter commented 8 years ago
Could you also provide some sample code that almost certainly crashes? Even if 
it has to loop a million times? I'd like to try it here see if I can reproduce 
it, thanks

Original comment by samuel.a...@gmail.com on 9 Apr 2012 at 1:43

GoogleCodeExporter commented 8 years ago
I've ran this a couple of times here on my machine and nothing happens:
        for (int i = 0; i < 100000; i++) {
            IplImage.createFrom(ImageIO.read(new File("/usr/share/opencv/samples/c/lena.jpg")));
            cvReleaseImage(cvLoadImage("/usr/share/opencv/samples/c/lena.jpg"));
            System.gc();
        }
If I cannot reproduce the problem, I won't be able to fix it...

Original comment by samuel.a...@gmail.com on 28 Apr 2012 at 6:55

GoogleCodeExporter commented 8 years ago
Given the lack of feedback, I am guessing this issue has been resolved, but 
please let me know if this is not the case, thank you.

Original comment by samuel.a...@gmail.com on 22 Jul 2012 at 12:50