0

I'm using visual studios 2008 under QT 4.8.1 and QT library 4.8.6. For debug i use the microsoft tool CDB delivered with Visual Studios 2008.

When running my program in release (ctrl + R) everything is good. When I try to lunch debugging ( F5 ) the programm stops before starting debug at an assembly code .

0x77cc0f6f  <+ 3866>         jne     ntdll!LdrVerifyImageMatchesChecksum+0xf33 (77cc0f88)
0x77cc0f71  <+ 3868>         mov     dword ptr [ebp-4],ebx
0x77cc0f74  <+ 3871>         int     3
0x77cc0f75  <+ 3872>         mov     dword ptr [ebp-4],esi     <<<(Stops here)
0x77cc0f78  <+ 3875>         jmp     ntdll!LdrVerifyImageMatchesChecksum+0xf33 (77cc0f88)
0x77cc0f7a  <+ 3877>         xor     eax,eax
0x77cc0f7c  <+ 3879>         inc     eax
0x77cc0f7d  <+ 3880>         ret
0x77cc0f7e  <+ 3881>         mov     esp,dword ptr [ebp-18h]
0x77cc0f81  <+ 3884>         mov     dword ptr [ebp-4],0FFFFFFFEh
0x77cc0f88  <+ 3891>         call    ntdll!memcpy+0xbc61 (77c4dfc1)
genpfault
  • 51,148
  • 11
  • 85
  • 139
Frimus
  • 23
  • 4
  • I am afraid we need a minimal code example to see what might have gone wrong. This is not a problem with your debugger, but in your code. – nada Jun 03 '19 at 13:53
  • @nada i think that it is not a code probleme because i don't have any warrning or error whene compiling or whene running in release, also whene i lunch in debbug mode it dons't evene reach the first line in main file. – Frimus Jun 03 '19 at 13:57
  • In C++ & Release mode you might invoke UB when for example accessing arrays out of bounds or memcpying unitialized stuff. Debug mode checks these things for you. Release mode does not, just *seems* to execute fine, but really doesn't. So, there is most definetely something wrong with your code and I urge you to give a relevant example, if you want our help. – nada Jun 03 '19 at 13:59
  • To summarize: 1) Only some coding mistake are caught by your compiler. 2) C++ does also very little runtime checking for coding mistakes. Mistakes in C++ will manifest as *undefined behavior* and crashes – nada Jun 03 '19 at 14:02
  • My project have more thene 50 000 files with dependencies to around 10 other projects. i m just trying to do units tests. what would be helpfull for you as an example? main file ? – Frimus Jun 03 '19 at 14:03
  • @nada what i found so weard is that the probleme happend with out any code changes ! also this is the firs time that it stops befor evene the first line in main fuction ! – Frimus Jun 03 '19 at 14:06
  • You should try building with debugging symbols activated to give your debugger a chance, so it might give you a specific file or line, where the problem occurs. – nada Jun 03 '19 at 14:07
  • @nada what do you mean by with debugging symbols activated ? how can i do it ? – Frimus Jun 03 '19 at 14:09
  • I don't know. Sorry I am on linux. – nada Jun 03 '19 at 14:10
  • @nada after doing a small search what you call "building with debugging symbols" is exactely what i do BUT ! symbols are only present in code you edit i.e in libraries and windows fils you don t have symbols wich confirms that the error occurs befor getting in the code ( my code ); – Frimus Jun 03 '19 at 14:20
  • It *is* possible that the fault is with Qt or whatever libraries you use. But please consider also the possibility, that the way you call those library functions inside your code or *what* you pass to them might be the problem. With absolutely no lines of code I have absolutely no idea how else to help, sorry. **It might** also be a completely different problem, like maybe you need to link debug specific versions of those libraries, when debugging. I really don't know better, sorry. – nada Jun 03 '19 at 14:25
  • I did some [duckduckgoing](https://duckduckgo.com/?t=palemoon&q=LdrVerifyImageMatchesChecksum&ia=web) and it seems your problem might be, that you have to use the 32bit CDB for 32bit builds and 64bit CDB for 64bit builds. I found that [here](https://sourceforge.net/p/codeblocks/tickets/429/), after searching for `LdrVerifyImageMatchesChecksum`. – nada Jun 03 '19 at 14:30
  • Also make sure that all the library (dll I guess) versions match 32bit or 64bit. – nada Jun 03 '19 at 14:32
  • Have you looked at this: https://stackoverflow.com/questions/2907929/how-to-solve-this-error-that-is-shown-on-windbg – mevets Jun 03 '19 at 15:54

1 Answers1

0

I resolved the problem simply by deleting all brakpoints! The CDB was blocked when calling ntdll.dll (windows dell). No symbols in windows DLL that is why the CDB blocked in assembly line.

Hope that will be usful for somone ! Good luck to all!

Frimus
  • 23
  • 4