Found a bug? Report it here.
Moderator: PPS-Leaders
-
x3n
- Baron Vladimir Harkonnen
- Posts: 810
- Joined: Mon Oct 30, 2006 5:40 pm
-
Contact:
Post
by x3n » Wed Jun 06, 2007 10:47 pm
When I start michi's moonstation level a second time, Orxonox crashes.
errorlog:
Assertion failed: ghost == NULL && "only one flySpectator allowed", file world_entities/spectator.cc, line 138
Looks like the spectator doesn't get destroyed when the level ends.
Maybe someone could have a look at that.
Last edited by
x3n on Sat Jun 09, 2007 11:27 pm, edited 1 time in total.
-
patrick
- Baron Vladimir Harkonnen
- Posts: 350
- Joined: Mon Oct 02, 2006 6:03 pm
- Location: Bern
Post
by patrick » Thu Jun 07, 2007 2:10 pm
Spectator is a world entity and therefore _should_ be destroyed like every other WE. in theory
Where do they get the spectator reference from? Perhaps that pointer is not reset properly.
-
chrigi
- Human Space Navy Major
- Posts: 40
- Joined: Tue Oct 24, 2006 5:52 pm
-
Contact:
Post
by chrigi » Fri Jun 08, 2007 8:53 am
In which branch does this happen?
-
x3n
- Baron Vladimir Harkonnen
- Posts: 810
- Joined: Mon Oct 30, 2006 5:40 pm
-
Contact:
Post
by x3n » Fri Jun 08, 2007 4:23 pm
Main branch; trunk
-
x3n
- Baron Vladimir Harkonnen
- Posts: 810
- Joined: Mon Oct 30, 2006 5:40 pm
-
Contact:
Post
by x3n » Fri Jun 08, 2007 4:55 pm
Adding the marked line to the destructor in spectator.cc solves the problem, but I don't know if this is a good solution.
Code: Select all
Spectator::~Spectator ()
{
this->setPlayer(NULL);
ghost = NULL; <-----------------------
}
-
chrigi
- Human Space Navy Major
- Posts: 40
- Joined: Tue Oct 24, 2006 5:52 pm
-
Contact:
Post
by chrigi » Sat Jun 09, 2007 9:56 am
x3n wrote:Adding the marked line to the destructor in spectator.cc solves the problem, but I don't know if this is a good solution.
Code: Select all
Spectator::~Spectator ()
{
this->setPlayer(NULL);
ghost = NULL; <-----------------------
}
I suggest this solution. so deleting of an other spectator won't set ghost = NULL
Code: Select all
Spectator::~Spectator ()
{
this->setPlayer(NULL);
if ( this == ghost )
ghost = NULL;
}
Does this solve the problem?
Could someone commit this? I can't!
Code: Select all
Sending src/world_entities/spectator.cc
svn: Commit failed (details follow):
svn: CHECKOUT of '/orxonox/!svn/ver/10618/trunk/src/world_entities/spectator.cc': 403 Forbidden (https://svn.orxonox.net)
-
silvan
- Noxonian Brolghormeg
- Posts: 37
- Joined: Wed Oct 11, 2006 7:43 am
Post
by silvan » Sat Jun 09, 2007 11:50 am
chrigi wrote:
Code: Select all
Spectator::~Spectator ()
{
this->setPlayer(NULL);
if ( this == ghost )
ghost = NULL;
}
Does this solve the problem?
Could someone commit this? I can't!
Code: Select all
Sending src/world_entities/spectator.cc
svn: Commit failed (details follow):
svn: CHECKOUT of '/orxonox/!svn/ver/10618/trunk/src/world_entities/spectator.cc': 403 Forbidden (https://svn.orxonox.net)
Done. It's in the trunk.
The light on the end of the tunnel is a train.
-
x3n
- Baron Vladimir Harkonnen
- Posts: 810
- Joined: Mon Oct 30, 2006 5:40 pm
-
Contact:
Post
by x3n » Sat Jun 09, 2007 12:49 pm
Thx chrigi, good idea with "this == ghost".
And yes, it seems to work perfectly
@silvan: Thx for commiting
-
chrigi
- Human Space Navy Major
- Posts: 40
- Joined: Tue Oct 24, 2006 5:52 pm
-
Contact:
Post
by chrigi » Sat Jun 09, 2007 9:39 pm
@x3n: Thx for reporting

Who is online
Users browsing this forum: No registered users and 0 guests