jishipp / javacv

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

disabled stack guard message when call cvCreateFileCapture #432

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

FrameGrabber grabber = new OpenCVFrameGrabber(videoFile);
grabber.start();

What is the expected output? What do you see instead?

In execution, I receive this : 
"
OpenJDK 64-Bit Server VM warning: You have loaded library /usr/lib/libtbb.so 
which might have disabled stack guard. The VM will try to fix the stack guard 
now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', 
or link it with '-z noexecstack'.
"

What version of the product are you using? On what operating system?
javacv0.7, arch linux, opencv2.4.8-1, intel-tbb 4.2_20131118-1

Please provide any additional information below.
The error appears on this line 174 file OpenCVFrameGrabber: capture = 
cvCreateCameraCapture(deviceNumber);

Do i need to recompile intel-tbb with argument -z noexecstack?

file /usr/lib/libtbb.so
/usr/lib/libtbb.so: ASCII text
cat /usr/lib/libtbb.so
INPUT (libtbb.so.2)

file /usr/lib/libtbb.so.2
/usr/lib/libtbb.so.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
dynamically linked, BuildID[sha1]=71e90d9e7788e55c88a3831591588e090c0176c4, 
stripped

Original issue reported on code.google.com by mathben...@gmail.com on 14 Feb 2014 at 6:33

GoogleCodeExporter commented 9 years ago
Does this also happen when putting the "cppjars" files in the CLASSPATH?

Original comment by samuel.a...@gmail.com on 15 Feb 2014 at 6:14

GoogleCodeExporter commented 9 years ago
Cool, I add cppjars in eclipse and no more error message.

But now, it crash without message in grabber.start();

"
OpenCVFrameGrabber grabber = new 
OpenCVFrameGrabber("~/Downloads/javacv/javacv-examples/OpenCV2_Cookbook/data/bik
e.avi");
grabber.start();
"
The line 169 in file OpenCVFrameGrabber : capture = 
cvCreateFileCapture(filename);

Any idea?

Original comment by mathben...@gmail.com on 16 Feb 2014 at 5:37

Attachments:

GoogleCodeExporter commented 9 years ago
Update. I forget to add javacv.jar file on classpath :(

Now, I receive this error : Error: Could not create camera capture.
Because the capture is null, line 170 file OpenCVFrameGrabber.java

How can i debug this?

Original comment by mathben...@gmail.com on 16 Feb 2014 at 5:57

GoogleCodeExporter commented 9 years ago
More information, I have opencv 2.4.8-1, ffmpeg 2.1.3-1, openjdk 7.u51_2.4.5-1 
and Arch Linux.

Original comment by mathben...@gmail.com on 16 Feb 2014 at 6:17

GoogleCodeExporter commented 9 years ago
I finally found a solution, I use this code : 

FFmpegFrameGrabber grabber = new 
FFmpegFrameGrabber("~/Downloads/javacv/javacv-examples/OpenCV2_Cookbook/data/bik
e.avi");
grabber.start();

I switch OpenCVFrameGrabber to FFmpegFrameGrabber, because I only need FFmpeg 
in my project.

If you are interested, we can check why it crash if you give me some idea, else 
close this ticket.

Thanks

Original comment by mathben...@gmail.com on 16 Feb 2014 at 7:37

GoogleCodeExporter commented 9 years ago
The OpenCV binaries distributed with the CPPJARs doesn't include FFmpeg, 
because as you discovered, we can access the same functionality with 
FFmpegFrameGrabber and FFmpegFrameRecorder, so everything is working as it 
should.

However, I wonder what that "stack guard" message is all about. It sounds like 
it could morph into security issues, so if you have more info about that, let 
me know! Thanks

Original comment by samuel.a...@gmail.com on 22 Feb 2014 at 1:56

GoogleCodeExporter commented 9 years ago
I don't know what do you need to investigate this warning message. Have you 
some idea?

Original comment by mathben...@gmail.com on 22 Feb 2014 at 2:17

GoogleCodeExporter commented 9 years ago
Not really... just that if you do come across anything, I wanted to say that I 
would like to know. No need to investigate :) Thanks. I'll mark as "WontFix" 
for now.

Original comment by samuel.a...@gmail.com on 22 Feb 2014 at 2:21