Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3026

64bit program never returns from a method?

$
0
0
Code:

'pinter.exe' (Win32): Loaded 'D:\Projects\C++\pinter2\x64\Debug\pinter.exe'. Symbols loaded.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\d3d9.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\d3d8thk.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\D3DX9_43.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'D:\Projects\C++\pinter2\x64\Debug\sqlite3.dll'. Module was built without symbols.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\msvcp120d.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\msvcr120d.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\W7FBC\dll.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_2b24536c71ed437a\GdiPlus.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file.
'pinter.exe' (Win32): Loaded 'C:\Windows\System32\igdumd64.dll'. Cannot find or open the PDB file.
The thread 0x19c8 has exited with code 0 (0x0).
The thread 0x1e94 has exited with code 0 (0x0).
The thread 0x14d4 has exited with code 0 (0x0).
The program '[7992] pinter.exe' has exited with code 0 (0x0).

Nothing suspicious, I just create a pointer of object within that method, and return that pointer
from the method. No visual leak detector used whatsoever, "Depends" works on the exe.
The method was entered and hang in there for a long time and I had to stop it by force.
Any possibilities why this would happen?

Update:
I find out this thing didn't clean up properly
Code:

#ifndef TIMEASTAROPENCLOSEDMAP_H_
#define TIMEASTAROPENCLOSEDMAP_H_

#include <vector>
#include "TimeAStarNode.h"


template<typename T>
class TimeAStarOpenCloseMap {
public:
        TimeAStarOpenCloseMap<T>() : TimeAStarOpenCloseMap<T>(262144) {
               
        }

        TimeAStarOpenCloseMap<T>(int size)
        {       
                Count = 0;
                m_Map.clear();
                m_Map.resize(size);
                for (int i = 0; i < m_Map.size(); i++) {
                        m_Map[i].resize(65);
                }
               
               
        }
       

        bool IsEmpty()
        {
                return Count == 0;
        }

        void Add(T* inValue)
        {
                if (inValue->m_time_dependent_id >= m_Map.size()) {
                        m_Map.resize(m_Map.size() + 10000);
                }

                T* item = m_Map[inValue->m_time_dependent_id][inValue->dirStartEnd];
                Count++;
                m_Map[inValue->m_time_dependent_id][inValue->dirStartEnd] = inValue;
        }


       
        bool Contains(const T* inValue)
        {
                T* item = m_Map[inValue->m_time_dependent_id][inValue->dirStartEnd];
                if (item == NULL)
                        return false;
                return true;
        }

        void Remove(const T* inValue)
        {
                T* item = m_Map[inValue->m_time_dependent_id][inValue->dirStartEnd];
                Count--;
                m_Map[inValue->m_time_dependent_id][inValue->dirStartEnd] = NULL;
        }

        void Clear()
        {

                for (int x = 0; x < Count; x++)
                {
                        for (int y = 0; y < 64; y++) {
                                m_Map[x][y] = NULL;
                        }
                }

                Count = 0;
        }

public:
        int Count;
private:
        std::vector<std::vector<T*>> m_Map;
};
#endif // TIMEASTAROPENCLOSEDMAP_H_

Why is it so slow?

Thanks
Jack

Viewing all articles
Browse latest Browse all 3026

Trending Articles