FreeOrion

Forums for the FreeOrion project
It is currently Wed Jun 19, 2013 12:01 am

All times are UTC




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Server crash on exception in r3703
PostPosted: Sun Jul 25, 2010 4:57 pm 
Offline
Space Krill

Joined: Sun Jul 25, 2010 4:47 pm
Posts: 4
I am running gentoo amd64, with some packages from ~amd64. I have compiled FreeOrion r3703 from the gamerlay overlay. I am using boost 1.42, gigi r813, and ogre 1.6.5.

When attempting to start a game, freeoriond dies after this snippet:

Code:
...
2010-07-25 09:44:17,964 DEBUG Server : ServerApp::NewGameInit: Compiling PlayerInfo for each player
2010-07-25 09:44:17,964 DEBUG Server : ServerApp::NewGameInit: Updating first-turn Empire stuff
2010-07-25 09:44:17,972 DEBUG Server : ServerApp::NewGameInit: Sending GameStartMessages to players
2010-07-25 09:44:17,973 DEBUG Server : GetEmpireKnownObjectsToSerialize
2010-07-25 09:44:17,973 DEBUG Server : (ServerFSM) ~WaitingForSPGameJoiners
2010-07-25 09:44:17,973 DEBUG Server : ServerApp::CleanupAIs() killing 3 AI clients.
2010-07-25 09:44:18,015 ERROR Server : main() caught exception(std::exception): unregistered class

The corresponding freeorion.log and AI_X.log are below:

Code:
...
2010-07-25 09:44:14,862 DEBUG Client : ShipDesign::ValidDesign: hull not found:
2010-07-25 09:44:14,862 ERROR Client : DesignWnd::MainPanel::RefreshIncompleteDesign attempting to create an invalid design.
2010-07-25 09:44:14,862 DEBUG Client : ShipDesign::ValidDesign: hull not found:
2010-07-25 09:44:14,862 ERROR Client : DesignWnd::MainPanel::RefreshIncompleteDesign attempting to create an invalid design.
2010-07-25 09:44:14,862 DEBUG Client : (HumanClientFSM) ~WaitingForSPHostAck
2010-07-25 09:44:14,862 DEBUG Client : (HumanClientFSM) PlayingGame
2010-07-25 09:44:14,868 DEBUG Client : (HumanClientFSM) WaitingForTurnData
2010-07-25 09:44:14,868 DEBUG Client : (HumanClientFSM) WaitingForTurnDataIdle
2010-07-25 09:44:17,975 DEBUG Client : ClientNetworking::NetworkingThread() : Networking thread will be terminated due to disconnect exception "End of file"

Code:
2010-07-25 09:44:16,848 DEBUG AI : AI_X logger initialized.
2010-07-25 09:44:16,848 DEBUG AI : AIClientApp and logging initialized.  Running app.
2010-07-25 09:44:16,848 DEBUG AI : PythonAI::PythonAI()
2010-07-25 09:44:16,864 DEBUG AI : Python version: 2.6.5 (release26-maint, Jun  1 2010, 23:11:10)
[GCC 4.4.3]
2010-07-25 09:44:16,864 DEBUG AI : Python prefix: /usr
2010-07-25 09:44:16,864 DEBUG AI : Python module search path: /usr/lib64/python26.zip:/usr/lib64/python2.6/:/usr/lib64/python2.6/plat-linux2:/usr/lib64/python2.6/lib-tk:/usr/lib64/python2.6/lib-old:/usr/lib64/python2.6/lib-dynload
2010-07-25 09:44:16,865 DEBUG AI : Python stdout and stderr redirected
2010-07-25 09:44:16,883 DEBUG AI : Initialized FreeOrion Python AI
2010-07-25 09:44:16,883 DEBUG AI : Initialized Python AI
2010-07-25 09:44:16,883 DEBUG AI : Attempting to contact server
2010-07-25 09:44:17,884 DEBUG AI : AIClientApp::HandleMessage : Received JOIN_GAME acknowledgement


Based on the similarities to this thread, I have tried to look through Message.cpp and ServerApp.cpp for empty messages, and do not see anything obvious, but IANAD.

Let me know what I can do to help. Thanks in advance!


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Sun Jul 25, 2010 6:00 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
The thread you linked appears to be an unrelated problem. Your problem looks more similar to this thread: viewtopic.php?p=43161#p43161

It's a problem with boost serialization.

In util/SerializeUniverse.cpp could you modify Universe::serialize to add
Code:
#include "AppInterface.h"
to the top, and to replace
Code:
    ar  & BOOST_SERIALIZATION_NVP(s_universe_width)
        & BOOST_SERIALIZATION_NVP(ship_designs)
        & BOOST_SERIALIZATION_NVP(m_empire_known_ship_design_ids)
        & BOOST_SERIALIZATION_NVP(empire_object_visibility)
        & BOOST_SERIALIZATION_NVP(empire_object_visibility_turns)
        & BOOST_SERIALIZATION_NVP(empire_known_destroyed_object_ids)
        & BOOST_SERIALIZATION_NVP(objects)
        & BOOST_SERIALIZATION_NVP(empire_latest_known_objects)
        & BOOST_SERIALIZATION_NVP(m_last_allocated_object_id)
        & BOOST_SERIALIZATION_NVP(m_last_allocated_design_id);
with
Code:
    Logger().debugStream() << "serializing s_universe_width";
    ar  & BOOST_SERIALIZATION_NVP(s_universe_width);
    Logger().debugStream() << "serializing ship_designs";
    ar  & BOOST_SERIALIZATION_NVP(ship_designs);
    Logger().debugStream() << "serializing m_empire_known_ship_design_ids";
    ar  & BOOST_SERIALIZATION_NVP(m_empire_known_ship_design_ids);
    Logger().debugStream() << "serializing empire_object_visibility";
    ar  & BOOST_SERIALIZATION_NVP(empire_object_visibility);
    Logger().debugStream() << "serializing empire_object_visibility_turns";
    ar  & BOOST_SERIALIZATION_NVP(empire_object_visibility_turns);
    Logger().debugStream() << "serializing empire_known_destroyed_object_ids";
    ar  & BOOST_SERIALIZATION_NVP(empire_known_destroyed_object_ids);
    Logger().debugStream() << "serializing objects";
    ar  & BOOST_SERIALIZATION_NVP(objects);
    Logger().debugStream() << "serializing empire_latest_known_objects";
    ar  & BOOST_SERIALIZATION_NVP(empire_latest_known_objects);
    Logger().debugStream() << "serializing m_last_allocated_object_id";
    ar  & BOOST_SERIALIZATION_NVP(m_last_allocated_object_id);
    Logger().debugStream() << "serializing m_last_allocated_design_id";
    ar  & BOOST_SERIALIZATION_NVP(m_last_allocated_design_id);

Then try rebuilding and running again, and post the new server (freeoriond) log file after the crash? This will help narrow down what class is unregistered with the serializer on your system, but not others.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Sun Jul 25, 2010 9:55 pm 
Offline
Space Krill

Joined: Sun Jul 25, 2010 4:47 pm
Posts: 4
As requested:

Code:
2010-07-25 14:52:41,804 DEBUG Server : ServerApp::NewGameInit: Compiling PlayerInfo for each player
2010-07-25 14:52:41,804 DEBUG Server : ServerApp::NewGameInit: Updating first-turn Empire stuff
2010-07-25 14:52:41,812 DEBUG Server : ServerApp::NewGameInit: Sending GameStartMessages to players
2010-07-25 14:52:41,812 DEBUG Server : GetEmpireKnownObjectsToSerialize
2010-07-25 14:52:41,812 DEBUG Server : serializing s_universe_width
2010-07-25 14:52:41,812 DEBUG Server : serializing ship_designs
2010-07-25 14:52:41,812 DEBUG Server : serializing m_empire_known_ship_design_ids
2010-07-25 14:52:41,812 DEBUG Server : serializing empire_object_visibility
2010-07-25 14:52:41,812 DEBUG Server : serializing empire_object_visibility_turns
2010-07-25 14:52:41,813 DEBUG Server : serializing empire_known_destroyed_object_ids
2010-07-25 14:52:41,813 DEBUG Server : serializing objects
2010-07-25 14:52:41,813 DEBUG Server : (ServerFSM) ~WaitingForSPGameJoiners
2010-07-25 14:52:41,813 DEBUG Server : ServerApp::CleanupAIs() killing 3 AI clients.
2010-07-25 14:52:41,855 ERROR Server : main() caught exception(std::exception): unregistered class

Note that I am ommitting all of the apparently successful stuff adding ship designs and such prior to these events. I can upload the full log if you need.

Thanks again!

*EDIT* As a point of interest, I did also read through the post you mentioned earlier, and I have checked the boost version available to freeorion as closely as I know how. I am running gentoo, and boost 1.42 is the only boost I have installed. I have checked for stale and orphaned files from older versions but I have not found a single file from an older version of boost. If you know something in particular I can look for, let me know.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Sun Jul 25, 2010 11:58 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
In SerializeUniverseExports.ipp, could you replace
Code:
#ifdef FREEORION_WIN32

BOOST_CLASS_EXPORT(System)

#else

// HACK!  For some odd reason, defining guid() below with inline, and only
// when specialized to System, fails to define a reachable specialization when
// overload resolution looks for it at call time later.  GCC.  Go figure.

namespace boost { namespace serialization {
    template<>
    struct guid_defined<System> : boost::mpl::true_ {};

    template<>
    const char * guid<System>()
    { return "System"; }
} }

BOOST_CLASS_EXPORT_IMPLEMENT(System)

#endif
with
Code:
BOOST_CLASS_EXPORT(System)

and try again?

It's choking on serializing of the UniverseObjects, but I don't have any way to know which one. To help figure that out, could you modify SerializeUniverse.cpp further, to add Logger().debugStream() calls to the start of the serialize functions for UniverseObject, Ship, Planet, Fleet, Building and System? Something like this, so it's clear what serialize functions are running, and thus by elimination, are known not to be the problem.
Code:
template <class Archive>
void UniverseObject::serialize(Archive& ar, const unsigned int version)
{
    Logger().debugStream() << "Serialize UniverseObject";
    ar  & BOOST_SERIALIZATION_NVP(m_id)
        & BOOST_SERIALIZATION_NVP(m_name)
        & BOOST_SERIALIZATION_NVP(m_x)
        & BOOST_SERIALIZATION_NVP(m_y)
        & BOOST_SERIALIZATION_NVP(m_owners)
        & BOOST_SERIALIZATION_NVP(m_system_id)
        & BOOST_SERIALIZATION_NVP(m_specials)
        & BOOST_SERIALIZATION_NVP(m_meters)
        & BOOST_SERIALIZATION_NVP(m_created_on_turn);
}

template <class Archive>
void System::serialize(Archive& ar, const unsigned int version)
{
    Logger().debugStream() << "Serialize System";
    ar  & BOOST_SERIALIZATION_BASE_OBJECT_NVP(UniverseObject)
        & BOOST_SERIALIZATION_NVP(m_star)
        & BOOST_SERIALIZATION_NVP(m_orbits)
        & BOOST_SERIALIZATION_NVP(m_objects)
        & BOOST_SERIALIZATION_NVP(m_starlanes_wormholes);
}

template <class Archive>
void Planet::serialize(Archive& ar, const unsigned int version)
{
    Logger().debugStream() << "Serialize Planet";
    ar  & BOOST_SERIALIZATION_BASE_OBJECT_NVP(UniverseObject)
        & BOOST_SERIALIZATION_BASE_OBJECT_NVP(PopCenter)
        & BOOST_SERIALIZATION_BASE_OBJECT_NVP(ResourceCenter)
        & BOOST_SERIALIZATION_NVP(m_type)
        & BOOST_SERIALIZATION_NVP(m_size)
        & BOOST_SERIALIZATION_NVP(m_orbital_period)
        & BOOST_SERIALIZATION_NVP(m_initial_orbital_position)
        & BOOST_SERIALIZATION_NVP(m_rotational_period)
        & BOOST_SERIALIZATION_NVP(m_axial_tilt)
        & BOOST_SERIALIZATION_NVP(m_buildings)
        & BOOST_SERIALIZATION_NVP(m_available_trade)
        & BOOST_SERIALIZATION_NVP(m_just_conquered)
        & BOOST_SERIALIZATION_NVP(m_is_about_to_be_colonized);
}

template <class Archive>
void Building::serialize(Archive& ar, const unsigned int version)
{
    Logger().debugStream() << "Serialize Building";
    ar  & BOOST_SERIALIZATION_BASE_OBJECT_NVP(UniverseObject)
        & BOOST_SERIALIZATION_NVP(m_building_type)
        & BOOST_SERIALIZATION_NVP(m_planet_id)
        & BOOST_SERIALIZATION_NVP(m_ordered_scrapped);
}

template <class Archive>
void BuildingType::serialize(Archive& ar, const unsigned int version)
{
    ar  & BOOST_SERIALIZATION_NVP(m_name)
        & BOOST_SERIALIZATION_NVP(m_description)
        & BOOST_SERIALIZATION_NVP(m_build_cost)
        & BOOST_SERIALIZATION_NVP(m_build_time)
        & BOOST_SERIALIZATION_NVP(m_maintenance_cost)
        & BOOST_SERIALIZATION_NVP(m_location)
        & BOOST_SERIALIZATION_NVP(m_effects)
        & BOOST_SERIALIZATION_NVP(m_graphic);
}

template <class Archive>
void Fleet::serialize(Archive& ar, const unsigned int version)
{
    Logger().debugStream() << "Serialize Fleet";
    ar  & BOOST_SERIALIZATION_BASE_OBJECT_NVP(UniverseObject)
        & BOOST_SERIALIZATION_NVP(m_ships)
        & BOOST_SERIALIZATION_NVP(m_moving_to)
        & BOOST_SERIALIZATION_NVP(m_speed)
        & BOOST_SERIALIZATION_NVP(m_prev_system)
        & BOOST_SERIALIZATION_NVP(m_next_system)
        & BOOST_SERIALIZATION_NVP(m_travel_route)
        & BOOST_SERIALIZATION_NVP(m_travel_distance)
        & BOOST_SERIALIZATION_NVP(m_arrived_this_turn)
        & BOOST_SERIALIZATION_NVP(m_arrival_starlane);
}

template <class Archive>
void Ship::serialize(Archive& ar, const unsigned int version)
{
    Logger().debugStream() << "Serialize Ship";
    ar  & BOOST_SERIALIZATION_BASE_OBJECT_NVP(UniverseObject)
        & BOOST_SERIALIZATION_NVP(m_design_id)
        & BOOST_SERIALIZATION_NVP(m_fleet_id)
        & BOOST_SERIALIZATION_NVP(m_ordered_scrapped)
        & BOOST_SERIALIZATION_NVP(m_fighters)
        & BOOST_SERIALIZATION_NVP(m_missiles)
        & BOOST_SERIALIZATION_NVP(m_part_meters)
        & BOOST_SERIALIZATION_NVP(m_species_name);
}


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Mon Jul 26, 2010 2:23 am 
Offline
Space Krill

Joined: Sun Jul 25, 2010 4:47 pm
Posts: 4
After the first change:

Code:
2010-07-25 18:09:00,330 DEBUG Server : ServerApp::NewGameInit: Compiling PlayerInfo for each player
2010-07-25 18:09:00,330 DEBUG Server : ServerApp::NewGameInit: Updating first-turn Empire stuff
2010-07-25 18:09:00,338 DEBUG Server : ServerApp::NewGameInit: Sending GameStartMessages to players
2010-07-25 18:09:00,339 DEBUG Server : GetEmpireKnownObjectsToSerialize
2010-07-25 18:09:00,339 DEBUG Server : serializing s_universe_width
2010-07-25 18:09:00,339 DEBUG Server : serializing ship_designs
2010-07-25 18:09:00,339 DEBUG Server : serializing m_empire_known_ship_design_ids
2010-07-25 18:09:00,339 DEBUG Server : serializing empire_object_visibility
2010-07-25 18:09:00,339 DEBUG Server : serializing empire_object_visibility_turns
2010-07-25 18:09:00,339 DEBUG Server : serializing empire_known_destroyed_object_ids
2010-07-25 18:09:00,339 DEBUG Server : serializing objects
2010-07-25 18:09:00,340 DEBUG Server : (ServerFSM) ~WaitingForSPGameJoiners
2010-07-25 18:09:00,340 DEBUG Server : ServerApp::CleanupAIs() killing 3 AI clients.
2010-07-25 18:09:00,383 ERROR Server : main() caught exception(std::exception): unregistered class

And after the second:

Code:
2010-07-25 19:06:49,759 DEBUG Server : ServerApp::NewGameInit: Compiling PlayerInfo for each player
2010-07-25 19:06:49,759 DEBUG Server : ServerApp::NewGameInit: Updating first-turn Empire stuff
2010-07-25 19:06:49,767 DEBUG Server : ServerApp::NewGameInit: Sending GameStartMessages to players
2010-07-25 19:06:49,767 DEBUG Server : GetEmpireKnownObjectsToSerialize
2010-07-25 19:06:49,767 DEBUG Server : serializing s_universe_width
2010-07-25 19:06:49,767 DEBUG Server : serializing ship_designs
2010-07-25 19:06:49,767 DEBUG Server : serializing m_empire_known_ship_design_ids
2010-07-25 19:06:49,767 DEBUG Server : serializing empire_object_visibility
2010-07-25 19:06:49,767 DEBUG Server : serializing empire_object_visibility_turns
2010-07-25 19:06:49,767 DEBUG Server : serializing empire_known_destroyed_object_ids
2010-07-25 19:06:49,767 DEBUG Server : serializing objects
2010-07-25 19:06:49,915 DEBUG Server : (ServerFSM) ~WaitingForSPGameJoiners
2010-07-25 19:06:49,915 DEBUG Server : ServerApp::CleanupAIs() killing 3 AI clients.
2010-07-25 19:06:49,957 ERROR Server : main() caught exception(std::exception): unregistered class


I'm no expert, but that doesn't look to have changed much. I definitely added the lines you wanted to util/SerializeUniverse.cpp as you showed, and I recompiled it first just by re-running make, then by make clean && make, then by make clean && cmake . && make, and none of them seemed to make a difference. So I guess that means none of those classes are getting serialized at all?


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Mon Jul 26, 2010 3:51 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
toadicus wrote:
So I guess that means none of those classes are getting serialized at all?

The first object to get serialized will always be a System, since those have the lowest id numbers since they're created first during universe generation, and System is the class that had that extra special case code for it, so I'm inclined to think the problem is with serializing System objects and it never gets far enough into object serialization to see any of the other class' log output during serialization.

So, could you find ObjectMap::CompleteCopyVisible (around line 311 of Universe.cpp) and add, after "int object_id = it->first":
Code:
        if (const System* system = universe_object_cast<const System*>(it->second))
            continue;
(around line 321) and try again? That should skip copying any System objects into the ObjectMap that is serialized and sent to players, allowing the ObjectMap serialization to get into other UniverseObject-derived classes and hopefully produce some log output about serializing.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Mon Jul 26, 2010 2:09 pm 
Offline
Space Krill

Joined: Sun Jul 25, 2010 4:47 pm
Posts: 4
That did make a difference:

Code:
2010-07-26 07:08:01,190 DEBUG Server : ServerApp::NewGameInit: Compiling PlayerInfo for each player
2010-07-26 07:08:01,190 DEBUG Server : ServerApp::NewGameInit: Updating first-turn Empire stuff
2010-07-26 07:08:01,198 DEBUG Server : ServerApp::NewGameInit: Sending GameStartMessages to players
2010-07-26 07:08:01,199 DEBUG Server : GetEmpireKnownObjectsToSerialize
2010-07-26 07:08:01,199 DEBUG Server : serializing s_universe_width
2010-07-26 07:08:01,199 DEBUG Server : serializing ship_designs
2010-07-26 07:08:01,199 DEBUG Server : serializing m_empire_known_ship_design_ids
2010-07-26 07:08:01,199 DEBUG Server : serializing empire_object_visibility
2010-07-26 07:08:01,199 DEBUG Server : serializing empire_object_visibility_turns
2010-07-26 07:08:01,199 DEBUG Server : serializing empire_known_destroyed_object_ids
2010-07-26 07:08:01,199 DEBUG Server : serializing objects
2010-07-26 07:08:01,199 DEBUG Server : Serialize Planet
2010-07-26 07:08:01,199 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,199 DEBUG Server : Serialize Planet
2010-07-26 07:08:01,199 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Planet
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Planet
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Planet
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Planet
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Building
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Building
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,200 DEBUG Server : Serialize Building
2010-07-26 07:08:01,200 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Building
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Fleet
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Ship
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Ship
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Ship
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Ship
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Fleet
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Ship
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : Serialize Ship
2010-07-26 07:08:01,201 DEBUG Server : Serialize UniverseObject
2010-07-26 07:08:01,201 DEBUG Server : serializing empire_latest_known_objects
2010-07-26 07:08:01,202 DEBUG Server : (ServerFSM) ~WaitingForSPGameJoiners
2010-07-26 07:08:01,202 DEBUG Server : ServerApp::CleanupAIs() killing 3 AI clients.
2010-07-26 07:08:01,243 ERROR Server : main() caught exception(std::exception): unregistered class


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Mon Jul 26, 2010 11:02 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
That appears to confirm my suspicion about serialization of System being the problem. Once it gets to serializing empire_latest_known_objects, it likely is crashing when trying to serialize the first System object in that set of objects (which are still included after that modification which only affected the visible objects).

As to how to fix... I'm not sure. I'll see if tzlaine can comment, though he's quite busy at the moment.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Sun Aug 29, 2010 9:15 am 
Offline
Space Krill

Joined: Sun Aug 29, 2010 9:12 am
Posts: 1
Same problem here with latest svn r3775. AFAIK, I've removed all traces of boost 1.40, and have only 1.42.
'ldconfig' on freeorion/freeoriond also only shows version 1.42.

I'll try to debug in the same way.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Wed Sep 29, 2010 9:01 pm 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
running 0.3.15 on openSUSE 11.2 x86_64, boost 1.44 cause this same crash. I've been looking in SVN and haven't come across any updates about it.

Is this still a common problem?

q


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Wed Sep 29, 2010 9:16 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
q1w2e3r4 wrote:
Is this still a common problem?

Yes.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Thu Sep 30, 2010 1:56 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
Geoff the Medio wrote:
q1w2e3r4 wrote:
Is this still a common problem?

Yes.

If you're able to build and run FreeOrion and are getting this issue, as appears to be the case, you could be very helpful in identifying and fixing it. I'm not building and running on Linux myself, so can't do any testing.

If you're willing, the first thing I'd like to try is renaming the System class to System_ or System289533hasEEq or something else more likely to be unique. My best (or only?) guess is that it doesn't like the name "System" somewhere in the serialization code...

Otherwise, you could try removing some of the data members of the class to see if one in particular is causing the problems.


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Thu Sep 30, 2010 10:40 am 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
I am very willing to help - I have quite a bit of experience building/compiling/packaging applications. (Not so much coding in C++ though...)

I have already gotten all of freeorion to compile on x86 and x86_64 dynamically on openSUSE 11.1, 11.2, 11.3.

I will start by renaming System.

q


Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Thu Sep 30, 2010 1:13 pm 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
Well, after creating a 188KB diff to rename 'System' to 'StarSystem', I still get the unregistered class error. :(

Attached is the patch anyways. I couldn't change the vcproj files with it, probably because of conflicting line endings.

q


Attachments:
File comment: refactor System -> StarSystem
System_StarSystem.patch.gz [36.04 KiB]
Downloaded 40 times
Top
 Profile  
 
 Post subject: Re: Server crash on exception in r3703
PostPosted: Thu Sep 30, 2010 8:10 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
There is a good chunk of special case code for System / StarSystem serialization that was written to resolve other serialization problems (that may or may not be the same issue popping up again). Just substituting the class name might not adequately replace that code... particularly in SerializeUniverseExports.ipp. It might help to rip out all that special-case code for System serialization.

Also, can you have a try at removing some of the System members? Does serializing a System / StarSystem class that has no data members (and just outputs defaults values from getters where these members would normally be accessed) work? I'm thinking maybe it doesn't like ObjectMultimap or StarlaneMap for some reason? ... There must be *something* about the class itself that is causing the serialization code to fail, and I don't know how else to find out what it is besides some trial and error...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group