| Mirage Source http://web.miragesource.net/forums/ |
|
| Winsock Issue? http://web.miragesource.net/forums/viewtopic.php?f=201&t=3518 |
Page 1 of 1 |
| Author: | Rezeyu [ Mon Mar 24, 2008 5:08 am ] |
| Post subject: | Winsock Issue? |
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. |
|
| Author: | Robin [ Mon Mar 24, 2008 10:35 am ] |
| Post subject: | Re: Winsock Issue? |
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. |
|
| Author: | Rezeyu [ Mon Mar 24, 2008 1:07 pm ] |
| Post subject: | Re: Winsock Issue? |
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. |
|
| Author: | Asrrin29 [ Mon Mar 24, 2008 3:12 pm ] |
| Post subject: | Re: Winsock Issue? |
Put a Stop in the code for handling logging in server side, and just run line-by-line until you find where the hang up is. it might be trying to compute a large unnecessary loop, for instance. |
|
| Author: | Rezeyu [ Mon Mar 24, 2008 11:59 pm ] |
| Post subject: | Re: Winsock Issue? |
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. |
|
| Author: | Asrrin29 [ Tue Mar 25, 2008 12:37 am ] |
| Post subject: | Re: Winsock Issue? |
Is your client maybe stuck in a loop or something and spamming the server with packets? |
|
| Author: | Rezeyu [ Tue Mar 25, 2008 1:05 am ] |
| Post subject: | Re: Winsock Issue? |
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.. >.< |
|
| Author: | Coke [ Tue Mar 25, 2008 2:21 am ] |
| Post subject: | Re: Winsock Issue? |
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? |
|
| Author: | Rezeyu [ Tue Mar 25, 2008 3:07 am ] |
| Post subject: | Re: Winsock Issue? |
A vanilla MSE works fine. I have no security software that runs in the background. And I do run it locally. =/ |
|
| Author: | Asrrin29 [ Tue Mar 25, 2008 3:28 am ] |
| Post subject: | Re: Winsock Issue? |
I'm stumped. maybe the control got flubbed up? try deleting the socket and remake it or copy it from a vanilla MSE. Backup of course though. |
|
| Author: | Rezeyu [ Tue Mar 25, 2008 7:12 am ] |
| Post subject: | Re: Winsock Issue? |
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. |
|
| Author: | Asrrin29 [ Tue Mar 25, 2008 12:22 pm ] |
| Post subject: | Re: Winsock Issue? |
Very good, that was the line of reasoning I was using with my last suggestion, just never had it happen to me. glad you fixed it. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|