Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Winsock Issue?
#1
Randomly, not when it logs in a player, or logs out a player, my entire Server.EXE freezes, and CPU usage spikes to 100% for about 10 seconds, after which it processes it fine.


I don't understand why though, I didn't edit anything having to do with the socket connections or anything.


Can it be an issue with my computer?

It just started like 15 minutes ago, the last change I can think of was adding a Long Value to the account rec.

Note, it doesn't hang when pinging the server, like for a server online check/script on the menu or anything. Only when you log in.

I tried breakpoints in various places, but my IDE freezes up too.
Reply
#2
It's not randomly, it's when it saves something.

Measure how long it is between pauses and then compare it to the timer that controls the ingame player-saving.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#3
There's no saving going on.

I tested it with a ping, and it still freezes my VB.exe
One thing it does when it freezes, if it helps is output this:

Code:
Recieved Connection from 127.0.0.1
'Blank line?
Connection from 127.0.0.1 has been Terminated.
Reply
#4
If I use breaks, it works fine.

My first thought was that I was stuck in a loop, but it's only with the Winsock parts of code.
Like if I were to call load player/saveplayer it's fine, but if I connect or close a connection, my server.exe locks up.
Reply
#5
I can make a blank project and connect, and it freezes.

It's not lagging, It literally freezes the EXE or IDE, as in if I click on VB6, or compiled, on the server, I get a "Program is not responding"


EDIT:


I toggled breaks on every line in the "login" packet.
It never reaches the first line of code until after the EXE unfreezes.

After the EXE responds again, it THEN hits
Code:
If Not IsPlaying(Index) And Not IsLoggedIn(Index) Then

But not before.


So I'm setting a break on the call to handledata.
And.. nothing, handledata isn't called till after the freeze.


Next break is on the call for Incoming Data, in the Sub..
Socket_DataArrival

Yeah...


Private Sub Socket_DataArrival(Index As Integer, ByVal bytesTotal As Long)

Isn't called till after the freeze.
Then everything runs just fine.

I don't know where to look next, there's nothing higher than that is there?



EDIT2:

In fact, neither..
Socket_ConnectionRequest

Or

Socket_Accept

Are called till after the Server.exe unfreezes.
I really don't know what to do..

>.
Reply
#6
Ask someone else to run the server on their PC, just give them the exe and a test map or something, could be your ISP being a packet sniffing waste of space >_>;

EDIT: Unless your normal and doing it locally, nvm ~.~ (Used to running the server on a host machine).

EDIT2: Something stupid like Norton suddenly deciding to triple check pings for nasties?
Reply
#7
A vanilla MSE works fine.

I have no security software that runs in the background.
And I do run it locally.

=/
Reply
#8
Fixed.

Had to reset Winsock settings in Command Prompt.
Googled around, found out it's common I guess.

Something about the settings being corrupted during debugging.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)