Re: [osg-users] Crash using collada files

2010-05-16 Thread Ulrich von Zadow
Hi,

I've reduced this to a very small testcase, downloadable here:

http://www.libavg.de/test_collada_dlopen.zip

I'd appreciate it if others could try this out:

$ ./build_collada_test.sh
$ ./test_collada_static
$ ./test_collada_dlopen
$ diff collada_dlopen_converted.osg collada_static_converted.osg

The test executables each use the same two lines to read a collada file and 
write it again, but the second one executes the code in the context of a 
dynamically-loaded .so. On Ubuntu 8.10 and 9.04, the second version is broken. 
On the mac, everything is ok.

Cheers,

  Uli

On May 15, 2010, at 9:34 AM, Ulrich von Zadow wrote:

> 
> On May 15, 2010, at 8:35 AM, Ulrich Hertlein wrote:
> 
>> Hi Uli,
>> 
>> On 15/05/10 3:43 , Ulrich von Zadow wrote:
>>> I've narrowed the issue down further. This works:
>>> 
>>> int main()
>>> {
>>>   osgDB::readNodeFile(...)
>>>   optimizer.Optimize(...)
>>>   osgDB::writeNodeFile(...)   
>>> }
>>> 
>>> The same code executed in a plugin loaded using dlopen() doesn't work (i.e. 
>>> has the
>>> missing VertexIndices and NormalIndices). On a mac, both variants work. Is 
>>> it possible
>>> that there is some sort of static initialization issue?
>> 
>> Do you maybe have multiple versions installed on the Linux box?  Maybe the 
>> plugin is
>> picking up an older version than what you console app or osgconv is using?
>> 
>> Running them with OSG_NOTIFY_LEVEL=DEBUG will show what plugins they're 
>> using.  You may
>> want to redirect the output to a file, it can be lengthy...
> 
> 
> Nope, same versions - verified with OSG_NOTIFY_LEVEL, ldd and locate.
> 
> Cheers,
> 
>  Uli
> 
> --
> Ulrich von Zadow
> Software Engineer (Dipl. Inf.)
> Exhibit Development
> 
> Tel +49 (0)30 / 2000 577 12
> Fax +49 (0)30 / 2000 577 20
> Skype: uzadow
> 
> Archimedes Solutions GmbH
> Saarbrücker Str. 24 10405 Berlin
> 
> www.archimedes-solutions.com
> 
> Geschäftsführung:
> W. Rien | J. Schmidtsiefen | S. Spenling
> 
> Amtsgericht: Berlin Charlottenburg
> HR Nr.: 107563 B
> UST-ID Nr.: DE-253.771.793
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
Ulrich von Zadow
Software Engineer (Dipl. Inf.)
Exhibit Development

Tel +49 (0)30 / 2000 577 12
Fax +49 (0)30 / 2000 577 20
Skype: uzadow

Archimedes Solutions GmbH
Saarbrücker Str. 24 10405 Berlin

www.archimedes-solutions.com

Geschäftsführung:
W. Rien | J. Schmidtsiefen | S. Spenling

Amtsgericht: Berlin Charlottenburg
HR Nr.: 107563 B
UST-ID Nr.: DE-253.771.793








___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash using collada files

2010-05-15 Thread Ulrich von Zadow

On May 15, 2010, at 8:35 AM, Ulrich Hertlein wrote:

> Hi Uli,
> 
> On 15/05/10 3:43 , Ulrich von Zadow wrote:
>> I've narrowed the issue down further. This works:
>> 
>> int main()
>> {
>>osgDB::readNodeFile(...)
>>optimizer.Optimize(...)
>>osgDB::writeNodeFile(...)   
>> }
>> 
>> The same code executed in a plugin loaded using dlopen() doesn't work (i.e. 
>> has the
>> missing VertexIndices and NormalIndices). On a mac, both variants work. Is 
>> it possible
>> that there is some sort of static initialization issue?
> 
> Do you maybe have multiple versions installed on the Linux box?  Maybe the 
> plugin is
> picking up an older version than what you console app or osgconv is using?
> 
> Running them with OSG_NOTIFY_LEVEL=DEBUG will show what plugins they're 
> using.  You may
> want to redirect the output to a file, it can be lengthy...


Nope, same versions - verified with OSG_NOTIFY_LEVEL, ldd and locate.

Cheers,

  Uli

--
Ulrich von Zadow
Software Engineer (Dipl. Inf.)
Exhibit Development

Tel +49 (0)30 / 2000 577 12
Fax +49 (0)30 / 2000 577 20
Skype: uzadow

Archimedes Solutions GmbH
Saarbrücker Str. 24 10405 Berlin

www.archimedes-solutions.com

Geschäftsführung:
W. Rien | J. Schmidtsiefen | S. Spenling

Amtsgericht: Berlin Charlottenburg
HR Nr.: 107563 B
UST-ID Nr.: DE-253.771.793








___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash using collada files

2010-05-14 Thread Ulrich Hertlein
Hi Uli,

On 15/05/10 3:43 , Ulrich von Zadow wrote:
> I've narrowed the issue down further. This works:
> 
> int main()
> {
> osgDB::readNodeFile(...)
> optimizer.Optimize(...)
> osgDB::writeNodeFile(...)   
> }
> 
> The same code executed in a plugin loaded using dlopen() doesn't work (i.e. 
> has the
> missing VertexIndices and NormalIndices). On a mac, both variants work. Is it 
> possible
> that there is some sort of static initialization issue?

Do you maybe have multiple versions installed on the Linux box?  Maybe the 
plugin is
picking up an older version than what you console app or osgconv is using?

Running them with OSG_NOTIFY_LEVEL=DEBUG will show what plugins they're using.  
You may
want to redirect the output to a file, it can be lengthy...

Cheers,
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash using collada files

2010-05-14 Thread Ulrich von Zadow
Hi,

speaking with myself here...

I've narrowed the issue down further. This works:

int main()
{
osgDB::readNodeFile(...)
optimizer.Optimize(...)
osgDB::writeNodeFile(...)   
}

The same code executed in a plugin loaded using dlopen() doesn't work (i.e. has 
the missing VertexIndices and NormalIndices). On a mac, both variants work. Is 
it possible that there is some sort of static initialization issue? 

Cheers & thanks for looking at this,

  Uli

On May 14, 2010, at 4:14 PM, Ulrich von Zadow wrote:

> Hi Robert,
> 
> On May 14, 2010, at 2:24 PM, Robert Osfield wrote:
> 
>> Hi Ulrich,
>> 
>> On Fri, May 14, 2010 at 10:30 AM, Ulrich von Zadow
>>  wrote:
>>> shouldn't osgviewer crash as well then? Valgrind reports nothing for 
>>> osgviewer with this file.
>> 
>> It's not crashing by fluke.
> 
> No. This is consistent. My program always crashes, osgviewer never crashes.
> 
>>> 
>>> Loading cube_triangulate.dae from the collada test model database gives 
>>> this:
>>> 
>>> CullVisitor::apply(Geode&) detected NaN,
>>>   depth=nan, center=(2.26737e+37 -3.28032e+37 -3.28032e+37),
>>>   matrix={
>>>   nan nan nan nan
>>>   nan nan nan nan
>>>   nan nan nan nan
>>>   nan nan nan nan
>>> }
>>> 
>>> ... repeated lots of times.
>> 
>> It's a case of "garbage in, garbage out", these errors are just
>> symptoms of the original problem with is the broken data.
>> 
>> You can have to look into what the cause of your corrupted scene graph
>> is.  The collada plugin or the original data?
> 
> This is one of the official collada test files I'm loading now, so I doubt 
> it's the file.
> 
> Another data point: osgconv generates a different file than my program. In 
> the osgconv version, there are additional VertexIndices and NormalIndices 
> sections. Is there any reason that
> 
> osgDB::readNodeFile(...)
> optimizer.Optimize(...)
> osgDB::writeNodeFile(...)
> 
> should do something different than what osgconv does?
> 
> I'm attaching the file that osgconv produces, with the sections that are 
> missing in my version marked with '>>>'.
> 
> Cheers,
> 
>  Uli
> 
> Group {
>  name "Collada visual scene group"
>  nodeMask 0x
>  cullingActive TRUE
>  num_children 3
>  MatrixTransform {
>name "Light"
>nodeMask 0x
>cullingActive TRUE
>description "Light"
>referenceFrame RELATIVE
>Matrix {
>  1 0 0 0
>  0 1 0 0
>  0 0 1 0
>  -500 1000 400 1
>}
>num_children 1
>Switch {
>  nodeMask 0x
>  cullingActive TRUE
>  NewChildDefaultValue 1
>  ValueList {
>0
>  }
>  num_children 1
>  LightSource {
>nodeMask 0x
>cullingActive FALSE
>StateSet {
>  UniqueID StateSet_0
>  DataVariance STATIC
>  rendering_hint DEFAULT_BIN
>  renderBinMode INHERIT
>  GL_LIGHT0 ON
>}
>referenceFrame RELATIVE
>Light {
>  light_num 0
>  ambient 0.05 0.05 0.05 1
>  diffuse 1 1 1 1
>  specular 1 1 1 1
>  position 0 0 0 1
>  direction 0 0 -1
>  constant_attenuation 1
>  linear_attenuation 0
>  quadratic_attenuation 0
>  spot_exponent 0
>  spot_cutoff 180
>}
>  }
>}
>  }
>  MatrixTransform {
>name "Box"
>nodeMask 0x
>cullingActive TRUE
>description "Box"
>referenceFrame RELATIVE
>Matrix {
>  1 0 0 0
>  0 1 0 0
>  0 0 1 0
>  0 0 0 1
>}
>num_children 1
>Geode {
>  name "box-lib"
>  nodeMask 0x
>  cullingActive TRUE
>  num_drawables 1
>  Geometry {
>DataVariance STATIC
>name "BlueSG"
>StateSet {
>  DataVariance STATIC
>  rendering_hint DEFAULT_BIN
>  renderBinMode INHERIT
>  GL_CULL_FACE ON
>  Material {
>ColorMode OFF
>ambientColor 0 0 0 1
>diffuseColor 0.137255 0.403922 0.870588 1
>specularColor 0.5 0.5 0.5 1
>emissionColor 0 0 0 1
>shininess 16
>  }
>}
>useDisplayList TRUE
>useVertexBufferObjects FALSE
>PrimitiveSets 1
>{
>  DrawArrayLengths TRIANGLES 0 1
>  {
>36 
>  }
>}
>VertexArray Vec3Array 8
>{
>  -50 50 50
>  50 50 50
>  -50 -50 50
>  50 -50 50
>  -50 50 -50
>  50 50 -50
>  -50 -50 -50
>  50 -50 -50
>}
   VertexIndices IntArray 36
   {
 0 2 3 0 3 1 0 1 5 0
 5 4 6 7 3 6 3 2 0 4
 6 0 6 2 3 7 5 3 5 1
 5 7 6 5 6 4 
   }
>NormalBinding PER_VERTEX
>NormalArray Vec3Array 24
>{
>  0 0 1
>  0 0 1
>  0 0 1
>  0 0 1
>  0 1 0
>  0 1 0
>  0 1 0
>  0 1 0
>  0 -1 0
>  0 -

Re: [osg-users] Crash using collada files

2010-05-14 Thread Ulrich von Zadow
Hi Robert,

On May 14, 2010, at 2:24 PM, Robert Osfield wrote:

> Hi Ulrich,
> 
> On Fri, May 14, 2010 at 10:30 AM, Ulrich von Zadow
>  wrote:
>> shouldn't osgviewer crash as well then? Valgrind reports nothing for 
>> osgviewer with this file.
> 
> It's not crashing by fluke.

No. This is consistent. My program always crashes, osgviewer never crashes.

>> 
>> Loading cube_triangulate.dae from the collada test model database gives this:
>> 
>> CullVisitor::apply(Geode&) detected NaN,
>>depth=nan, center=(2.26737e+37 -3.28032e+37 -3.28032e+37),
>>matrix={
>>nan nan nan nan
>>nan nan nan nan
>>nan nan nan nan
>>nan nan nan nan
>> }
>> 
>> ... repeated lots of times.
> 
> It's a case of "garbage in, garbage out", these errors are just
> symptoms of the original problem with is the broken data.
> 
> You can have to look into what the cause of your corrupted scene graph
> is.  The collada plugin or the original data?

This is one of the official collada test files I'm loading now, so I doubt it's 
the file.

Another data point: osgconv generates a different file than my program. In the 
osgconv version, there are additional VertexIndices and NormalIndices sections. 
Is there any reason that

osgDB::readNodeFile(...)
optimizer.Optimize(...)
osgDB::writeNodeFile(...)

should do something different than what osgconv does?

I'm attaching the file that osgconv produces, with the sections that are 
missing in my version marked with '>>>'.

Cheers,

  Uli

Group {
  name "Collada visual scene group"
  nodeMask 0x
  cullingActive TRUE
  num_children 3
  MatrixTransform {
name "Light"
nodeMask 0x
cullingActive TRUE
description "Light"
referenceFrame RELATIVE
Matrix {
  1 0 0 0
  0 1 0 0
  0 0 1 0
  -500 1000 400 1
}
num_children 1
Switch {
  nodeMask 0x
  cullingActive TRUE
  NewChildDefaultValue 1
  ValueList {
0
  }
  num_children 1
  LightSource {
nodeMask 0x
cullingActive FALSE
StateSet {
  UniqueID StateSet_0
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_LIGHT0 ON
}
referenceFrame RELATIVE
Light {
  light_num 0
  ambient 0.05 0.05 0.05 1
  diffuse 1 1 1 1
  specular 1 1 1 1
  position 0 0 0 1
  direction 0 0 -1
  constant_attenuation 1
  linear_attenuation 0
  quadratic_attenuation 0
  spot_exponent 0
  spot_cutoff 180
}
  }
}
  }
  MatrixTransform {
name "Box"
nodeMask 0x
cullingActive TRUE
description "Box"
referenceFrame RELATIVE
Matrix {
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1
}
num_children 1
Geode {
  name "box-lib"
  nodeMask 0x
  cullingActive TRUE
  num_drawables 1
  Geometry {
DataVariance STATIC
name "BlueSG"
StateSet {
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_CULL_FACE ON
  Material {
ColorMode OFF
ambientColor 0 0 0 1
diffuseColor 0.137255 0.403922 0.870588 1
specularColor 0.5 0.5 0.5 1
emissionColor 0 0 0 1
shininess 16
  }
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
  DrawArrayLengths TRIANGLES 0 1
  {
36 
  }
}
VertexArray Vec3Array 8
{
  -50 50 50
  50 50 50
  -50 -50 50
  50 -50 50
  -50 50 -50
  50 50 -50
  -50 -50 -50
  50 -50 -50
}
>>>VertexIndices IntArray 36
>>>{
>>>  0 2 3 0 3 1 0 1 5 0
>>>  5 4 6 7 3 6 3 2 0 4
>>>  6 0 6 2 3 7 5 3 5 1
>>>  5 7 6 5 6 4 
>>>}
NormalBinding PER_VERTEX
NormalArray Vec3Array 24
{
  0 0 1
  0 0 1
  0 0 1
  0 0 1
  0 1 0
  0 1 0
  0 1 0
  0 1 0
  0 -1 0
  0 -1 0
  0 -1 0
  0 -1 0
  -1 0 0
  -1 0 0
  -1 0 0
  -1 0 0
  1 0 0
  1 0 0
  1 0 0
  1 0 0
  0 0 -1
  0 0 -1
  0 0 -1
  0 0 -1
}
>>>NormalIndices IntArray 36
>>>{
>>>  0 1 2 0 2 3 4 5 6 4
>>>  6 7 8 9 10 8 10 11 12 13
>>>  14 12 14 15 16 17 18 16 18 19
>>>  20 21 22 20 22 23 
>>>}
  }
}
  }
  MatrixTransform {
name "pointLight1"
nodeMask 0x
cullingActive TRUE
description "pointLight1"
referenceFrame RELATIVE
Matrix {
  1 0 0 0
  0 1 0 0
  0 0 1 0
  3 4 10 1
}
num_children 1
Swi

Re: [osg-users] Crash using collada files

2010-05-14 Thread Robert Osfield
Hi Ulrich,

On Fri, May 14, 2010 at 10:30 AM, Ulrich von Zadow
 wrote:
> shouldn't osgviewer crash as well then? Valgrind reports nothing for 
> osgviewer with this file.

It's not crashing by fluke.


>
> Loading cube_triangulate.dae from the collada test model database gives this:
>
> CullVisitor::apply(Geode&) detected NaN,
>    depth=nan, center=(2.26737e+37 -3.28032e+37 -3.28032e+37),
>    matrix={
>        nan nan nan nan
>        nan nan nan nan
>        nan nan nan nan
>        nan nan nan nan
> }
>
> ... repeated lots of times.

It's a case of "garbage in, garbage out", these errors are just
symptoms of the original problem with is the broken data.

You can have to look into what the cause of your corrupted scene graph
is.  The collada plugin or the original data?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash using collada files

2010-05-14 Thread Ulrich von Zadow
Hi Robert,

shouldn't osgviewer crash as well then? Valgrind reports nothing for osgviewer 
with this file.

Loading cube_triangulate.dae from the collada test model database gives this:

CullVisitor::apply(Geode&) detected NaN,
depth=nan, center=(2.26737e+37 -3.28032e+37 -3.28032e+37),
matrix={
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
}

... repeated lots of times.

Cheers,

  Uli

On May 14, 2010, at 11:03 AM, Robert Osfield wrote:

> Hi Ulirch,
> 
> The crash looks like the DrawArrayLengths contains a length that
> exceeds the number of vertices in the geometry, so it's not surprising
> the OpenGL driver is crashing.
> 
> This error could mean a bug in the collada plugin, or possibly even a
> bug in the data file/the exported it came from.
> 
> Robert.
> 
> On Fri, May 14, 2010 at 9:54 AM, Ulrich von Zadow
>  wrote:
>> 
>> On May 14, 2010, at 12:33 AM, Ulrich Hertlein wrote:
>> 
>>> Hi Uli,
>>> 
>>> On 14/05/10 2:06 , Ulrich von Zadow wrote:
 I'm running into a crash when displaying collada files. The same collada 
 files load
 cleanly in osgviewer, and other files load cleanly in my app. So this is 
 probably a bug in
 my code, but still - maybe someone here has an idea what's wrong. The 
 setup is very
 similar to osgscreencapture. Everything is being rendered into a pbuffer.
 
 The first symptom that something is wrong is this output when running in 
 valgrind:
 
 View::init()
 Done DatabasePager::addLoadedDataToSceneGraph0.497ms,0.21ms  
 objects0
 
 ==1271==
 ==1271== Conditional jump or move depends on uninitialised value(s)
 ==1271==at 0x7B19753: ComputeBound::vertex(osg::Vec3f const&) 
 (BoundingBox:149)
 ==1271==by 0x7B18401: ComputeBound::drawArrays(unsigned int, int, int) 
 (Drawable.cpp:690)
>>> 
>>> What I'd try first is to save the scenegraph to a file and check that for 
>>> anything out of
>>> the ordinary.
>> 
>> I've done that now. Nothing looks strange, but it's a little hard for me to 
>> see what 'out of the ordinary' means in this context. This is the Geode that 
>> is being traversed (it's also the last geode in the file):
>> 
>>Geode {
>>  name "ID5226"
>>  nodeMask 0x
>>  cullingActive TRUE
>>  num_drawables 1
>>  Geometry {
>>name "Material1"
>>StateSet {
>>  rendering_hint DEFAULT_BIN
>>  renderBinMode INHERIT
>>  GL_CULL_FACE ON
>>  Material {
>>ColorMode OFF
>>ambientColor 0.2 0.2 0.2 1
>>diffuseColor 0 1 0.916667 1
>>specularColor 0 0 0 1
>>emissionColor 0 0.5 0.458333 1
>>shininess 0
>>  }
>>}
>>useDisplayList TRUE
>>useVertexBufferObjects FALSE
>>PrimitiveSets 1
>>{
>>  DrawArrayLengths TRIANGLES 0 1
>>  {
>>49647
>>  }
>>}
>>VertexArray Vec3Array 9643
>>{
>>  -3.08069 18.7775 -0
>>  -1.07575 19.3925 -0
>>[...]
>> 
>> 
>>> Are you able to get a stack trace from the crash?  Is it in the same spot 
>>> that valgrind is
>>> reporting?
>> 
>> Yep, the stacktrace looks very similar:
>> 
>> #0  ComputeBound::vertex (this=0xbff3b65c, ve...@0xa9d54ff8)
>>at /home/archimedes/devel/deps/OpenSceneGraph-2.8/include/osg/Vec3f:85
>> #1  0xb4380402 in ComputeBound::drawArrays (this=0xbff3b65c,
>>first=-1074547108, count=147156)
>>at /home/archimedes/devel/deps/OpenSceneGraph-2.8/src/osg/Drawable.cpp:690
>> #2  0xb44255f2 in osg::DrawArrayLengths::accept (this=0xa693e68,
>>funct...@0xbff3b65c)
>>at 
>> /home/archimedes/devel/deps/OpenSceneGraph-2.8/src/osg/PrimitiveSet.cpp:91
>> [...]
>> 
>> Btw, the same code doesn't crash on a mac.
>> 
>> Cheers,
>> 
>>  Uli
>> 
>> --
>> Ulrich von Zadow
>> Software Engineer (Dipl. Inf.)
>> Exhibit Development
>> 
>> Tel +49 (0)30 / 2000 577 12
>> Fax +49 (0)30 / 2000 577 20
>> Skype: uzadow
>> 
>> Archimedes Solutions GmbH
>> Saarbrücker Str. 24 10405 Berlin
>> 
>> www.archimedes-solutions.com
>> 
>> Geschäftsführung:
>> W. Rien | J. Schmidtsiefen | S. Spenling
>> 
>> Amtsgericht: Berlin Charlottenburg
>> HR Nr.: 107563 B
>> UST-ID Nr.: DE-253.771.793
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
Ulrich von Zadow
Software Engineer (Dipl. Inf.)
Exhibit Development

Tel +49 (0)30 / 2000 577 

Re: [osg-users] Crash using collada files

2010-05-14 Thread Robert Osfield
Hi Ulirch,

The crash looks like the DrawArrayLengths contains a length that
exceeds the number of vertices in the geometry, so it's not surprising
the OpenGL driver is crashing.

This error could mean a bug in the collada plugin, or possibly even a
bug in the data file/the exported it came from.

Robert.

On Fri, May 14, 2010 at 9:54 AM, Ulrich von Zadow
 wrote:
>
> On May 14, 2010, at 12:33 AM, Ulrich Hertlein wrote:
>
>> Hi Uli,
>>
>> On 14/05/10 2:06 , Ulrich von Zadow wrote:
>>> I'm running into a crash when displaying collada files. The same collada 
>>> files load
>>> cleanly in osgviewer, and other files load cleanly in my app. So this is 
>>> probably a bug in
>>> my code, but still - maybe someone here has an idea what's wrong. The setup 
>>> is very
>>> similar to osgscreencapture. Everything is being rendered into a pbuffer.
>>>
>>> The first symptom that something is wrong is this output when running in 
>>> valgrind:
>>>
>>> View::init()
>>> Done DatabasePager::addLoadedDataToSceneGraph0.497ms,        0.21ms  
>>> objects0
>>>
>>> ==1271==
>>> ==1271== Conditional jump or move depends on uninitialised value(s)
>>> ==1271==    at 0x7B19753: ComputeBound::vertex(osg::Vec3f const&) 
>>> (BoundingBox:149)
>>> ==1271==    by 0x7B18401: ComputeBound::drawArrays(unsigned int, int, int) 
>>> (Drawable.cpp:690)
>>
>> What I'd try first is to save the scenegraph to a file and check that for 
>> anything out of
>> the ordinary.
>
> I've done that now. Nothing looks strange, but it's a little hard for me to 
> see what 'out of the ordinary' means in this context. This is the Geode that 
> is being traversed (it's also the last geode in the file):
>
>        Geode {
>          name "ID5226"
>          nodeMask 0x
>          cullingActive TRUE
>          num_drawables 1
>          Geometry {
>            name "Material1"
>            StateSet {
>              rendering_hint DEFAULT_BIN
>              renderBinMode INHERIT
>              GL_CULL_FACE ON
>              Material {
>                ColorMode OFF
>                ambientColor 0.2 0.2 0.2 1
>                diffuseColor 0 1 0.916667 1
>                specularColor 0 0 0 1
>                emissionColor 0 0.5 0.458333 1
>                shininess 0
>              }
>            }
>            useDisplayList TRUE
>            useVertexBufferObjects FALSE
>            PrimitiveSets 1
>            {
>              DrawArrayLengths TRIANGLES 0 1
>              {
>                49647
>              }
>            }
>            VertexArray Vec3Array 9643
>            {
>              -3.08069 18.7775 -0
>              -1.07575 19.3925 -0
>            [...]
>
>
>> Are you able to get a stack trace from the crash?  Is it in the same spot 
>> that valgrind is
>> reporting?
>
> Yep, the stacktrace looks very similar:
>
> #0  ComputeBound::vertex (this=0xbff3b65c, ve...@0xa9d54ff8)
>    at /home/archimedes/devel/deps/OpenSceneGraph-2.8/include/osg/Vec3f:85
> #1  0xb4380402 in ComputeBound::drawArrays (this=0xbff3b65c,
>    first=-1074547108, count=147156)
>    at /home/archimedes/devel/deps/OpenSceneGraph-2.8/src/osg/Drawable.cpp:690
> #2  0xb44255f2 in osg::DrawArrayLengths::accept (this=0xa693e68,
>    funct...@0xbff3b65c)
>    at 
> /home/archimedes/devel/deps/OpenSceneGraph-2.8/src/osg/PrimitiveSet.cpp:91
> [...]
>
> Btw, the same code doesn't crash on a mac.
>
> Cheers,
>
>  Uli
>
> --
> Ulrich von Zadow
> Software Engineer (Dipl. Inf.)
> Exhibit Development
>
> Tel +49 (0)30 / 2000 577 12
> Fax +49 (0)30 / 2000 577 20
> Skype: uzadow
>
> Archimedes Solutions GmbH
> Saarbrücker Str. 24 10405 Berlin
>
> www.archimedes-solutions.com
>
> Geschäftsführung:
> W. Rien | J. Schmidtsiefen | S. Spenling
>
> Amtsgericht: Berlin Charlottenburg
> HR Nr.: 107563 B
> UST-ID Nr.: DE-253.771.793
>
>
>
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash using collada files

2010-05-14 Thread Ulrich von Zadow

On May 14, 2010, at 12:33 AM, Ulrich Hertlein wrote:

> Hi Uli,
> 
> On 14/05/10 2:06 , Ulrich von Zadow wrote:
>> I'm running into a crash when displaying collada files. The same collada 
>> files load
>> cleanly in osgviewer, and other files load cleanly in my app. So this is 
>> probably a bug in
>> my code, but still - maybe someone here has an idea what's wrong. The setup 
>> is very
>> similar to osgscreencapture. Everything is being rendered into a pbuffer.
>> 
>> The first symptom that something is wrong is this output when running in 
>> valgrind:
>> 
>> View::init()
>> Done DatabasePager::addLoadedDataToSceneGraph0.497ms,0.21ms  objects0
>> 
>> ==1271== 
>> ==1271== Conditional jump or move depends on uninitialised value(s)
>> ==1271==at 0x7B19753: ComputeBound::vertex(osg::Vec3f const&) 
>> (BoundingBox:149)
>> ==1271==by 0x7B18401: ComputeBound::drawArrays(unsigned int, int, int) 
>> (Drawable.cpp:690)
> 
> What I'd try first is to save the scenegraph to a file and check that for 
> anything out of
> the ordinary.

I've done that now. Nothing looks strange, but it's a little hard for me to see 
what 'out of the ordinary' means in this context. This is the Geode that is 
being traversed (it's also the last geode in the file):

Geode {
  name "ID5226"
  nodeMask 0x
  cullingActive TRUE
  num_drawables 1
  Geometry {
name "Material1"
StateSet {
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_CULL_FACE ON
  Material {
ColorMode OFF
ambientColor 0.2 0.2 0.2 1
diffuseColor 0 1 0.916667 1
specularColor 0 0 0 1
emissionColor 0 0.5 0.458333 1
shininess 0
  }
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
  DrawArrayLengths TRIANGLES 0 1
  {
49647 
  }
}
VertexArray Vec3Array 9643
{
  -3.08069 18.7775 -0
  -1.07575 19.3925 -0
[...]


> Are you able to get a stack trace from the crash?  Is it in the same spot 
> that valgrind is
> reporting?

Yep, the stacktrace looks very similar:

#0  ComputeBound::vertex (this=0xbff3b65c, ve...@0xa9d54ff8)
at /home/archimedes/devel/deps/OpenSceneGraph-2.8/include/osg/Vec3f:85
#1  0xb4380402 in ComputeBound::drawArrays (this=0xbff3b65c, 
first=-1074547108, count=147156)
at /home/archimedes/devel/deps/OpenSceneGraph-2.8/src/osg/Drawable.cpp:690
#2  0xb44255f2 in osg::DrawArrayLengths::accept (this=0xa693e68, 
funct...@0xbff3b65c)
at 
/home/archimedes/devel/deps/OpenSceneGraph-2.8/src/osg/PrimitiveSet.cpp:91
[...]

Btw, the same code doesn't crash on a mac.

Cheers,

  Uli

--
Ulrich von Zadow
Software Engineer (Dipl. Inf.)
Exhibit Development

Tel +49 (0)30 / 2000 577 12
Fax +49 (0)30 / 2000 577 20
Skype: uzadow

Archimedes Solutions GmbH
Saarbrücker Str. 24 10405 Berlin

www.archimedes-solutions.com

Geschäftsführung:
W. Rien | J. Schmidtsiefen | S. Spenling

Amtsgericht: Berlin Charlottenburg
HR Nr.: 107563 B
UST-ID Nr.: DE-253.771.793








___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash using collada files

2010-05-13 Thread Ulrich Hertlein
Hi Uli,

On 14/05/10 2:06 , Ulrich von Zadow wrote:
> I'm running into a crash when displaying collada files. The same collada 
> files load
> cleanly in osgviewer, and other files load cleanly in my app. So this is 
> probably a bug in
> my code, but still - maybe someone here has an idea what's wrong. The setup 
> is very
> similar to osgscreencapture. Everything is being rendered into a pbuffer.
> 
> The first symptom that something is wrong is this output when running in 
> valgrind:
> 
> View::init()
> Done DatabasePager::addLoadedDataToSceneGraph0.497ms, 0.21ms  objects0
> 
> ==1271== 
> ==1271== Conditional jump or move depends on uninitialised value(s)
> ==1271==at 0x7B19753: ComputeBound::vertex(osg::Vec3f const&) 
> (BoundingBox:149)
> ==1271==by 0x7B18401: ComputeBound::drawArrays(unsigned int, int, int) 
> (Drawable.cpp:690)

What I'd try first is to save the scenegraph to a file and check that for 
anything out of
the ordinary.

Are you able to get a stack trace from the crash?  Is it in the same spot that 
valgrind is
reporting?

Cheers,
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org