NO

Author Topic: Debugger very very slow  (Read 3638 times)

Grincheux

  • Guest
Debugger very very slow
« on: March 21, 2012, 12:43:19 PM »
I use W7 and Pelles C 6.00.4 (Win64)

Here is the debugger trace

Code: [Select]
Process 12C0 started
Thread 12E0 started
Loading Win64.exe at 0000000140000000
Loading ntdll.dll at 0000000077730000
Loading KERNEL32.dll at 0000000077610000
Loading KERNELBASE.dll at 000007FEFDC60000
Loading USER32.dll at 0000000077510000
Loading GDI32.dll at 000007FEFEE50000
Loading LPK.dll at 000007FEFEF70000
Loading USP10.dll at 000007FEFF400000
Loading msvcrt.dll at 000007FEFF9A0000
Loading COMDLG32.dll at 000007FEFEEC0000
Loading SHLWAPI.dll at 000007FEFF380000
Loading COMCTL32.dll at 000007FEFA560000
Loading ADVAPI32.dll at 000007FEFDF60000
Loading SECHOST.dll at 000007FEFEF80000
Loading RPCRT4.dll at 000007FEFF4D0000
Loading SHELL32.dll at 000007FEFE0C0000
Loading libgfl340.dll at 0000000180000000
Module relocated to 00000000002E0000 from 0000000180000000
Loading libgfle340.dll at 00000000002E0000
Loading IMM32.dll at 000007FEFF860000
Loading MSCTF.dll at 000007FEFF890000
Loading UxTheme.dll at 000007FEFC3E0000
Loading dwmapi.dll at 000007FEFB970000
Loading ole32.dll at 000007FEFF650000
Loading CRYPTBASE.dll at 000007FEFDAC0000
Loading OLEAUT32.dll at 000007FEFF2A0000

I am just waiting for it to load comctrl32.dll since 10 minutes !

Here is my code :

Code: [Select]
LPPICTURE Picture_Select(HPICTURE hPicture,HWND hWnd)
{
OPENFILENAMEW ofn ;
wchar_t szTmpFileName[MAX_PATH] ;

LPPICTURE lpPicture ;

if(hPicture)
{
lpPicture = (LPPICTURE) hPicture ;

ZeroMemory(&ofn,sizeof(ofn)) ;
ZeroMemory(szTmpFileName,sizeof(szTmpFileName)) ;

ofn.lStructSize = sizeof(ofn) ;
ofn.hwndOwner = hWnd ;
ofn.lpstrFilter = (wchar_t *) szPictureFileFilters ;
ofn.lpstrFile = szTmpFileName ;
ofn.nMaxFile = MAX_PATH ;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY ;

if(GetOpenFileNameW(&ofn))

I have a break point on GetOpenFileName.
I have no antivirus.

did some one meet the same problem ?

CommonTater

  • Guest
Re: Debugger very very slow
« Reply #1 on: March 21, 2012, 02:19:40 PM »
In my experience the GetOpenFilename() and GetSaveFilename() calls can be a bit finicky and will often just "not work" if you don't get the struct set up correctly.  (Although yours looks ok...)

Your listing indicates that comctl32.dll and comdlg32.dll are loaded.  There is no comctrl32.dll.

Does the code run outside the debugger?
What mistaken behaviour does it exhibit?

Does the code reach the breakpoint?
What happens when you tell it to step into the breakpoint?





Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2151
Re: Debugger very very slow
« Reply #2 on: March 21, 2012, 03:17:14 PM »
If you select Debug -> Break from menu and after that press F5, what happens ?
Is your program 32 or 64 bit ?
May the source be with you

Grincheux

  • Guest
Re: Debugger very very slow
« Reply #3 on: March 21, 2012, 05:26:53 PM »
The only wait to stop the program running into the debugger is to launch the task manager...
Outside the debugger the program runs normally, but it seems I have a bug, that is the reason why I needed to debug.
Sometimes the breakpoint is ignored.
In fact, this part of the code is part of a library (static lib) I made.
The code is in 64 bytes.
The main code was taken from MiniGdiPlus and there were no problem.
I wanted to add my own images functions and the libgfl library (used by xnview and photofiltre).

Grincheux

  • Guest
Re: Debugger very very slow
« Reply #4 on: March 21, 2012, 05:31:29 PM »
I removed the Pelles C compiler version 6.99.4 and downloaded the previous version, alway the same problem !

JohnF

  • Guest
Re: Debugger very very slow
« Reply #5 on: March 21, 2012, 08:17:16 PM »
It's not the version of PellesC, try this function, it works here when debugging.

Code: [Select]
int Picture_Select(HWND hWnd)
{
OPENFILENAMEW ofn ;
wchar_t szTmpFileName[MAX_PATH] ;
wchar_t  szPictureFileFilters[] = {L"TEXT Files\0*.txt\0\0"};

ZeroMemory(&ofn,sizeof(ofn)) ;
ZeroMemory(szTmpFileName,sizeof(szTmpFileName)) ;

ofn.lStructSize = sizeof(ofn) ;
ofn.hwndOwner = hWnd ;
ofn.lpstrFilter = (wchar_t *) szPictureFileFilters;
ofn.lpstrFile = szTmpFileName ;
ofn.nMaxFile = MAX_PATH ;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY ;

if(GetOpenFileNameW(&ofn))
return 1;
else
return 0;
}

John

Grincheux

  • Guest
Re: Debugger very very slow
« Reply #6 on: March 22, 2012, 06:57:30 AM »
I have moved the code from the static library to the main program and the problem is gone...

CommonTater

  • Guest
Re: Debugger very very slow
« Reply #7 on: March 22, 2012, 02:22:23 PM »
I have moved the code from the static library to the main program and the problem is gone...

Just out of curiosity... were you compilng the library with debugging symbols included?

Glad you got it working.