Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Guide] FIX JoinServer [RecvQ Count :XXXX] Error!

Newbie Spellweaver
Joined
Jul 1, 2013
Messages
13
Reaction score
2
Hi everybody.
Today to talk about FIX JoinServer [RecvQ Count: XXXX] Error!
Code:
    InitializeCriticalSection(&criti);


    GetSystemInfo(&SystemInfo);
    [COLOR=#ff0000]g_dwThreadCount = SystemInfo.dwNumberOfProcessors * 2;[/COLOR]
    
    __try  
    { 
        g_CompletionPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
        if ( g_CompletionPort == NULL)
        {
            LogAdd("CreateIoCompletionPort failed with error: %d", GetLastError());
            __leave;
        }
        
        for(DWORD dwCPU = 0; dwCPU < g_dwThreadCount; dwCPU++)
        {
            HANDLE ThreadHandle;
            // Create a server worker thread and pass the completion port to the thread.
            
            ThreadHandle = CreateThread(NULL, 0, ServerWorkerThread, g_CompletionPort, 0, &ThreadID);
            if ( ThreadHandle == NULL)
            {
                LogAdd("CreateThread() failed with error %d", GetLastError());
                __leave;
            }
            g_ThreadHandles[dwCPU] = ThreadHandle;
        }

g_dwThreadCount = SystemInfo.dwNumberOfProcessors * 2;

my cpu threadcount 12
g_dwThreadCount size:12 dword

my cpu threadcount *2 > g_dwThreadCount size:12 dword

Memory is covered


Code:
004077C6   .  68 98C0340D   PUSH    JoinServ.0D34C098                ; /pCriticalSection = JoinServ.0D34C098
004077CB   .  FF15 1CAD5A0D CALL    NEAR DWORD PTR DS:[<&KERNEL32.In>; \InitializeCriticalSection
004077D1   .  8D45 A0       LEA     EAX, DWORD PTR SS:[EBP-0x60]
004077D4   .  50            PUSH    EAX                              ; /pSystemInfo
004077D5   .  FF15 4CAD5A0D CALL    NEAR DWORD PTR DS:[<&KERNEL32.Ge>; \GetSystemInfo
004077DB   .  8B4D B4       MOV     ECX, DWORD PTR SS:[EBP-0x4C]
004077DE      D1E1          SHL     ECX, 1
004077E0   .  890D E4C0340D MOV     DWORD PTR DS:[0xD34C0E4], ECX
004077E6   .  C745 FC 00000>MOV     DWORD PTR SS:[EBP-0x4], 0x0
004077ED   .  6A 00         PUSH    0x0
004077EF   .  6A 00         PUSH    0x0
004077F1   .  6A 00         PUSH    0x0
004077F3   .  6A FF         PUSH    -0x1
004077F5   .  FF15 48AD5A0D CALL    NEAR DWORD PTR DS:[<&KERNEL32.Cr>;  kernel32.CreateIoCompletionPort

004077DE D1E1 SHL ECX, 1
change
004077DE 9090 nop nop

ok
save file! done.

try this:View attachment JoinServer.rar
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jun 1, 2012
Messages
9
Reaction score
0
I try this but again didn't work in 12 cpu when i stop 4 cores from msconfig he start without problem.
 
Back
Top