Segmentation error in running capture-app

25 views
Skip to first unread message

Pranav

unread,
Jul 25, 2011, 3:59:48 AM7/25/11
to structured-light
Hi,

I converted the given code:-

http://code.google.com/p/structured-light/source/browse/#svn%2Ftrunk%2FOpenFrameworks%2Fapps%2FstructuredLight%2Fcapture

to run on linux(mine is ubuntu 10.10),for that i have just modified
the .cbp files and added the libraries equivalent to that of
'windows'.

But it gives run-time segementation error.

Can anyone please guide me regarding from where to start to solve this
problem.

Pranav

unread,
Jul 25, 2011, 4:05:56 AM7/25/11
to structured-light


On Jul 25, 12:59 pm, Pranav <pranav8i...@gmail.com> wrote:
> Hi,
>
>      I converted the given code:-
>
> http://code.google.com/p/structured-light/source/browse/#svn%2Ftrunk%...
>
> to run on linux(mine is ubuntu 10.10),for that i have just modified
> the .cbp files and added the libraries equivalent to that of
> 'windows'.
>
> But it gives run-time segementation error.
>
> Can anyone please guide me regarding from where to start to solve this
> problem.




Just adding one more detail to the problem:- It works fine untill i
enable the camera,at which it flags:-'Segmentation Error'.

Pranav

unread,
Jul 25, 2011, 5:20:12 PM7/25/11
to structured-light
Hi,


I tried to debug the code and found :-
Segmentation fault in 'memcpy' function in 'libc.so.6' shared object
file(present in /usr/lib/i386-gnu-linux folder in ubuntu-10.10).

Can anyone guide me regarding this problem?

Elliot Woods

unread,
Jul 26, 2011, 5:55:27 AM7/26/11
to structur...@googlegroups.com
this might not be much help
but first suggestion is to get a standalone app running with the camera
that way you can identify whether the segfault if coming directly from the camera,
as opposed to the SL app

after that, then it should be easier to track down

elliot

Elliot Woods

unread,
Jul 26, 2011, 5:58:06 AM7/26/11
to structur...@googlegroups.com
also which line does the memcpy sit on?

if it's something in kyle's code and you're getting a segfault
then it might be because the available resolution of your camera is less than what kyle's app is expecting
but oF should have already resampled the bitmap up for you by that point

anyway,
a google code link to file/line where memcpy occurs, would be fantastic for quick evaluation from other eyes!

elliot

Pranav

unread,
Jul 26, 2011, 10:49:48 AM7/26/11
to structured-light
After execution of line no. 41 in following link i get segmentation
fault:-



http://code.google.com/p/structured-light/source/browse/trunk/OpenFrameworks/apps/structuredLight/capture/src/ofxThreadedVideoGrabber.h





Actually i found that value to (this->pixels)=0,hence it is a Null
pointer reference,which is possible reason for Seg. Fault.



But is it due to problem in initialization of my Webcam,if so then can
you please tell me in which direction i should proceed now ?
Reply all
Reply to author
Forward
0 new messages