Notre application C#/COM/C++ plante et j'ai besoin d'aide pour le déboguer. En cours d'exécution avec gflags activé et WinDbg attaché, nous avons déterminé que les plantages sont causés par une violation d'accès, mais nous n'avons pas été en mesure de le réduire plus que cela. Nous ne voyons pas le problème sur toutes les machines; Il y a quelques machines qui semblent reproduire le problème fréquemment mais pas de façon déterministe. Nous avons observé le crash de l'application en quittant simplement l'application (disons, Alt-Tab) puis en revenant. La sortie de WinDbg est ci-dessous.Comment déboguer un violation de violation d'accès non déterministe?
Nous avons essayé de commenter systématiquement les zones de code qui pourraient causer le problème, mais nous n'avons pas encore eu beaucoup de succès.
Des suggestions sur les étapes de débogage ou les outils que nous devrions essayer?
analyser -v
EXCEPTION_RECORD: FFFFFFFF - (.exr 0xffffffffffffffff) ExceptionAddress: 1a584ff2 (+ 0x1a584ff1)
ExceptionCode: c0000005 (accès violation) ExceptionFlags: 00000000 NumberParameters: 2 Paramètre [0]: 00000000 Paramètre [1]: 1a584ff2 Tentative de lecture à partir de l'adresse 1a584ff2PROCESS_NAM E: ProcessFiles.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - L'instruction à 0x% 08lx référencée mémoire à 0x% 08lx. La mémoire ne peut pas être% s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - L'instruction à 0x% 08lx a référencé la mémoire à 0x% 08lx. La mémoire ne peut pas être% s.
EXCEPTION_PARAMETER1: 00000000
EXCEPTION_PARAMETER2: 1a584ff2
READ_ADDRESS: 1a584ff2
FOLLOWUP_IP: ED20 + 1a584ff1 1a584ff2 ?? ???
NtGlobalFlag: 2000000
APPLICATION_VERIFIER_FLAGS: 0
IP_MODULE_UNLOADED: ED20 + 1a584ff1 1a584ff2 ?? ???
MANAGED_STACK: (TransitionMU) 0EC6F6F4 7B1D8CCE System_Windows_Forms_ni System.Windows.Forms.Application + ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop (Int32, Int32, Int32) + 0x24e 0EC6F790 7B1D8937 System_Windows_Forms_ni! ! System.Windows.Forms.Application + ThreadContext.RunMessageLoopInner (Int32, System.Windows.Forms.ApplicationContext) + 0x177 0EC6F7E4 7B1D8781 System_Windows_Forms_ni! System.Windows.Forms.Application + ThreadContext.RunMessageLoop (Int32, System.Windows .Forms.ApplicationContext) + 0x61 0EC6F814 7B195911 System_Windows_Forms_ni! System.Windows.Forms.Application.Run (System.Windows.Forms.Form) + 0x31 0EC6F828 0969D97A Extract_Utilities_Forms! Extract.Utilities.Forms.VerificationForm`1 [[System .__ Canon, mscorlib]]. A (System.Object) + 0x23a 0EC6F8C0 79A00EEE mscorlib_ni! System.Threading.ThreadHelper.ThreadStart_Context (System.Object) + 0x72a25e 0EC6F8CC 792E019F mscorlib_ni! System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) + 0x6f 0EC6F8E4 797DB48A mscorlib_ni! System.Threading.ThreadHelper.ThreadStart (System.Object) + 0x4A (TransitionUM)
LAST_CONTROL_TRANSFER: de 7e418734 à 1a584ff2
FAULTING_THREAD: FFFFFFFF
ADDITIONAL_DEBUG_TEXT: Suivi défini sur la base de l'attribut [ip_not_executable] de la monture: [0] de fil: [E30]
BUGCHECK_STR: APPLICATION_FAULT_BAD_INSTRUCTION_PTR_INVALID_POINTER_READ_WRONG_SYMBOLS_WINDOW_HOOK
PRIMARY_PROBLEM_CLASS: BAD_INSTRUCTION_PTR
DEFAULT_BUCKET_ID: BAD_INSTRUCTION_PTR
STACK_TEXT:! 7b1d8cce System_Windows_Forms_ni System.Windows.Forms.Application + ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop + 0xc 7b1d8937 System_Windows_Forms_ni System.Windows. Forms.Application + ThreadContext.RunMessageLoopInner + 0x0 7b1d8781 System_Windows_Forms_ni! System.Windows.Forms.Application + ThreadContext.RunMessageLoop + 0x0 7b195911 System_Windows_Forms_ni! System.Windows.Forms.Application.Run + 0x31 0969d97a Extract_Utilities_Forms! Extract.Utilities.Forms.VerificationForm`1 [[System .__ Canon, mscorlib]]. A + 0x23a 79a00eee mscorlib_ni! System.Threading.ThreadHelper.ThreadStart_Context + 0x72a25e 792e019f mscorlib_ni! System.Threading.ExecutionContext. Run + 0x6f 797db48a mscorlib_ni System.Threading.ThreadHelper.ThreadStart + 0x4A
STACK_COMMAND: .ecxr; ~~ [e30]; .frame 0; ** Pseudo Contexte **; kb
FAILED_INSTRUCTION_ADDRESS: Ed20 + 1a584ff1 1a584ff2 ??
???SYMBOL_NAME: ED20
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: ED20
IMAGE_NAME: ED20
DEBUG_FLR_IMAGE_TIMESTAMP: 0
FAILURE_BUCKET_ID: BAD_INSTRUCTION_PTR_c0000005_Ed20!Unloaded
BUCKET_ID: APPLICATION_FAULT_BAD_INSTRUCTION_PTR_INVALID_POINTER_READ_WRONG_SYMBOLS_WINDOW_HOOK_BAD_IP_Ed20
Followup: MachineOwner
Avez-vous essayé d'exécuter la commande jointe au débogueur avec la gestion des exceptions de première chance activée? (Ctrl + Alt + E dans Visual Studio). –
Oui, et ce qui est étrange est: nous ne voyons rien. Il semble seulement être reproductible sur quelques machines, pas sur nos machines de développement. –
Le tas est corrompu. Vous trouverez de bonnes astuces de débogage dans ce fil: http://stackoverflow.com/questions/1010106/how-to-debug-heap-corruption-errors ou en recherchant sur Google comment "déboguer la corruption du tas". –