Trax Posted December 22, 2016 Share Posted December 22, 2016 Oh does this date! Many years ago I wrote a program which incorporated a Serial I/O library. As it turned out if you un-plugged and re-plugged the USB several times this Serial I/O library would generate a GPF (General Protection Fault). Since the GPF would not happen all the time I found some code posted here that when inserted in to a AutoIT program it would cause a GPF without fail. By GPF I mean the window "This program has caused an error and needs to close". Does anyone remember what code I can use to cause this type of GPF on purpose so I can debug? If it isn't called GPF any more what is it called? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 22, 2016 Moderators Share Posted December 22, 2016 Why on earth would you want to cause the GPF without an actual fail? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Trax Posted December 22, 2016 Author Share Posted December 22, 2016 So I can write a recovery routine. Very hard to do if you can't get it to GPF with any consistency. Link to comment Share on other sites More sharing options...
genius257 Posted December 23, 2016 Share Posted December 23, 2016 @Trax I'm not sure what you mean by GPF. Do you want the program to stop responding? If so do something like this: GUICreate("", 700, 320) GUISetState() DllStructGetData(DllStructCreate("BYTE", 0x1), 1) Exit My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now