Windows simulate process crash




















This entry was posted in Debugging. Bookmark the permalink. Imran says:. July 26, at am. Kamran says:. July 26, at pm. Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:.

Email required Address never made public. If this were unix, you could send a signal 9 to the process If you really needed to, you could share all the application memory with another process or thread , and have that thread randomly write random data some unfortunate memory location - I think NASA did this for some of their space projects, but I really couldn't give a reference.

If this is, for example, some program that controls some medical service that prescribes drugs Unit test that service instead, analyse the API, and look for flaws. An alternative would be to run the application in a good debugger, set a breakpoint to a particular line of code, and viola, your application has "crashed". Now, this might not cause all your threads to stop running, depending on the debugger being used.

Alternatively, you could run the application in the debugger, and simply "stop" the application after a time. This doesn't neccessarily result in a crash with the kernel killing the application and possibly dumping core but it would probably do what you want regardless.

Call abort function from your code. Other programs can't reliably "crash" your program - they have their own process context which is isolated from your program's context. You could use something like TerminateProcess in Windows API or another platform-specific function but that would be more or less the same as using Task Manager. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Collectives on Stack Overflow. Learn more. Force crash an application Ask Question. Asked 11 years, 1 month ago. Active 1 year, 5 months ago. Viewed 19k times. MarkP MarkP 3, 9 9 gold badges 40 40 silver badges 79 79 bronze badges. Select New and then Key.

Ensure to back up the Windows Error Reporting key before creating the new key. Select the LocalDump key and create three registry values as mentioned below:. Once you have followed the steps mentioned in the Enable crash dumps section, reproduce the crash of the software and collect the related. Legal Notices Online Privacy Policy. Buy now. User Guide Cancel.

This article explains how to generate crash dump files on a Windows machine. Once kernel-mode dump files have been enabled , most system crashes should cause a crash file to be written and the blue screen to be displayed. However, there are times that a system freezes without actually initiating a kernel crash. Possible symptoms of such a freeze include:. If an experienced debugging technician is present, they can attach a kernel debugger and analyze the problem.

For some tips on what to look for when this situation occurs, see Debugging a Stalled System.



0コメント

  • 1000 / 1000