Page 1 of 1

[solved] Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 12:09 pm
by The Jo
More precisely: When I try to shoot with the laser, the program crashes. I'm currently using the LastManStanding branch. The bug happend on a Ubuntu machine and as well on a tardis computer.
=======================================================
= time: Thu Nov 11 13:03:10 2010
=======================================================
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb60de6d0 (LWP 4358)]
0x06c96556 in raise () from /lib/libc.so.6
(gdb)
#0 0x06c96556 in raise () from /lib/libc.so.6
#1 0x06c97d11 in abort () from /lib/libc.so.6
#2 0x06c8f590 in __assert_fail () from /lib/libc.so.6
#3 0x024dcf1c in Ogre::ProgressiveMesh::bakeNewLOD ()
from /usr/pack/ogre-1.6.1-sd/i686-debian-linux5.0/lib/libOgreMain-1.6.1.so
#4 0x024ddfad in Ogre::ProgressiveMesh::build ()
from /usr/pack/ogre-1.6.1-sd/i686-debian-linux5.0/lib/libOgreMain-1.6.1.so
#5 0x02443c7c in Ogre::Mesh::generateLodLevels ()
from /usr/pack/ogre-1.6.1-sd/i686-debian-linux5.0/lib/libOgreMain-1.6.1.so
#6 0x0145ea87 in orxonox::Model::enableLod (this=0xb4eb838)
at /home/ritzj/orxonox/lastmanstanding/src/orxonox/graphics/Model.cc:192
#7 0x0145ee44 in orxonox::Model::changedMesh (this=0xb4eb838)
at /home/ritzj/orxonox/lastmanstanding/src/orxonox/graphics/Model.cc:108
#8 0x014677bb in orxonox::Model::setMeshSource (this=0xb4eb838,
meshname=@0xbfc52adc)
at /home/ritzj/orxonox/lastmanstanding/src/orxonox/graphics/Model.h:56
#9 0x032cd467 in orxonox::HsW01::shot (this=0xb4dbda0)
at /home/ritzj/orxonox/lastmanstanding/src/modules/weapons/weaponmodes/HsW01.cc:116
#10 0x032d40c6 in orxonox::detail::FunctorCaller<void, orxonox::HsW01, false, void, void, void, void, void>::call (
functionPointer=0x32cd2e2 <orxonox::HsW01::shot()>, object=0xb4dbda0,
param1=@0xabcf1e8, param2=@0xabcf1ec, param3=@0xabcf1f0,
param4=@0xabcf1f4, param5=@0xabcf1f8)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/core/command/Functor.h:362
#11 0x032d4143 in orxonox::FunctorTemplate<void, orxonox::HsW01, false, void, void, void, void, void>::operator() (this=0xb37e240, object=0xb4dbda0,
param1=@0xabcf1e8, param2=@0xabcf1ec, param3=@0xabcf1f0,
param4=@0xabcf1f4, param5=@0xabcf1f8)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/core/command/Functor.h:440
#12 0x032d400d in orxonox::FunctorMember<orxonox::HsW01>::operator() (
this=0xb37e240, param1=@0xabcf1e8, param2=@0xabcf1ec, param3=@0xabcf1f0,
param4=@0xabcf1f4, param5=@0xabcf1f8)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/core/command/Functor.h:259
#13 0x001ae9a1 in orxonox::Executor::operator() (this=0xabcf1d8)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/core/command/Executor.h:106
#14 0x001aa59f in orxonox::Timer::run (this=0xb4dbf68)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/tools/Timer.cc:134
#15 0x001aa71f in orxonox::Timer::tick (this=0xb4dbf68, time=@0x990a850)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/tools/Timer.cc:166
#16 0x013d7933 in orxonox::GSRoot::update (this=0x99cffe8, time=@0x990a850)
at /home/ritzj/orxonox/lastmanstanding/src/orxonox/gamestates/GSRoot.cc:100
#17 0x003eae58 in orxonox::Game::updateGameStates (this=0x990a698)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/core/Game.cc:260
#18 0x003eb42c in orxonox::Game::run (this=0x990a698)
at /home/ritzj/orxonox/lastmanstanding/src/libraries/core/Game.cc:192
#19 0x01316031 in orxonox::main (strCmdLine=@0xbfc52f28)
at /home/ritzj/orxonox/lastmanstanding/src/orxonox/Main.cc:98
#20 0x0804972c in main (argc=1, argv=0xbfc52fe4)
at /home/ritzj/orxonox/lastmanstanding/src/Orxonox.cc:67

Re: Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 12:48 pm
by x3n
crash in Ogre::Mesh::generateLodLevels()... I guess the level doesn't include the LOD information.

Code: Select all

  include("templates/lodinformation.oxt")
and

Code: Select all

  <templates>
    <Template link=lodtemplate_default />
  </templates>
See the corresponding parts in your lms level, then you can easily fix the swallow level :)

Re: Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 1:46 pm
by beni
Is there a way to avoid such errors? I think a lot of hindrance with the levels is how error prone it is to write a new one. I know we plan to make a level editor, but maybe there are ways to further ease that. Just a suggestion into the blue. I have no idea how it would be possible.

Re: Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 2:18 pm
by greenman
the problem here is that lod is enabled by default (which is good imo). the lodtemplate file disables this for different models for which lod produces errors (i.e. projectiles). if someone creates a new level now and doesn't include the lod templates orxonox will fail as soon as you fire a projectile...

is there an easy way to catch these ogre exceptions?

Re: Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 2:34 pm
by x3n
well, it's not an "exception", so unless ogre fixes this, we can't do aynthing except including this template.

@beni: The only way to make this easier is to hardcode that stuff. And I don't think that's a good idea. Everything in Orxonox needs to follow certain patterns (classes, materials, levels, etc.), so I don't think it's too much asked to copy-paste the 4 LOD-related lines.

Re: Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 4:28 pm
by The Jo
This is only a temporary problem. I guess this test level was created before the lod-template was included in the empty level, where one usually starts when one wants to create a new level.
Although I already had faced actually the same bug, I had completely forgotten about it when I was working on the lastmanstanding-level - and it didn't make a difference. Since now the correspoding code is included in the empty level, we don't really have to worry about it.

Re: Orxonox crashes when in Swallow-TestLevel

Posted: Thu Nov 11, 2010 4:45 pm
by beni
Okay I see.. there is not much we can do and hardcoding workarounds is really bad practice. Thanks for elaborating!