Comment 9 for bug 1025014

Revision history for this message
Jürgen Kosel (juergen-kosel) wrote :

Hello,

I have recompiled wideland with the debian patches:
tar -xzf widelands_17-3.debian.tar.gz
dpkg-buildpackage -us -b
sudo dpkg -i widelands_17-3_amd64.deb widelands-data_17-3_all.deb widelands-dbg_17-3_amd64.deb

Finally, wideland still crashes with segmentation fault (see attachment).

The location, were the segfault occurs:
  while (current_cmds.size()) { /// in the current TRUNK, this is replaced with while (!current_cmds.empty()) {
   Command & c = *current_cmds.top().cmd;
   if (game_time_var < c.duetime())
    break;

   current_cmds.pop();
   -- m_ncmds;
   assert(game_time_var == c.duetime());

   if (dynamic_cast<GameLogicCommand *>(&c)) { /// THIS dynamic_cast segfaults
    StreamWrite & ss = m_game.syncstream();
    static uint8_t const tag[] = {0xde, 0xad, 0x00};
    ss.Data(tag, 3); // provide an easy-to-find pattern as debugging aid
    ss.Unsigned32(c.duetime());
    ss.Unsigned32(c.id());
   }

   c.execute (m_game);

   delete &c;
  }