Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

[SFML 2.0]Program działa poprawnie tylko w trybie debug

Ostatnio zmodyfikowano 2013-08-08 11:48
Autor Wiadomość
rafixxx25
Temat założony przez niniejszego użytkownika
[SFML 2.0]Program działa poprawnie tylko w trybie debug
» 2013-08-06 14:06:49
Witam!

W Visual Studio 2010 Express w trybie Debug wszystko działa dobrze - program nie zawiesza itd. Spróbowałem w Visualu "Start without Debugging" i podczas niektórych czynności program zawiesza się. Ogólnie odpalając program z .exe Release występuje ten problem, a w wersji .exe Debug nie ma żadnych problemów.
W trybie Debug wyskakują takie wyniki:

'gra_kurs.exe': Loaded 'C:\Users\Rafal\Documents\C++ programowanie\gra_kurs\Release\gra_kurs.exe', Symbols loaded.
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Users\Rafal\Documents\C++ programowanie\gra_kurs\Release\sfml-graphics-2.dll', Binary was not built with debug information.
'gra_kurs.exe': Loaded 'C:\Users\Rafal\Documents\C++ programowanie\gra_kurs\Release\sfml-window-2.dll', Binary was not built with debug information.
'gra_kurs.exe': Loaded 'C:\Users\Rafal\Documents\C++ programowanie\gra_kurs\Release\sfml-system-2.dll', Binary was not built with debug information.
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\atiglpxx.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\atioglxx.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\atiadlxy.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\wtsapi32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
'gra_kurs.exe': Unloaded 'C:\Windows\SysWOW64\atigktxx.dll'
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\hid.dll', Cannot find or open the PDB file
'gra_kurs.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x155c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xb6c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x13cc) has exited with code 0 (0x0).
The program '[3764] gra_kurs.exe: Native' has exited with code 0 (0x0).

Ogólnie program nie wywala żadnych błędów w trybie Debug i nie wiem za bardzo jak można sprawdzić, co nie działa.
Czy coś w tym logu jest nie tak?
Do folderu z samodzielnym .exe(Release) wrzucam .dll dla wersji Release - wtedy są błędy. Kompilując .exe(Debug) i wrzucając z nim odpowiednie biblioteki (np: sfml-graphics-d-2) wszystko działa dobrze.
Niezbyt się na tym znam: czym różnią się te wersje? Dlaczego Release działa błędnie?

Pozdrawiam
P-89591
domin568
» 2013-08-06 14:20:01
No bo najpierw musisz te biblioteki zliknować (tzn. klikasz na projekt , prawy , ustawienia Linker/Input i dodajesz nazwy tych bilbiotek , cóż z tego że skopiujesz te biblioteki jak ich nie zlinkujesz ?
P-89594
rafixxx25
Temat założony przez niniejszego użytkownika
» 2013-08-06 14:25:19
Źle mnie zrozumiałeś :P
Wszystko jest zalinkowane i dla wersji Release(sfml-graphics.lib itd.) i dla wersji Debug(sfml-graphics-d.lib) w Visualu. Raczej jest dobrze, bo robiłem to według kursu.

Już po skompilowaniu kopiuję sobie dllki oraz .exe do osobnego folderu(taka wersja "gotowa"), ale zarówno w tej samodzielnej wersji, jak i odpalając w Visualu w trybie Debug działa wszystko, a w Release nie.
P-89596
MrPoxipol
» 2013-08-06 14:27:02
Masz poprawną kolejność bibliotek?
P-89597
rafixxx25
Temat założony przez niniejszego użytkownika
» 2013-08-06 14:31:42
Nie za bardzo wiem co masz na myśli z tą kolejnością, ale w ustawieniach linkera:
Release:

sfml-audio.lib
sfml-graphics.lib
sfml-main.lib
sfml-network.lib
sfml-system.lib
sfml-window.lib
Debug:

sfml-audio-d.lib
sfml-graphics-d.lib
sfml-main-d.lib
sfml-network-d.lib
sfml-system-d.lib
sfml-window-d.lib

Odpalając w trybie Debug w Visual Studio czasami po zamknięciu programu wyskakuje błąd:

Critical error detected c0000374
Windows has triggered a breakpoint in gra_kurs.exe.

This may be due to a corruption of the heap, which indicates a bug in gra_kurs.exe or any of the DLLs it has loaded.
Prócz tego program działa normalnie.
P-89601
domin568
» 2013-08-07 13:42:39
Ściągnij jeszcze raz dllki , bo coś tam pisze o "bugach biblioteki"
P-89679
pekfos
» 2013-08-07 13:46:20
bo coś tam pisze o "bugach biblioteki"
lub programu, co jest bardziej prawdopodobne.
P-89680
rafixxx25
Temat założony przez niniejszego użytkownika
» 2013-08-07 15:41:00
No właśnie. Prawdopodobne, że programie jest jakiś błąd, ale dlaczego ujawnia się on tylko w trybie Release?
Jaka jest różnica w działaniu trybu Debug i Release? Być może pozwoli ona zlokalizować kategorię błędu.
P-89690
« 1 » 2
  Strona 1 z 2 Następna strona