[C++] (gelöst) Absturz vor main()

Programmiersprachen, APIs, Bibliotheken, Open Source Engines, Debugging, Quellcode Fehler und alles was mit praktischer Programmierung zu tun hat.
Antworten
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

[C++] (gelöst) Absturz vor main()

Beitrag von Krishty »

Lösung: Die Visual C++-Lösungsdatei war beschädigt. Wahrscheinlich sind dadurch ein paar Debugger-Einstellungen durcheinandergeraten und das hat wiederum zufällige Fehler in ntdll.dll ausgelöst. Die Lösung muss komplett neu eingerichtet werden.

Hi,

Seit ca. zwei Monaten stürzt meine Engine beim Laden ihrer Abhängigkeiten in ntdll.dll ab. Das ganze geschieht…
  • … sehr unregelmäßig – gefühlt bei jedem 30. Start in x86 und bei jedem 50. in x64.
  • … beim Laden unterschiedlicher Module (nicht immer beim selben – manchmal beim allerersten, manchmal bei einem der letzten, meist aber bei einem der ersten vier).
  • … bevor etwas von meinem Programm ausgeführt wird.
Weil das so extrem unregelmäßig, unberechenbar und selten passiert, kann ich nicht sagen, ob …
  • … das auch in anderen Projekten als meiner Engine passiert.
  • … das auch außerhalb des Debuggers passiert.
Ein paar meiner Vermutungen:
  • Ich übernehme statische Initialisierungen selber. Aber ich weiß nicht, ob die vor oder nach dem Laden der Abhängigkeiten ausgeführt werden und die Call Stacks der Aufrufe weisen keine Verbindung zu meinem Text auf. (Und es hat zuvor ein Jahr lang makellos funktioniert.)
  • Zuerst trat das Problem zur ähnlichen Zeit wie meine Aktualisierung auf VC 2010 SP1 Beta auf, ±zwei Wochen.
Bei den letzten drei Abstürzen dieser Woche (einmal beim Laden von ntdll.dll, zweimal beim Laden von msvcrt.dll) hatte ich zum Glück Debug-Symbole geladen:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
Unhandled exception at 0x77025503 (ntdll.dll) in C.exe: 0xC0000005: Access violation writing location 0x00000007fe5b6060.

	>	ntdll.dll!RtlpPopulateListIndex()  + 0x67e3 bytes	
 	ntdll.dll!RtlCreateHeap()  + 0x610 bytes	
 	ntdll.dll!LdrpInitializeProcess()  + 0x520 bytes	
 	ntdll.dll!string "Enabling heap debug options\n"()  - 0x3d7ad bytes	
 	ntdll.dll!LdrInitializeThunk()  + 0xe bytes

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\kernel32.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\user32.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\gdi32.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\lpk.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\usp10.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Symbols loaded (source information stripped).
Unhandled exception at 0x7777d809 (ntdll.dll) in C.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

>	ntdll.dll!LdrpHandleOneNewFormatImportDescriptor()  + 0x139 bytes	
 	ntdll.dll!LdrpHandleNewFormatImportDescriptors()  + 0xab bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x21a bytes	
 	ntdll.dll!LdrpLoadImportModule()  + 0x23c4 bytes	
 	ntdll.dll!LdrpHandleOneNewFormatImportDescriptor()  + 0x62 bytes	
 	ntdll.dll!LdrpHandleNewFormatImportDescriptors()  + 0xab bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x21a bytes	
 	ntdll.dll!LdrpLoadImportModule()  + 0x23c4 bytes	
 	ntdll.dll!LdrpHandleOneNewFormatImportDescriptor()  + 0x62 bytes	
 	ntdll.dll!LdrpHandleNewFormatImportDescriptors()  + 0xab bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x21a bytes	
 	ntdll.dll!LdrpLoadImportModule()  + 0x23c4 bytes	
 	ntdll.dll!LdrpHandleOneNewFormatImportDescriptor()  + 0x62 bytes	
 	ntdll.dll!LdrpHandleNewFormatImportDescriptors()  + 0xab bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x21a bytes	
 	ntdll.dll!LdrpLoadImportModule()  + 0x23c4 bytes	
 	ntdll.dll!LdrpHandleOneOldFormatImportDescriptor()  + 0x68 bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x1679 bytes	
 	ntdll.dll!LdrpInitializeProcess()  + 0xcc4 bytes	
 	ntdll.dll!string "Enabling heap debug options\n"()  - 0x3d7ad bytes	
 	ntdll.dll!LdrInitializeThunk()  + 0xe bytes

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\kernel32.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\user32.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\gdi32.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\lpk.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\usp10.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Symbols loaded (source information stripped).
Unhandled exception at 0x7777d809 (ntdll.dll) in C.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

	>	ntdll.dll!LdrpHandleOneNewFormatImportDescriptor()  + 0x139 bytes	
 	ntdll.dll!LdrpHandleNewFormatImportDescriptors()  + 0xab bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x21a bytes	
 	ntdll.dll!LdrpLoadImportModule()  + 0x23c4 bytes	
 	ntdll.dll!LdrpHandleOneOldFormatImportDescriptor()  + 0x68 bytes	
 	ntdll.dll!LdrpProcessStaticImports()  + 0x1679 bytes	
 	ntdll.dll!LdrpInitializeProcess()  + 0xcc4 bytes	
 	ntdll.dll!string "Enabling heap debug options\n"()  - 0x3d7ad bytes	
 	ntdll.dll!LdrInitializeThunk()  + 0xe bytes
Irgendwelche Ideen, was ich nun machen könnte ohne tagelang im Sekundentakt F5 zu drücken und zu hoffen, dass es kracht? Irgendwelche Vermutungen, woran es liegen könnte? Ich kenne mich mit dem Ladevorgang von PEs und dem NT-Kernel leider zu wenig aus um zu wissen, wo ich suchen soll …

Gruß, Ky
Zuletzt geändert von Krishty am 28.01.2011, 03:36, insgesamt 4-mal geändert.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4262
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: [C++] Absturz vor main()

Beitrag von Chromanoid »

Schon mal geschaut, ob was in der Windows Ereignisanzeige steht? Hast du deine exe auch mal im Release-Modus kompiliert und alle Debug-Geschichten weggelassen? Für mich hört sich das nach einem Memoryleak an ^^ vielleicht irgendwas, was ab und zu durch Debugsachen verschleiert wird.
Benutzeravatar
kimmi
Moderator
Beiträge: 1405
Registriert: 26.02.2009, 09:42
Echter Name: Kim Kulling
Wohnort: Luebeck
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von kimmi »

Du könntest die die Crashdumps mit WinDbg anschauen ( Option !analyze -v ) und sehen, ob da noch Infos drinn zu finden sind. Für mich sieht das nach einem undefinierten verhalten durch beispielsweise deine statischen Variablen aus. Allerdings kann ich da auch falsch liegen. Du könntest mal nach LdrInitializeThunk googlen, der in jedem deiner Callstacks auftritt.
Und du könnest das Ganze mittels AppVerifier mal durchtesten und alle auftretenden Exceptions, die der findet, lösen. Meistens kommt man so darauf. Und viel Erfolg, solche Fehler sind nervig! Oder starte alles in WinDbg.

Gruß Kimmi
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von Krishty »

Chromanoid hat geschrieben:Schon mal geschaut, ob was in der Windows Ereignisanzeige steht?
Da landen leider nur Abstürze ohne aktiven Debugger :/
Chromanoid hat geschrieben:Hast du deine exe auch mal im Release-Modus kompiliert und alle Debug-Geschichten weggelassen?
Kompilierung und Ausführung funktioniert mindestens genau so gut wie bei der Debug-Version. Leider habe ich die Release-Version nicht oft genug ausgeführt (und kann es mir atm auch nicht leisten), um zu sehen, ob sie auch sporadisch abstürzt und wenn ja, wie oft.
Chromanoid hat geschrieben:Für mich hört sich das nach einem Memoryleak an ^^
Für mich eher danach, als schaffe Windows es nicht, meinen Freispeicher zu initalisieren :/
kimmi hat geschrieben:Für mich sieht das nach einem undefinierten verhalten durch beispielsweise deine statischen Variablen aus.
Gerade geprüft – meine statischen Initialisierungen werden nach dem erfolgreichen Laden aller Module vorgenommen (es wurde also tatsächlich kein Byte meines Texts ausgeführt, wenn es kracht). Inwiefern das konform zur MSVCRT ist muss ich aber noch prüfen.
kimmi hat geschrieben:Und du könnest das Ganze mittels AppVerifier mal durchtesten und alle auftretenden Exceptions, die der findet, lösen.
Guuuuter Punkt! Den musste ich in den letzten Monaten leider deaktivieren, weil er inkompatibel zum HLSL-Compiler ist … aber bei drei Starts hat es direkt zweimal gekracht:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Cannot find or open the PDB file
Page heap: pid 0x10BC: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x10BC: flags 0x80E43267: application verifier enabled
AVRF: Spy [VerifierRegisterLayer, 153]: C
AVRF: Spy [VerifierRegisterBasicsLayers, 209]: C
AVRF: provider verifier.dll did not initialize correctly 
The program '[4284] C.exe: Native' has exited with code -1073741502 (0xc0000142).

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Cannot find or open the PDB file
Page heap: pid 0x7A4: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x7A4: flags 0x80E43027: application verifier enabled
'C.exe': Loaded 'C:\Windows\System32\vrfcore.dll', Cannot find or open the PDB file
Unhandled exception at 0x779bd3fa (ntdll.dll) in C.exe: 0xC0000005: Access violation writing location 0x00000000779bd316.

>	ntdll.dll!memcpy()  + 0x2ca bytes	
 	ntdll.dll!RtlAppendUnicodeStringToString()  + 0x53 bytes	
 	ntdll.dll!AVrfpLoadAndInitializeProvider()  + 0x8e bytes	
 	ntdll.dll!AVrfInitializeVerifier()  + 0x11b bytes	
 	ntdll.dll!LdrpInitializeProcess()  + 0x1a168 bytes	
 	ntdll.dll!string "Enabling heap debug options\n"()  - 0x3d7ad bytes	
 	ntdll.dll!LdrInitializeThunk()  + 0xe bytes	
Dann mal los!

Nachtrag: Wird immer interessanter … ich kriege bei jedem Start eine andere Fehlermeldung … Data Execution:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Cannot find or open the PDB file
Page heap: pid 0xBAC: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0xBAC: flags 0x80E43027: application verifier enabled


=======================================
VERIFIER STOP 0000000000000650: pid 0xBAC: Attempt to execute code in non-executable memory (first chance). 

	00000000001AE690 : Address being accessed.
	00000000001AE690 : Code performing invalid access.
	00000000001AE540 : Exception record. Use .exr to display it.
	00000000001AE050 : Context record. Use .cxr to display it.


=======================================
This verifier stop is not continuable. Process will be terminated 
when you use the `go' debugger command.

=======================================

'C.exe': Loaded 'C:\Windows\System32\vrfcore.dll', Cannot find or open the PDB file
AVRF: Noncontinuable verifier stop 0000000000000650 encountered. Terminating process ... 
The program '[2988] C.exe: Native' has exited with code -1073741823 (0xc0000001).
Heap Damage:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Cannot find or open the PDB file
Page heap: pid 0xFD0: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0xFD0: flags 0x80E43027: application verifier enabled


=======================================
VERIFIER STOP 000000000000000C: pid 0xFD0: Exception raised while verifying the heap block. 

	0000000001A71000 : Heap handle used in the call.
	0000000077A39D8B : Heap block involved in the operation.
	C483483824748B48 : Size of the heap block.
	00000000C0000005 : Reserved.


=======================================
This verifier stop is not continuable. Process will be terminated 
when you use the `go' debugger command.

=======================================

'C.exe': Loaded 'C:\Windows\System32\vrfcore.dll', Cannot find or open the PDB file
'C.exe': Loaded 'C:\Windows\System32\vfbasics.dll', Cannot find or open the PDB file
AVRF: Noncontinuable verifier stop 000000000000000C encountered. Terminating process ... 
The program '[4048] C.exe: Native' has exited with code -1073741823 (0xc0000001).
Null:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Cannot find or open the PDB file
Page heap: pid 0x890: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x890: flags 0x80E43027: application verifier enabled


=======================================
VERIFIER STOP 0000000000000013: pid 0x890: (null) 

	00000000C000003D : (null)
	000007FEE99C6DAE : (null)
	000000000015E240 : (null)
	000000000015DD50 : (null)


=======================================
This verifier stop is continuable.
After debugging it use `go' to continue.

=======================================

'C.exe': Loaded 'C:\Windows\System32\vrfcore.dll', Cannot find or open the PDB file
Unhandled exception at 0x000007fee99c6dae in C.exe: 0xC0000005: Access violation writing location 0x00000000c000003d.
Ich dumpe hier einfach mal weiterhin alle Fehlermeldungen und Call-Stacks, die sich so ergeben … ignoriert sie einfach.

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x86DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
Page heap: pid 0x104C: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x104C: flags 0x80E43027: application verifier enabled
Page heap: pid 0x104C: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x104C: flags 0x80E43027: application verifier enabled
'C.exe': Loaded 'C:\Windows\SysWOW64\verifier.dll', Cannot find or open the PDB file
Unhandled exception at 0x77b6ffda in C.exe: 0xC0000005: Access violation reading location 0xffffffff.
C:\Windows\SysWOW64\ntdll.dll: Symbols loaded (source information stripped).
C:\Windows\SysWOW64\verifier.dll: Symbols loaded (source information stripped).

>	ntdll.dll!_ZwProtectVirtualMemory@20()  + 0x12 bytes	
 	verifier.dll!_AVrfpDphGetActualSizeForAllocation@8()  + 0x13 bytes	
 	verifier.dll!_AVrfDebugPageHeapFree@12()  + 0x5a bytes	
 	ntdll.dll!_RtlDebugFreeHeap@12()  + 0x2f bytes	
 	ntdll.dll!@RtlpFreeHeap@16()  + 0x57ec3 bytes	
 	ntdll.dll!_RtlFreeHeap@12()  + 0x4c4d bytes	
 	ntdll.dll!_RtlQueryImageFileKeyOption@24()  + 0x2fddd bytes	
 	ntdll.dll!_RtlQueryImageFileExecutionOptions@28()  + 0x35 bytes	
 	verifier.dll!_AVrfpInitializeFaultInjectionSupport@4()  + 0x1d3 bytes	
 	verifier.dll!__DllMain@12()  + 0x3ee bytes	
 	verifier.dll!_DllMain@12()  + 0x2d bytes	
 	ntdll.dll!_LdrpCallInitRoutine@16()  + 0x14 bytes	
 	ntdll.dll!_AVrfpLoadAndInitializeProvider@4()  + 0x1cb bytes	
 	ntdll.dll!_AVrfInitializeVerifier@24()  + 0xd3 bytes	
 	ntdll.dll!_LdrpInitializeProcess@8()  + 0x3b51b bytes	
 	ntdll.dll!__LdrpInitialize@8()  + 0xbd1a bytes	
 	ntdll.dll!_LdrInitializeThunk@8()  + 0x10 bytes	
Der Release-Build stürzt auch ab, aber leider mit weniger Information:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x86S\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Symbols loaded (source information stripped).
Page heap: pid 0x2D4: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x2D4: flags 0x80E43027: application verifier enabled


===========================================================
VERIFIER STOP 0000000000000013: pid 0x2D4: first chance access violation for current stack trace 

	0000000077B6FBEE : Invalid address being accessed
	0000000077BF66A3 : Code performing invalid access
	000000000035F2F0 : Exception record. Use .exr to display it.
	000000000035EE00 : Context record. Use .cxr to display it.
===========================================================
This verifier stop is continuable. 
After debugging it use `go' to continue.
===========================================================

Unhandled exception at 0x77bf66a3 (ntdll.dll) in C.exe: 0xC0000005: Access violation writing location 0x77b6fbee.

>	ntdll.dll!_AvrfMiniLoadDll@20()  + 0x2d0 bytes	
 	3bb80008()	
Zuletzt geändert von Krishty am 28.01.2011, 03:28, insgesamt 1-mal geändert.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
kimmi
Moderator
Beiträge: 1405
Registriert: 26.02.2009, 09:42
Echter Name: Kim Kulling
Wohnort: Luebeck
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von kimmi »

Hm, da versucht wer, nicht für Execution vorgesehenen Speicher zu rufen / callen. Ist deine Kiste sauber? Und kannst du sehen, wer das ist? Setz doch mal einen Breakpoint.

Gruß Kimmi
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von Krishty »

kimmi hat geschrieben:Hm, da versucht wer, nicht für Execution vorgesehenen Speicher zu rufen / callen. Ist deine Kiste sauber?
Ich habe zwar keinen Virenschutz drauf, aber hier passiert nichts verdächtiges – keine verringerte Leistung, keine Werbung, keine Abstürze, keine Toolbars. Meine Zentrifugen verschleißen ein wenig schneller als sonst, aber die sind eh schon etwas älter …

Ich lasse mal ein paar Online-Scans drüberlaufen. Ich glaube auch eher, dass die Data Execution ein Zufall war – ich habe in der letzten Stunde wirklich jede Fehlermeldung einmal gesehen.
kimmi hat geschrieben:Und kannst du sehen, wer das ist? Setz doch mal einen Breakpoint.
Wie denn? Das passiert alles in ntdll.dll bevor auch nur ein einziges Byte von mir ausgeführt wird.

Nachtrag: Hui, der erste Absturz ohne eigene CRT und mit leerer WinMain() :)

Code: Alles auswählen

'C.exe': Loaded C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Symbols loaded (source information stripped).
Page heap: pid 0xDFC: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0xDFC: flags 0x80E43267: application verifier enabled
Invalid parameter passed to C runtime function.


=======================================
VERIFIER STOP 0000000000000650: pid 0xDFC: Attempt to execute code in non-executable memory (first chance). 

	0000000000000000 : Address being accessed.
	0000000000000000 : Code performing invalid access.
	000000000012F060 : Exception record. Use .exr to display it.
	000000000012EB70 : Context record. Use .cxr to display it.


=======================================
This verifier stop is not continuable. Process will be terminated 
when you use the `go' debugger command.

=======================================

'C.exe': Loaded 'C:\Windows\System32\vrfcore.dll', Cannot find or open the PDB file
AVRF: Noncontinuable verifier stop 0000000000000650 encountered. Terminating process ... 
The program '[3580] C.exe: Native' has exited with code -1073741823 (0xc0000001).
und nochmal

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Symbols loaded (source information stripped).
Page heap: pid 0x10CC: page heap enabled with flags 0x3.
AVRF: C.exe: pid 0x10CC: flags 0x80E43267: application verifier enabled
AVRF: Exception during verifier.dll init for C.exe with flags 0x80E43267.
AVRF: exception raised in provider verifier.dll initialization routine 
The program '[4300] C.exe: Native' has exited with code -1073741502 (0xc0000142).
Zuletzt geändert von Krishty am 28.01.2011, 03:29, insgesamt 3-mal geändert.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4262
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: [C++] Absturz vor main()

Beitrag von Chromanoid »

Passiert das ganze auch wenn du das ganze direkt aus dem System startest (ohne Visual Studio)?
Helmut
Establishment
Beiträge: 237
Registriert: 11.07.2002, 15:49
Wohnort: Bonn
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von Helmut »

Hast du in dem Projekt denn eine eigene DLL, zu der du statisch linkst? Vielleicht passiert da was im DllMain-Aufruf. Die Konstruktoren der globalen Variablen in einer Dll werden auch darin aufgerufen.
Um das mit dem Rootkit auszuschließen würde ich auch zumindest versuchen, den Bug in einer VM oder wo anders zu reproduzieren.
Benutzeravatar
kimmi
Moderator
Beiträge: 1405
Registriert: 26.02.2009, 09:42
Echter Name: Kim Kulling
Wohnort: Luebeck
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von kimmi »

Du kannst mit entsprechenden Symbolen deines Betriebsystemes eine leere WinMain definieren und an dem ntdll-Symbol mit WinDbg versuchen, einen Breakpoint zu setzen.

Gruß Kimmi
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von Krishty »

Chromanoid hat geschrieben:Passiert das ganze auch wenn du das ganze direkt aus dem System startest (ohne Visual Studio)?
Nein … lustig. (Jedenfalls habe ich gerade 60× ohne Absturz aus dem System gestartet – vom Debugger hingegen kracht es bei drei von vier Starts.) Jetzt erhärtet sich mein Verdacht gegen die SP1-Beta.
Helmut hat geschrieben:Hast du in dem Projekt denn eine eigene DLL, zu der du statisch linkst? Vielleicht passiert da was im DllMain-Aufruf. Die Konstruktoren der globalen Variablen in einer Dll werden auch darin aufgerufen.
Keine eigene, nur die Standard-DLLs à la msvcrt.dll, user32.dll etc pp.
Helmut hat geschrieben:Um das mit dem Rootkit auszuschließen würde ich auch zumindest versuchen, den Bug in einer VM oder wo anders zu reproduzieren.
Ja; ich werde zuerst einmal versuchen, ihn von einem neuen Projekt aus zu reproduzieren. Jetzt, wo er auch für Release-Builds bestätigt ist, besteht Hoffnung, dass ich ihn isoliert bekomme.
kimmi hat geschrieben:Du kannst mit entsprechenden Symbolen deines Betriebsystemes eine leere WinMain definieren und an dem ntdll-Symbol mit WinDbg versuchen, einen Breakpoint zu setzen.
In WinDbg muss ich mich erst einarbeiten. Ehrlich gesagt will ich das – sollte es sich als SP1-Fehler herausstellen – möglichst schnell aus den Händen geben weil der Mist zutiefst frustrierend ist.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
eXile
Establishment
Beiträge: 1136
Registriert: 28.02.2009, 13:27

Re: [C++] Absturz vor main()

Beitrag von eXile »

Von hier:
The following command sets the Show loader snaps flag in the GlobalFlag registry entry for the Notepad.exe image file. Show loader snaps takes snapshots of the load process, capturing in detail the loading and unloading of executable images and their supporting library modules.

The command uses the /i parameter to indicate image file mode and specifies the name of the image file, Notepad.exe. To identify the flag, the command uses sls, the abbrevation for Show loader snaps and it precedes the abbreviation with a plus sign (+) to indicate that the flag is set. Without the plus sign, the command has no effect.

gflags /i notepad.exe +sls
Dann die Anwendung im Debugger starten. Schau mal, ob das einige hilfreiche Infos ausspuckt.
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von Krishty »

eXile hat geschrieben:Dann die Anwendung im Debugger starten. Schau mal, ob das einige hilfreiche Infos ausspuckt.
Der Ladevorgang ist nun ausführlich dokumentiert, aber zum Fehler selber gibt es nichts Neues:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Symbols loaded (source information stripped).
Page heap: pid 0xE4: page heap enabled with flags 0x3.
00e4:0ab4 @ 21271407 - LdrpInitializeProcess - INFO: Beginning execution of C.exe (C:\source\B\C\..\..\..\compiled\B\x64DS\C.exe)
	Current directory: C:\Products\B\
	Search path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;C:\Windows\system;C:\Windows;.;[...]
AVRF: C.exe: pid 0xE4: flags 0x80E43267: application verifier enabled
00e4:0ab4 @ 21271407 - LdrLoadDll - ENTER: DLL name: verifier.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271407 - LdrpLoadDll - ENTER: DLL name: verifier.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271407 - LdrpLoadDll - INFO: Loading DLL verifier.dll from path C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271407 - LdrpFindOrMapDll - ENTER: DLL name: verifier.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271407 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271407 - LdrpLoadDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271407 - LdrLoadDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271407 - LdrGetProcedureAddressEx - INFO: Locating procedure "NtSuspendProcess" by name
00e4:0ab4 @ 21271407 - LdrpRunInitializeRoutines - INFO: Calling init routine 000007FEECE3D278 for DLL "C:\Windows\system32\verifier.dll"
00e4:0ab4 @ 21271407 - LdrGetProcedureAddressEx - INFO: Locating procedure "NtResumeProcess" by name
00e4:0ab4 @ 21271422 - LdrLoadDll - ENTER: DLL name: ntdll.dll DLL path: NULL
00e4:0ab4 @ 21271422 - LdrpLoadDll - ENTER: DLL name: ntdll.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpLoadDll - INFO: Loading DLL ntdll.dll from path C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpFindOrMapDll - ENTER: DLL name: ntdll.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrpLoadDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrLoadDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlReportException" by name
00e4:0ab4 @ 21271422 - LdrGetDllHandleEx - ENTER: DLL name: ntdll.dll DLL path: NULL
00e4:0ab4 @ 21271422 - LdrGetDllHandleEx - INFO: Locating DLL ntdll.dll in path C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpFindLoadedDll - ENTER: DLL name: ntdll.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpFindLoadedDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrGetDllHandleEx - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlInitializeSRWLock" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlReleaseSRWLockExclusive" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlReleaseSRWLockShared" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlAcquireSRWLockExclusive" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlAcquireSRWLockShared" by name
00e4:0ab4 @ 21271422 - LdrGetDllHandleEx - ENTER: DLL name: ntdll.dll DLL path: NULL
00e4:0ab4 @ 21271422 - LdrGetDllHandleEx - INFO: Locating DLL ntdll.dll in path C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpFindLoadedDll - ENTER: DLL name: ntdll.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271422 - LdrpFindLoadedDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrGetDllHandleEx - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlCreateMemoryBlockLookaside" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlExtendMemoryBlockLookaside" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlAllocateMemoryBlockLookaside" by name
00e4:0ab4 @ 21271422 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlFreeMemoryBlockLookaside" by name
00e4:0ab4 @ 21271422 - LdrLoadDll - ENTER: DLL name: vrfcore.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271422 - LdrpLoadDll - ENTER: DLL name: vrfcore.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271422 - LdrpLoadDll - INFO: Loading DLL vrfcore.dll from path C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271422 - LdrpFindOrMapDll - ENTER: DLL name: vrfcore.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271422 - LdrpFindKnownDll - ENTER: DLL name: vrfcore.dll
00e4:0ab4 @ 21271422 - LdrpFindKnownDll - RETURN: Status: 0xc0000135
00e4:0ab4 @ 21271422 - LdrpSearchPath - ENTER: DLL name: vrfcore.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271422 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\SYSTEM32\vrfcore.dll
00e4:0ab4 @ 21271438 - LdrpResolveFileName - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpResolveDllName - ENTER: DLL name: C:\Windows\SYSTEM32\vrfcore.dll
00e4:0ab4 @ 21271438 - LdrpResolveDllName - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpSearchPath - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpMapViewOfSection - ENTER: DLL name: C:\Windows\SYSTEM32\vrfcore.dll
00e4:0ab4 @ 21271438 - LdrpMapViewOfSection - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpHandleOneOldFormatImportDescriptor - INFO: DLL "C:\Windows\SYSTEM32\vrfcore.dll" imports "ntdll.dll"
00e4:0ab4 @ 21271438 - LdrpLoadImportModule - ENTER: DLL name: ntdll.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271438 - LdrpFindOrMapDll - ENTER: DLL name: ntdll.dll DLL path: C:\Windows\SYSTEM32\
00e4:0ab4 @ 21271438 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpLoadImportModule - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrpLoadDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrLoadDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrGetDllHandleEx - ENTER: DLL name: verifier.dll DLL path: NULL
00e4:0ab4 @ 21271438 - LdrGetDllHandleEx - INFO: Locating DLL verifier.dll in path C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271438 - LdrpFindLoadedDll - ENTER: DLL name: verifier.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
00e4:0ab4 @ 21271438 - LdrpFindLoadedDll - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrGetDllHandleEx - RETURN: Status: 0x00000000
00e4:0ab4 @ 21271438 - LdrGetProcedureAddressEx - INFO: Locating procedure "VerifierStopMessage" by name
00e4:0ab4 @ 21271438 - LdrpRunInitializeRoutines - INFO: Calling init routine 000007FEECE43DFC for DLL "C:\Windows\SYSTEM32\vrfcore.dll"


=======================================
VERIFIER STOP 0000000000000650: pid 0xE4: Attempt to execute code in non-executable memory (first chance). 

	0000000000000000 : Address being accessed.
	0000000000000000 : Code performing invalid access.
	00000000001FEDB0 : Exception record. Use .exr to display it.
	00000000001FE8C0 : Context record. Use .cxr to display it.


=======================================
This verifier stop is not continuable. Process will be terminated 
when you use the `go' debugger command.

=======================================

'C.exe': Loaded 'C:\Windows\System32\vrfcore.dll', Cannot find or open the PDB file
AVRF: Noncontinuable verifier stop 0000000000000650 encountered. Terminating process ... 
The program '[228] C.exe: Native' has exited with code -1073741823 (0xc0000001).
Ich fürchte, dass der Fehler bereits sehr viel früher auftritt und bei normalem Ausführen zu 95 % unbemerkt bleibt. Durch die strengere Heap-Prüfung des Application Verifiers kracht es nun zwar öfter, aber die Ursache liegt wahrscheinlich schon weiter zurück.

Interessant auch, dass ich es aufs Verderben nicht reproduziert kriege. Dabei ist mir gerade sogar zweimal Visual Studio abgestürzt, als ich ausführen wollte.

Ui, hier ist noch ein Interessanter samt Call Stack:

Code: Alles auswählen

'C.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
09b8:0a24 @ 21767864 - LdrpMapViewOfSection - RETURN: Status: 0x00000000
09b8:0a24 @ 21767864 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
09b8:0a24 @ 21767864 - LdrpHandleOneOldFormatImportDescriptor - INFO: DLL "C:\Windows\system32\MSVCR100D.dll" imports "KERNEL32.dll"
09b8:0a24 @ 21767864 - LdrpLoadImportModule - ENTER: DLL name: KERNEL32.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
09b8:0a24 @ 21767864 - LdrpFindOrMapDll - ENTER: DLL name: KERNEL32.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
09b8:0a24 @ 21767864 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
09b8:0a24 @ 21767864 - LdrpLoadImportModule - RETURN: Status: 0x00000000
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlEncodePointer" by name
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlDecodePointer" by name
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlExitUserProcess" by name
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlDeleteCriticalSection" by name
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlEnterCriticalSection" by name
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlLeaveCriticalSection" by name
09b8:0a24 @ 21767864 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlExitUserThread" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlInterlockedPopEntrySList" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlInterlockedFlushSList" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlInterlockedPushEntrySList" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlQueryDepthSList" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlTryEnterCriticalSection" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlInitializeSListHead" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlAllocateHeap" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlSizeHeap" by name
09b8:0a24 @ 21767880 - LdrGetProcedureAddressEx - INFO: Locating procedure "RtlReAllocateHeap" by name
09b8:0a24 @ 21767880 - LdrpLoadImportModule - RETURN: Status: 0x00000000
09b8:0a24 @ 21767880 - LdrpHandleOneOldFormatImportDescriptor - INFO: DLL "C:\source\B\C\..\..\..\compiled\B\x64DS\C.exe" imports "VERSION.dll"
09b8:0a24 @ 21767880 - LdrpLoadImportModule - ENTER: DLL name: VERSION.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
09b8:0a24 @ 21767880 - LdrpFindOrMapDll - ENTER: DLL name: VERSION.dll DLL path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
09b8:0a24 @ 21767880 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
09b8:0a24 @ 21767880 - LdrpLoadImportModule - RETURN: Status: 0x00000000
Application verifier has triggered a breakpoint in C.exe.

This is an error in C.exe or any of the DLLs it has loaded.

Please see the output window for more diagnostic information



>	ntdll.dll!LdrpDoDebuggerBreak()  + 0x30 bytes	
 	ntdll.dll!LdrpInitializeProcess()  + 0x1a6a0 bytes	
 	ntdll.dll!string "Enabling heap debug options\n"()  - 0x3d7ad bytes	
 	ntdll.dll!LdrInitializeThunk()  + 0xe bytes	
Mal was ganz Neues – Stack Buffer Overrun:

Code: Alles auswählen

'C.exe': Loaded 'C:\compiled\B\x64DS\C.exe', Symbols loaded.
'C.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'C.exe': Loaded 'C:\Windows\System32\verifier.dll', Symbols loaded (source information stripped).
Page heap: pid 0x10C4: page heap enabled with flags 0x3.
10c4:1374 @ 23966121 - LdrpInitializeProcess - INFO: Beginning execution of C.exe (C:\source\B\C\..\..\..\compiled\B\x64DS\C.exe)
	Current directory: C:\Products\B\
	Search path: C:\source\B\C\..\..\..\compiled\B\x64DS;C:\Windows\system32;[...]
AVRF: C.exe: pid 0x10C4: flags 0x80E43267: application verifier enabled
10c4:1374 @ 23966137 - LdrLoadDll - ENTER: DLL name: verifier.dll DLL path: C:\Windows\SYSTEM32\
10c4:1374 @ 23966137 - LdrpLoadDll - ENTER: DLL name: verifier.dll DLL path: C:\Windows\SYSTEM32\
10c4:1374 @ 23966137 - LdrpLoadDll - INFO: Loading DLL verifier.dll from path C:\Windows\SYSTEM32\
10c4:1374 @ 23966137 - LdrpFindOrMapDll - ENTER: DLL name: verifier.dll DLL path: C:\Windows\SYSTEM32\
10c4:1374 @ 23966137 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
10c4:1374 @ 23966137 - LdrpLoadDll - RETURN: Status: 0x00000000
10c4:1374 @ 23966137 - LdrLoadDll - RETURN: Status: 0x00000000
10c4:1374 @ 23966137 - LdrGetProcedureAddressEx - INFO: Locating procedure "NtSuspendProcess" by name
10c4:1374 @ 23966137 - LdrpRunInitializeRoutines - INFO: Calling init routine 000007FEE9DED278 for DLL "C:\Windows\system32\verifier.dll"
10c4:1374 @ 23966137 - LdrGetProcedureAddressEx - INFO: Locating procedure "NtResumeProcess" by name


 *** A stack buffer overrun occurred in "C:\source\B\C\..\..\..\compiled\B\x64DS\C.exe" :

This is usually the result of a memory copy to a local buffer or structure where the size is not properly calculated/checked.
If this bug ends up in the shipping product, it could be a severe security hole.
The stack trace should show the guilty function (the function directly above __report_gsfailure).
 *** enter .exr 0000000077AAC710 for the exception record
 *** then kb to get the faulting stack

Unhandled exception at 0x779862ef (ntdll.dll) in C.exe: 0xC0000409: 0xc0000409.



>	ntdll.dll!__GSHandlerCheck()  + 0x13 bytes	
 	ntdll.dll!RtlpExecuteHandlerForException()  + 0xd bytes	
 	ntdll.dll!RtlDispatchException()  + 0x38c bytes	
 	ntdll.dll!KiUserExceptionDispatcher()  + 0x2e bytes	
 	ntdll.dll!GetLCIDFromLangListNodeWithLICCheck()  - 0x1800e bytes	
 	00000000001ee930()	
 	000007fe00000001()	
 	verifier.dll!__@@_PchSym_@00@UdHignOlyqOznwGEuivUyzhvUzeiuUevirurviUlyquivUznwGEUkxsOlyq@verifier()  + 0x22f8 bytes	
 	ntdll.dll!0000000077a87288() 	
Mittlerweile habe ich wirklich nur noch eine leere WinMain() mit keinen anderen Abhängigkeiten als MSVCR100D.dll und kernel32.dll … ich schraube nun systematisch die Compiler-Optionen zurück, bis der Fehler nicht mehr auftritt.

Soo, nun sind auch die Compiler-Optionen auf ihren Standardwerten (vom Ausgabe- und Debuggingverzeichnis mal abgesehen). Ich entferne jetzt alle anderen Projekte sowie die x86- und Release-Versionen aus der Lösung.

Code: Alles auswählen

>	verifier.dll!AVrfpDphPlaceOnBusyList()  + 0x5f bytes	
 	verifier.dll!AVrfDebugPageHeapAllocate()  + 0x325 bytes	
 	ntdll.dll!RtlDebugAllocateHeap()  + 0x31 bytes	
 	ntdll.dll!string "Enabling heap debug options\n"()  + 0x19a8a bytes	
 	0000000000000003()	
 	0000000000000062()	
 	000007fe01000002()	
Zuletzt geändert von Krishty am 28.01.2011, 03:34, insgesamt 2-mal geändert.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] Absturz vor main()

Beitrag von Krishty »

Wenn ich ein neues Projekt anlege, läuft alles reibungslos.

Wenn ich das alte Projekt lösche und durch das neue ersetze, stürzt auch das neue ab.

Es gibt nun zwei Möglichkeiten: Entweder ist die Lösung beschädigt und das provoziert auf verdrehteste Art und Weise perverse Fehler in ntdll.dll oder Windows hasst Programme, deren Quelltext von exakt diesem Ort der Festplatte stammt.

Darum setze ich die Lösung nun neu auf – wird zwar so angenehm wie Unzucht mit einer Ananas, aber da die Lösung original noch von Visual C++ 2008 stammt und über die Beta und den RC von VS 2010 bis hin zu SP1 geschleppt wurde, ist es mittlerweile überfällig.

Ich melde mich, wenn ich fertig bin.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] (gelöst) Absturz vor main()

Beitrag von Krishty »

Alles läuft mit allen Debugging- und Verifier-Einstellungen reibungslos. Diese Art von Fehler ist echt das Letzte; danke für eure Hilfe.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
eXile
Establishment
Beiträge: 1136
Registriert: 28.02.2009, 13:27

Re: [C++] (gelöst) Absturz vor main()

Beitrag von eXile »

OK, jetzt aber noch einmal ganz klar (für die Nachwelt und unseren Seelenfrieden): Woran lag es? Was hast du jetzt genau neu erstellt und ersetzt? Sehen die betroffenen Dateien in der Differenz stark unterschiedlich aus? ;)
Benutzeravatar
Krishty
Establishment
Beiträge: 8267
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [C++] (gelöst) Absturz vor main()

Beitrag von Krishty »

eXile hat geschrieben:Woran lag es?
An den Projektdateien. Ich weiß nicht genau, an welchen – aber es stürzten auch ansonsten makellose Dummy-Projekte ab, sobald sie in die Lösung eingefügt und mit Debugger gestartet wurden.
eXile hat geschrieben:Was hast du jetzt genau neu erstellt und ersetzt?
Ich habe eine neue Lösung mit neuen Projekten erstellt und den ganzen alten Quelltext dort hineinkopiert. Dann bin ich alle Einstellungen durchgegangen und habe sie von Hand gesetzt wie sie auch im alten Projekt gesetzt waren. Dann funktionierte alles wieder.
eXile hat geschrieben:Sehen die betroffenen Dateien in der Differenz stark unterschiedlich aus?
Die neuen Dateien sind durch die Bank ein Drittel kleiner als die Alten. Was genau anders ist, kann ich nicht sagen – läuft ja alles über GUIDs. Aber mir fiel z.B. auf, dass die alten Projektdateien selbst dann noch 64-Bit-Konfigurationen enthielten, als ich sie aus dem Projekt testweise vollständig gelöscht hatte …
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Antworten