Register for your free account! | Forgot your password?

You last visited: Today at 15:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Weird crash

Discussion on Weird crash within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
Weird crash

Heya, maybe someone can help me out with this,

Currently version is 5095.

While you're playing the client just close without source error or any msg at screen, but into the debug client folder i get this:

Code:
Got a player with hero id! 1000000 -- Sat Dec 14 10:14:04 2013
Got a player with hero id! 11254550 -- Sat Dec 14 12:44:26 2013
Got a player with hero id! 1611455 -- Sat Dec 14 17:06:55 2013
the client just close, don't have a reason to.... when jumping, walking or even talking to an npc..... i did a packet log to check if was the crypto, but the packets get encrypted normally and all things normal.... maybe a client bug?

aaa... the "hero id" is the same id as my character in game....
12tails is offline  
Old 12/14/2013, 21:53   #2


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
It's normal to have those lines in the debug files. It just means that the client received the MsgUserInfo packet.

Check when you broadcast the message, if you correctly change the TQClient to TQServer
CptSky is offline  
Thanks
1 User
Old 12/14/2013, 22:04   #3
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
hmmm but i don't send any packet back to client, they're all written by the source, anyway... going to check ;S
12tails is offline  
Old 12/14/2013, 22:23   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
The client will crash if you pass it invalid data. This can be caused by a few things.


-Missing TQServer seal at specified packet length
-Packet sent is too large (1024 bytes iirc)
-Cryptography error
pro4never is offline  
Old 12/14/2013, 22:26   #5
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
Well, i guess the problem its the crypto ;S

TQSEAL is ok, packets are not larger than 100 bytes when it crashes....

tested some 3 different sorts of socket systems.... so the only thing left is crypto... ;S
12tails is offline  
Old 12/16/2013, 12:12   #6
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Are you locking the crypto when encrypting? It could be a race condition too, if using BeginSend.
Super Aids is offline  
Old 12/16/2013, 19:24   #7
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
Well, i use SendAsync (i'm using Async Sockets, i think it is safer than other ones) but.... no i'm not locking the encrypt method...... i'll do some tests... let's see what happens...

also.... could it be caused by client too??

@EDIT
Code:
Got a player with hero id! 1611455 -- Sat Dec 14 17:06:55 2013
this msg JUST come to the debug file when the client crash... i'm nearly giving up haha xD
12tails is offline  
Old 12/16/2013, 22:50   #8
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
You should lock the crypto until the packet is send.


Super Aids is offline  
Old 12/20/2013, 12:30   #9
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by Super Aids View Post
Are you locking the crypto when encrypting? It could be a race condition too, if using BeginSend.
Not necessarly. If you use begin send within a lock, the packet sequence will be kept.
PHP Code:
lock(cryptSyncRoot){ 
crypt.Encrypt(buffer);
socket.beginsend(buffer);

works just as well as
PHP Code:
lock(cryptSyncRoot){ 
crypt.Encrypt(buffer);
socket.send(buffer);

@talis: since you say you don't send packets with the length (written at offset 0) is not more than 1024 and the client CRASHES then I can think of one reason... you send to your client your entity spawn (a spawn entity with the same UID of your client).
And do lock the crypto + the sockets together until the send (/beginsend) is complete.
-impulse- is offline  
Old 12/22/2013, 01:47   #10
 
elite*gold: 0
Join Date: Jun 2013
Posts: 41
Received Thanks: 4
I was having this issue when I hadn't implemented the Entity spawn packet (Packet ID 102 in version 5017). Packet just sends spawn info for the requested UID.
FatalError- is offline  
Old 12/22/2013, 18:20   #11
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Quote:
Originally Posted by -impulse- View Post
Not necessarly. If you use begin send within a lock, the packet sequence will be kept.
PHP Code:
lock(cryptSyncRoot){ 
crypt.Encrypt(buffer);
socket.beginsend(buffer);

works just as well as
PHP Code:
lock(cryptSyncRoot){ 
crypt.Encrypt(buffer);
socket.send(buffer);

@talis: since you say you don't send packets with the length (written at offset 0) is not more than 1024 and the client CRASHES then I can think of one reason... you send to your client your entity spawn (a spawn entity with the same UID of your client).
And do lock the crypto + the sockets together until the send (/beginsend) is complete.
There is no order in which way asynchronous events are executed.

Let's say you send packet a and then packet b using BeginSend.

Then the asynchronous event for packet b may be executed before the asynchronous event for packet a.

You may want to look into this as well:


Also remember that Socket.Send() does not actually send the packets, it just copies the buffer into the kernel which then proceeds it or whatever.

Since .NET sockets are build upon the berkeley sockets, then this applies as well.

So saying that Send() and BeginSend() sends the packet is actually invalid.
Super Aids is offline  
Old 12/23/2013, 01:52   #12
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by Super Aids View Post
There is no order in which way asynchronous events are executed.

Let's say you send packet a and then packet b using BeginSend.

Then the asynchronous event for packet b may be executed before the asynchronous event for packet a.

You may want to look into this as well:


Also remember that Socket.Send() does not actually send the packets, it just copies the buffer into the kernel which then proceeds it or whatever.

Since .NET sockets are build upon the berkeley sockets, then this applies as well.

So saying that Send() and BeginSend() sends the packet is actually invalid.
I never said that Send or BeginSend 'effectively' send the packet.

I only said that
Quote:
If you use begin send within a lock, the packet sequence will be kept.
, which is true since .net's async functions for sockets are actually just a wrapper for the wsa functions. Here is the BeginSend function (click on DoBeginSend):

The question has been answered here: . (comment #2 to that answer)
-impulse- is offline  
Old 12/27/2013, 17:46   #13
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
thanks to all answers, basically the problem IS when the packet is encrypted.... so yeah, the lock was missing.... anyway.... it's just weird hehe... also i'm using SendAsync.... i guess it's more safe than BeginSend and Send in async sockets....

i was locking the sendasync only... the crypto was $#@#! up the whole thing :]

Now it's working fine .... xD
12tails is offline  
Reply


Similar Threads Similar Threads
Weird SRO Client crash.
05/29/2013 - SRO Private Server - 5 Replies
Hello. I've noticed that some of my players have the following problem : They start client, press start at launcher, game logo appears, black screen appears, music starts playing and before even game intro starts - client crashes. However, if they extract client again, they can play. Just after they close client and wanna launch it for the second time - same crap appears. Any ideas? I face this for the first time, I don't know what could it be.
Weird bug since global client crash
09/28/2012 - Rappelz Private Server - 0 Replies
since after the global client crash i got this error when trying to name (first doubleclick on looter icon in inv.) a looter: http://s14.postimage.org/osp4905ap/looters.jpg tried with different clients (old serenity client i'm using on my server and gala us client's files with PH sframe) and on different servers (experienced on my domestic server 1st time, then tried on legacy) as you cen see there is no 'OK' nor 'cancel button' and hitting enter doesn't help... there is no way to...
[Help] Weird Client Crash
06/14/2011 - CO2 Private Server - 0 Replies
I have a very weird client crash. when I use to log-in to the game (2-3 days ago) it worked fine but now that I got a new SQL imported into navicat the server loads fine but when I try to log-in the client just crashed on me. any ideas on this strange problem?



All times are GMT +2. The time now is 15:04.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.