Bug #864

Server crash on character create when compile on win without stlport

Added by kaetemi over 8 years ago. Updated about 8 years ago.

Status:Closed Start date:05/09/2010
Priority:Normal Due date:
Assignee:kaetemi % Done:

100%

Category:Services: General
Target version:Version 0.8.0

Description

The server crashes on character creation, because it is accessing an invalid index in the character login log when the character is saved, as the character has not logged in yet.

--- a/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp
+++ b/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp
@@ -321,7 +321,8 @@
     H_AUTO(CCharacterStore);\
     CFameManager::getInstance().savePlayerFame(_Id, const_cast<EGSPD::CFameContainerPD &>(*_Fames));\
     /* Update the current playing session duration */ \
-    _LastLogStats.begin()->Duration = CTime::getSecondsSince1970() - _LastLogStats.begin()->LoginTime;\
+    if (_LastLogStats.size() > 0) _LastLogStats.begin()->Duration = CTime::getSecondsSince1970() - _LastLogStats.begin()->LoginTime; \
+    else nlwarning("Cannot update play session duration, _LastLogStats is empty, new character?"); \
     \
     /* Unless the top of the position stack is locked, */ \
     /* update the stored position stack with the current position */ \

History

#1 Updated by Anonymous over 8 years ago

  • Status changed from New to Resolved

Applied in changeset r49.

#2 Updated by kaetemi over 8 years ago

  • Assignee set to kaetemi

#3 Updated by kervala over 8 years ago

  • Target version set to Version 0.8.0

#4 Updated by vl about 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF