Bug #1195

EGS crashing on client exit (Windows)

Added by molator almost 8 years ago. Updated over 7 years ago.

Status:Closed Start date:11/16/2010
Priority:High Due date:
Assignee:kervala % Done:

100%

Category:Services: General
Target version:Version 0.8.0

Description

EGS is crashing on client exit on Windows since the last official patch.

It could be related to the strange fame value that Sfb noticed some time ago.

2010/11/16 17:10:36 INF  a94 192.168.56.1/EGS-131 entities_game_service.cpp 1926 CPlayerService::onAiInstanceReady :  AI Instance 20 is up
2010/11/16 17:38:38 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:38:39 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:38:42 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:38:42 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:38:42 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:38:42 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:38:42 WRN  a94 192.168.56.1/EGS-131 fame_manager.cpp 1050 CFameManager::getFameIndexed : FAME: entity (0x0000000010:00:00:87) doesn't exist in fame owners containers!
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:00 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:01 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:01 WRN  a94 192.168.56.1/EGS-131 utils.h 796 checkedCast : checkedCast : Value 600.000000 exceed the positive capacity of signed char clamping at max value
2010/11/16 17:39:02 INF  a94 192.168.56.1/EGS-131 entity_callbacks.cpp 660 finalizeClientReady : Updating IS_NEWBIE flag for character: (0x0000000010:00:00:87)

History

#1 Updated by kervala almost 8 years ago

It seems like this bug was always there. I didn't find any "600" in sheets or code or .cfg, so where is it defined ? :)

#2 Updated by molator almost 8 years ago

I searched, but didn't find it.

#3 Updated by molator almost 8 years ago

Sfb found a way to remove those warnings but EGS still crashs.
As sm3 tested sometime ago, building the server with FINAL_VERSION checked stabilizes EGS.
It doesn't solve the issue but hides it.

#4 Updated by kervala almost 8 years ago

This assert occurs in void CCharacter::setFameValuePlayer(uint32 factionIndex, sint32 playerFame, sint32 fameMax, uint16 fameTrend) from EGS.

FameAbsoluteMax is defined in entities_game_service_default.cfg and is set to 100000.

This code is used to compute the fame to display in some interfaces (fame / 100):

sint8 percent = checkedCast<sint8>(float(playerFame)/FameAbsoluteMax*100)

becomes

FameAbsoluteMax = 100000
playerFame = 600000
percent = 600 // assert

So we just need to check where is defined the 600000 for player fame :)

#5 Updated by kervala almost 8 years ago

  • Category set to Services: General
  • Status changed from New to Assigned
  • Assignee set to kervala
  • Priority changed from Normal to High

Found it :)

In egs_variables.h line 22, there is a :

// This is the amount to multiply fame values by to get the internally stored values.
//  We store the internal values at a higher multiple so we can have higher precision when
//  adding or removing fame from a player.
#define kFameMultipler 6000

We could change this value to 1000 to fix the bug, but it would break the compatibility with official servers, so we need to put back the values / 600 in .cfg

#6 Updated by kervala almost 8 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset r1140.

#7 Updated by kervala almost 8 years ago

  • Target version set to Version 0.8.0

#8 Updated by kervala almost 8 years ago

Please someone could retry with new .cfg ? Thanks :)

#9 Updated by kervala over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF