SendCharacterOverview crashes client

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

SendCharacterOverview crashes client

Postby sooid » Tue Apr 05, 2011 9:13 pm

Using the latest revision, IPacketLib.SendCharacterOverview crashes my client when I create a disabled race. The message I get is "An error has occured and you were unable to connect.". Can anyone else confirm this or help out? Tried it with several clients so it's probably not a client-side issue.

sooid
User avatar
sooid
DOL Follower
 
Posts: 454
Joined: Wed Nov 28, 2007 8:44 am

Re: SendCharacterOverview crashes client

Postby Tolakram » Tue Apr 05, 2011 9:44 pm

What does the server do when you try and create a disabled race or class? It should just return to the character page ... but this thing is the client doesn't really support disabled races or classes and expects the character creation to always succeed. Not sure there is anything worthwhile that can or should be done.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: SendCharacterOverview crashes client

Postby sooid » Tue Apr 05, 2011 10:19 pm

What does the server do when you try and create a disabled race or class? It should just return to the character page ...
Of course it should but it simply doesn't.
Here's what the log says:
Code: Select all
22:55:29,784 - [9] - DEBUG - DOL.GS.PacketHandler.Client.v168.CharacterCreateRequestHandler - CharacterCreateRequestHandler for account player-S using version Version1103
22:55:29,811 - [9] - DEBUG - DOL.GS.PacketHandler.Client.v168.CharacterCreateRequestHandler - Disable Config Button
22:55:29,814 - [9] - DEBUG - DOL.GS.PacketHandler.Client.v168.CharacterCreateRequestHandler - Creation Version1103 character, class:8, realm:1
22:55:29,821 - [9] - DEBUG - DOL.GS.PacketHandler.Client.v168.CharacterCreateRequestHandler - Client player tried to create a disabled race: Avalonian
22:55:29,830 - [9] - INFO - DOL.GS.GameClient - (127.0.0.1:54264) player just disconnected!
Would be surprised to see that it's just me as this is the latest revision and I didn't change anything.
User avatar
sooid
DOL Follower
 
Posts: 454
Joined: Wed Nov 28, 2007 8:44 am

Re: SendCharacterOverview crashes client

Postby Tolakram » Tue Apr 05, 2011 10:35 pm

I don't see the crash.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: SendCharacterOverview crashes client

Postby sooid » Tue Apr 05, 2011 11:03 pm

I'm kinda confused now. The client crashes, the server obviously doesn't. It just disconnects and says "An error has occured and you were unable to connect.".
User avatar
sooid
DOL Follower
 
Posts: 454
Joined: Wed Nov 28, 2007 8:44 am

Re: SendCharacterOverview crashes client

Postby geshi » Tue Apr 05, 2011 11:20 pm

This has been a problem for at least 2 months now, making a disabled race/class just crashes the client.
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: SendCharacterOverview crashes client

Postby sooid » Thu Apr 07, 2011 6:40 pm

Been able to track it down to the packet processor, int sent = client.Socket.EndSend(ar); throws an ObjectDisposedException. But that's about as far as I got, no idea where to go from here.
User avatar
sooid
DOL Follower
 
Posts: 454
Joined: Wed Nov 28, 2007 8:44 am

Re: SendCharacterOverview crashes client

Postby Dunnerholl » Sat Apr 09, 2011 5:04 am

try using the logger tool and check what is sent to client after trying to create this illegal combination, then compare this packet thats causing the crash to one where everything is fine.
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: SendCharacterOverview crashes client

Postby sooid » Sat Apr 09, 2011 12:13 pm

I did that and it might be in 0x10 CharacterSelectRequest. While the crashing client receives FF -> AC -> 10 and then A3s without any replies (disconnect), the normal client receives FF -> AC -> 10 -> FD and so on. So maybe the client tries to select a character that was not created. But again, I don't know where to go from here or what to do as I never dealt with packets.
User avatar
sooid
DOL Follower
 
Posts: 454
Joined: Wed Nov 28, 2007 8:44 am

Re: SendCharacterOverview crashes client

Postby Tolakram » Sat Apr 09, 2011 1:29 pm

if (occurences > 0 && (ePrivLevel)client.Account.PrivLevel == ePrivLevel.Player)
{
log.Debug("Client " + client.Account.Name + " tried to create a disabled race: " + (eRace)ch.Race);
client.Out.SendCharacterOverview((eRealm)ch.Realm);
return;
}


In CharacterCreateRequestHandler remove the line above in red and try it.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: SendCharacterOverview crashes client

Postby sooid » Sat Apr 09, 2011 3:03 pm

Tried that before and it didn't change anything.
User avatar
sooid
DOL Follower
 
Posts: 454
Joined: Wed Nov 28, 2007 8:44 am

Re: SendCharacterOverview crashes client

Postby Tolakram » Sat Apr 09, 2011 4:06 pm

Then I am guessing it has to do with the new character support they added with 1.100 or sometime around then. It can;t handle the fact that a character creation failed so the client crashes.

The last thing I would do is log what happens when you go to create a character and then cancel creation on the client. This is what we want to simulate when a disabled char is created.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: SendCharacterOverview crashes client

Postby Snooops » Tue Nov 22, 2011 2:06 am

Well at this moment the code sucks ;) but im new to C# and dont know yet how i can get data from the mysql database with that objects (omg so maaaaany objects :P)
But i dont wanted to have the minotaurs so i removed the block for them :P

Later i will post the change with doing this dynamic via mysql

File: GameServer\packets\Client\168\CharacterCreateRequestHandler.cs - Line ~500
Code: Select all

// change by snooops - to avoid client crashes with serverproperty disabled_races and disabled_classes
// TODO: get the values from the table - serverproperty
if (ch.Race != 20 && ch.Race != 19 && ch.Race != 21)
{
//Save the character in the database
GameServer.Database.AddObject(ch);
//Fire the character creation event
GameEventMgr.Notify(DatabaseEvent.CharacterCreated, null, new CharacterEventArgs(ch, client));
//add equipment
StartupEquipment.AddEquipment(ch);
//write changes
GameServer.Database.SaveObject(ch);
}

greetings
Snooops
Snooops
DOL Guest
 
Posts: 3
Joined: Thu Jun 24, 2010 9:22 am


Return to “%s” Support

Who is online

Users browsing this forum: Bing [Bot] and 1 guest