Hi guys,
I found a strange bug.
I have two versions of ARToolKit on my pc: the first compiled with
Video4Linux (option 1 of the Configure file), the second with gstreamer
input (option 5 of the Configure file). When i run the example simpleVRML
with Video4Linux it works well but if i try to run it with gstreamer input
i have this error:
VRML id - -1
setupMarkersObjects(): read_VRMLdata returned error !!
main(): Unable to set up AR objects and markers.
Segmentation fault
I have tried debugging both and it seems that it fails when it tried to
load .dat files and scaling and rotation values from this file. In
particular the source code that cause application crash is the following:
get_buff(buf, 256, fp);
if( sscanf(buf, "%lf %lf %lf", &viewer[id]->scale[0],
&viewer[id]->scale[1],
&viewer[id]->scale[2]) != 3 ) {
delete viewer[id];
viewer[id] = NULL;
fclose(fp);
return -1;
}
The sscanf doesn't return 3 so the program crash.
I have this error passing the string:
export ARTOOLKIT_CONFIG="v4lsrc device=/dev/video !
video/x-raw-rgb,width=320,height=240 ! ffmpegcolorspace ! identity
name=artoolkit ! fakesink"
I i give a simple videotest string it works.
The strange thing is that with version compiled with Video4Linux it works
well but it seems using the same functions and i don't understand what's
the difference beetween the two version during loading vrml dat file.
Other informations:
Operating System: Fedora Core 7
ARToolKit version: 2.72
Gstreamer version: 0.10
Complete output:
Using config string from environment [v4lsrc device=/dev/video !
video/x-raw-rgb,width=320,height=240 ! ffmpegcolorspace ! identity
name=artoolkit ! fakesink].
libARvideo: GStreamer 0.10.15
libARvideo: GStreamer pipeline is PAUSED!
libARvideo: GStreamer negotiated 320x240
libARvideo: GStreamer pipeline is PLAYING!
libARvideo: GStreamer pipeline is PAUSED!
Camera image size (x,y) = (320,240)
*** Camera Parameter ***
--------------------------------------
SIZE = 320, 240
Distortion factor = 159,250000 131,750000 104,800000 1,012757
350,47574 0,00000 158,25000 0,00000
0,00000 363,04709 120,75000 0,00000
0,00000 0,00000 1,00000 0,00000
--------------------------------------
libARvideo: GStreamer pipeline is PLAYING!
FittingMode (Z): COMPENSATED IMAGE
ProcMode (X) : FULL IMAGE
DrawMode (C) : TEXTURE MAPPING (FULL RESOLUTION)
TemplateMatchingMode (M) : Color Template
MatchingPCAMode (P) : Without PCA
Opening model file Data/object_data_vrml
About to load 2 models.
Model 1: Wrl/snoman.dat
VRML id - -1
setupMarkersObjects(): read_VRMLdata returned error !!
main(): Unable to set up AR objects and markers.
Segmentation fault
Thanks
Hartmut Seichter
VRML renderer (libARvrml)
None
Public
|
Date: 2008-12-18 14:41 I have resolved that problem inserting only a line of code that was |
|
Date: 2008-12-18 05:40 Seems usage problem - need more info. |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Pending | 2008-12-18 14:41 | kekko84 |
| close_date | 2008-12-18 05:40 | 2008-12-18 14:41 | kekko84 |
| status_id | Open | 2008-12-18 05:40 | retrakker |
| assigned_to | nobody | 2008-12-18 05:40 | retrakker |
| close_date | - | 2008-12-18 05:40 | retrakker |