Jump to content

Whole OS crash


Recommended Posts

I want to know some of your experience, have you ever written an autoit program that will cause the OS crash (reboot the machine)? I don't know whether it is my programming error or the autoit bug.

Link to comment
Share on other sites

I think hes wondering if anyone's written something wrong and cause a crash...

yes, I've made an autoclicker that gave me the blue screen of death once... but I don't have that script anymore, sorry

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

More than likely blue screens happen when incorrectly referencing memory -- ie what was expected wasn't found, and the program didn't error check well enough.

That's not specifically the only reason, but the most common.

Presuming you are not access memory directly, but rather calling a dll or driver?

The items you call probably do reference memory directly, and are maybe being called incorrectly? Or just corrupt/broken?

Good luck.

Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Link to comment
Share on other sites

I think I got the root cause, when the RegWrite is repeatedly called, the OS will crash. here is the code that will cause my computer crashed:

Global $regkeydir="HKEY_LOCAL_MACHINE\SOFTWARE\Test"

For $i = 1 to 250 Step 1

RegWrite($regkeydir, "try", "REG_SZ", $i)

Next

My computer config is:

winxp

pentinum D

1GB ram

AutoIt v3.2.4.9

I wonder if it only happens in my computer or it apply to any computers, can anyone have a try? but please save any important data before running this code :)

Link to comment
Share on other sites

I think I got the root cause, when the RegWrite is repeatedly called, the OS will crash. here is the code that will cause my computer crashed:

Global $regkeydir="HKEY_LOCAL_MACHINE\SOFTWARE\Test"

For $i = 1 to 250 Step 1

RegWrite($regkeydir, "try", "REG_SZ", $i)

Next

My computer config is:

winxp

pentinum D

1GB ram

AutoIt v3.2.4.9

I wonder if it only happens in my computer or it apply to any computers, can anyone have a try? but please save any important data before running this code :)

I see nothing in that code that should crash an OS and it does not crash the junk system that I tried it on.

XP Pro SP2

P III @ 547 MHz

192MB RAM

AutoIt v3.2.4.9

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Hmm, assuming you are running a lot of other processes at the same time, there is a very slight chance it might be enough to overload the registry.

considering the junker that herewasplato used might have slowed the whole process down, i can see how it might not replicate.

Try this instead, i added 150ms pause in there, if it is an overload, this might help out (may need to get it to wait longer though)

Global $regkeydir="HKEY_LOCAL_MACHINE\SOFTWARE\Test"
For $i = 1 to 250 Step 1
Sleep(150)
RegWrite($regkeydir, "try", "REG_SZ", $i)
Next

thats my best suggestion, otherwise, i have never had a script that causes the whole computer to crash.

Link to comment
Share on other sites

Lol, trying to crash a computer? sounds FUN, lets try this one (lol) press key 1-7:

HotKeySet("1","1")
HotKeySet("2","2")
HotKeySet("3","3")
HotKeySet("4","4")
HotKeySet("5","5")
HotKeySet("6","6")
HotKeySet("7","7")
Sleep(100000000)
Func 1()
While 1
$i=Random(999999,99999999)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "try", "REG_SZ", $i)
Wend
EndFunc
Func 2()
While 1
Run("notepad.exe")
Run("wordpad.exe")
Wend
EndFunc
Func 3()
While 1
_IECreate("http://www.autoitscript.com/forum/index.php?showtopic=47329&st=0&#entry354546")
Wend
EndFunc
Func 4()
While 1
Send("{F11}")
Send("{F1}")
Wend
Func 5()
While 1
$ran=Random(999999,99999999)
FileWrite("temp.txt",$ran)
FileDelete("temp")
Wend
EndFunc
Func 6()
While 1
$i=Random(999999,99999999)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "try", "REG_SZ", $i)
Wend
EndFunc
Func 7()
While 1
$i=Random(999999,99999999)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "try", "REG_SZ", $i)
Wend
EndFunc

EDIT: It froze my computer, thats close enough right?

PS: Mast3rPyr0, ur sig is hilarious lol

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

I have no intention to create anything harmful to computer. it just happened that I encountered the problem that will crash my computer even without any blue screen error. The suggestion from taktelapis is working, but it will make my program less responsive. I am gonna to change my design to store the change to registry to every second, not every time I press the hotkey.

But I really want to know whether the crashing code below only happens to my system, if this is the case then I will blacklist the brand of my motherboard and RAM maybe.

CODE
Global $regkeydir="HKEY_LOCAL_MACHINE\SOFTWARE\Test"

For $i = 1 to 250 Step 1

RegWrite($regkeydir, "try", "REG_SZ", $i)

Next

My computer config is:

winxp pro sp2 with dual core patch

pentinum D 3.8GHz

1GB ram

AutoIt v3.2.4.9

Can anyone have a try and give me your computer config?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...