[solved] Crash On new Trunk: When leaving Pong-Level

Found a bug? Report it here.

Moderator: PPS-Leaders

Post Reply
The Jo
General DuGalle
Posts: 121
Joined: Mon Mar 01, 2010 7:43 pm

[solved] Crash On new Trunk: When leaving Pong-Level

Post by The Jo » Wed Dec 01, 2010 9:58 pm

I'm using Ubuntu 10.04 and have the latest trunk installed. (And I've checked the data_extern directory - it also seems to be up to date.)

The crash occured, when I was leaving a Pong match and tried to open another SinglePlayer-Gametype. In fact I was clicking on the Button "SinglePlayer", when the game crashed.

A freeze (without crash log) happened just before when I was playing a gametype and tried afterwards to open a Pong match.

Are there any similar crashes known?
=======================================================
= time: Wed Dec 1 22:49:34 2010
=======================================================
Program received signal SIGSEGV, Segmentation fault.
0x0437d793 in orxonox::PongBall::setSpeed (this=0xb260c60, speed=200)
at /home/jo/orxonox/trunk/src/modules/pong/PongBall.cc:157
157 Vector3 velocity = this->getVelocity();
(gdb)
#0 0x0437d793 in orxonox::PongBall::setSpeed (this=0xb260c60, speed=200)
at /home/jo/orxonox/trunk/src/modules/pong/PongBall.cc:157
#1 0x0437aa44 in orxonox::Pong::startBall (this=0x9fb2bb8)
at /home/jo/orxonox/trunk/src/modules/pong/Pong.cc:191
#2 0x043a72d9 in orxonox::detail::FunctorCaller<void, orxonox::Pong, false, void, void, void, void, void>::call (
functionPointer=0x437a9f2 <orxonox::Pong::startBall()>, object=0x9fb2bb8,
param1=..., param2=..., param3=..., param4=..., param5=...)
at /home/jo/orxonox/trunk/src/libraries/core/command/Functor.h:362
#3 0x043a4b09 in orxonox::FunctorTemplate<void, orxonox::Pong, false, void, void, void, void, void>::operator() (this=0x9fb58f8, object=0x9fb2bb8,
param1=..., param2=..., param3=..., param4=..., param5=...)
at /home/jo/orxonox/trunk/src/libraries/core/command/Functor.h:440
#4 0x043a46e8 in orxonox::FunctorMember<orxonox::Pong>::operator() (
this=0x9fb58f8, param1=..., param2=..., param3=..., param4=..., param5=...)
at /home/jo/orxonox/trunk/src/libraries/core/command/Functor.h:259
#5 0x003a6cb6 in orxonox::Executor::operator() (this=0x9fb5960)
at /home/jo/orxonox/trunk/src/libraries/core/command/Executor.h:106
#6 0x003a64f9 in orxonox::Timer::run (this=0x9fb2d2c)
at /home/jo/orxonox/trunk/src/libraries/tools/Timer.cc:134
#7 0x003a667b in orxonox::Timer::tick (this=0x9fb2d2c, time=...)
at /home/jo/orxonox/trunk/src/libraries/tools/Timer.cc:166
#8 0x00a3b4f7 in orxonox::GSRoot::update (this=0x8f2a718, time=...)
at /home/jo/orxonox/trunk/src/orxonox/gamestates/GSRoot.cc:100
#9 0x0336ef74 in orxonox::Game::updateGameStates (this=0x8dda810)
at /home/jo/orxonox/trunk/src/libraries/core/Game.cc:260
#10 0x0336e7a2 in orxonox::Game::run (this=0x8dda810)
at /home/jo/orxonox/trunk/src/libraries/core/Game.cc:192
#11 0x00987863 in orxonox::main (strCmdLine=...)
at /home/jo/orxonox/trunk/src/orxonox/Main.cc:98
#12 0x08049717 in main (argc=1, argv=0xbfef9ab4)
at /home/jo/orxonox/trunk/src/Orxonox.cc:67
(gdb)
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
(gdb)
Fail. Fail again. Fail better.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash On new Trunk: When leaving Pong-Level

Post by x3n » Wed Dec 15, 2010 9:21 pm

Thanks for reporting this bug. I'm pretty sure this happens if you leave the level right after a goal. The pong-ball will be centered and a timer is created to set its velocity from 0 to 200 after 1 second - however if you leave the level, the timer will try to access a destroyed pong-ball, which leads to a crash. Will be fixed in the next release. :twisted:
Fabian 'x3n' Landau, Orxonox developer

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash On new Trunk: When leaving Pong-Level

Post by x3n » Thu Feb 10, 2011 10:50 pm

Fixed in r7852 (trunk)

The problem was actually a bit trickier because the timer is deleted correctly together with the pong gametye. However the pong gametype itself was not deleted, because there's an ambient sound in the level which hinders the gametype from being deleted.

The ambient sound has to be fixed separately. As a quick solution and to prevent crashes in future similar cases, I added some weak pointers which prevent a crash.
Fabian 'x3n' Landau, Orxonox developer

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest