Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Emot

Pages: [1]
1
Network / Re: Possible Memory Leak SocketSelector
« on: February 23, 2016, 02:35:58 pm »
Well that solves the problem then.

Thanks for the help.  :)

2
Network / Re: Possible Memory Leak SocketSelector
« on: February 23, 2016, 11:45:18 am »
How do you close the application?

I'm closing it with the "Close - X" button. I've also tried with "Stop Debugging" and that gives me no error (Do you know the difference between them?). Is there a right or wrong way?

Is vld.h part of the Visual Leak Detector?

This is the file which you have to include in order for it to work.

Try including it before SFML/Network.hpp

I tried it and it was the same output.



If I remove the while-loop the application gets executed with no leak detection, which leads me to think that if I run the application with the while-loop and close the application the program never finishes and therefore never removes the SocketSelector variable. Might this be a correct assumption? If so how should I handle the closing of the application?

3
Network / Possible Memory Leak SocketSelector
« on: February 22, 2016, 09:54:07 pm »
Hello,

I'm not totally sure if this is the right place to post this but it seemd like the most relevant topic for my questions.

I've recently downloaded the Visual Leak Detector (https://vld.codeplex.com/) too hopefully help me solve some leaks that might or might not appear when making applications.

When I was solving my own misstakes there was one that I could not get rid of and it was taking place when I was using the "SocketSelector".

Below is the least code possible for main.cpp
#include <SFML\Network.hpp>
#include <vld.h>

int main()
{
        sf::SocketSelector selector;

        while (true)
        {
        }

        return 0;
}
 

When I close the application I get the output:
'Network.exe' (Win32): Loaded 'E:\Projekt\Network\Debug\Network.exe'. Symbols loaded.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110d.dll'. Symbols loaded.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.
'Network.exe' (Win32): Loaded 'C:\Program Files (x86)\Visual Leak Detector\bin\Win32\vld_x86.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Program Files (x86)\Visual Leak Detector\bin\Win32\dbghelp.dll'. Cannot find or open the PDB file.
'Network.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
Visual Leak Detector read settings from: C:\Program Files (x86)\Visual Leak Detector\vld.ini
Visual Leak Detector Version 2.5 installed.
The thread 0x19d0 has exited with code -1073741510 (0xc000013a).
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1 at 0x004444B8: 528 bytes ----------
  Leak Hash: 0x02472228, Count: 1, Total 528 bytes
  Call Stack (TID 6608):
    MSVCR110D.dll!operator new()
    Network.exe!sf::SocketSelector::SocketSelector() + 0x21 bytes
    e:\projekt\network\main.cpp (8): Network.exe!main()
    f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (536): Network.exe!__tmainCRTStartup() + 0x19 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (377): Network.exe!mainCRTStartup()
    kernel32.dll!BaseThreadInitThunk() + 0x12 bytes
    ntdll.dll!RtlInitializeExceptionChain() + 0x63 bytes
    ntdll.dll!RtlInitializeExceptionChain() + 0x36 bytes
  Data:
    00 00 00 00    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........
    CD CD CD CD    CD CD CD CD    CD CD CD CD    CD CD CD CD     ........ ........


Visual Leak Detector detected 1 memory leak (564 bytes).
Largest number used: 564 bytes.
Total allocations: 564 bytes.
Visual Leak Detector is now exiting.
The program '[8560] Network.exe' has exited with code -1073741510 (0xc000013a).

 

I'm using SFML 2.3.2 (Was the same with 2.1) on Windows 7, 32-bit.

I also tested the example in the documentation for the SocketSelector and it gave me the same output (with 2 additional ones).

1. Is this something that I should just ignore?
2. Is there something wrong with the SocketSelector?
3. Am I doing something wrong?

Pages: [1]
anything