Code which caused my PC hang [modified]
-
Hi Coders, Here's a code which I wrote few days ago. When I run it it caused my pc hanged. I had to restart my pc for it. I was creating a windows service few days ago. In that, I put a "Timer Control". And according to it's ticks, I wanted to run my process. And, for checking purpose by mistake I wrote following Process.Start instead of EventLog.WriteEntry in my code:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e)
{
Process.Start("notepad.exe");
}It was ok till now but then I put Timer Duration to 100 milisconds!!!!!!! When I started my Service and Bllllaaaassdsstttt!!!!!!! My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted. Anand Desai Developer Atharva Infotech
Anand Desai wrote:
My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted.
LOL ;P
Anand Desai wrote:
Process.Start("nodepad.exe");
Funny, I was expecting a
FileNotFoundException
:)xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008) -
Anand Desai wrote:
My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted.
LOL ;P
Anand Desai wrote:
Process.Start("nodepad.exe");
Funny, I was expecting a
FileNotFoundException
:)xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008)Noways.... try it. if u dont give path in "Process.Start", it itself take the path of Windows like "C:\\Windows". This wont give "
FileNotFoundException
" :)Anand Desai Developer Atharva Infotech
-
Anand Desai wrote:
My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted.
LOL ;P
Anand Desai wrote:
Process.Start("nodepad.exe");
Funny, I was expecting a
FileNotFoundException
:)xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008) -
Noways.... try it. if u dont give path in "Process.Start", it itself take the path of Windows like "C:\\Windows". This wont give "
FileNotFoundException
" :)Anand Desai Developer Atharva Infotech
-
... you spelt Notepad wrong... In your code snippet, it says: "nodepad.exe".
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008)Ohhh... sorry but that's typing mistake in this site. in my project I actually wrote
notepad.exe
Anand Desai Developer Atharva Infotech
-
Hi Coders, Here's a code which I wrote few days ago. When I run it it caused my pc hanged. I had to restart my pc for it. I was creating a windows service few days ago. In that, I put a "Timer Control". And according to it's ticks, I wanted to run my process. And, for checking purpose by mistake I wrote following Process.Start instead of EventLog.WriteEntry in my code:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e)
{
Process.Start("notepad.exe");
}It was ok till now but then I put Timer Duration to 100 milisconds!!!!!!! When I started my Service and Bllllaaaassdsstttt!!!!!!! My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted. Anand Desai Developer Atharva Infotech
-
Hi Coders, Here's a code which I wrote few days ago. When I run it it caused my pc hanged. I had to restart my pc for it. I was creating a windows service few days ago. In that, I put a "Timer Control". And according to it's ticks, I wanted to run my process. And, for checking purpose by mistake I wrote following Process.Start instead of EventLog.WriteEntry in my code:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e)
{
Process.Start("notepad.exe");
}It was ok till now but then I put Timer Duration to 100 milisconds!!!!!!! When I started my Service and Bllllaaaassdsstttt!!!!!!! My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted. Anand Desai Developer Atharva Infotech
Oops :-D
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
#define FILE_NOT_FOUND "notepad.exe"
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
Hi Coders, Here's a code which I wrote few days ago. When I run it it caused my pc hanged. I had to restart my pc for it. I was creating a windows service few days ago. In that, I put a "Timer Control". And according to it's ticks, I wanted to run my process. And, for checking purpose by mistake I wrote following Process.Start instead of EventLog.WriteEntry in my code:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e)
{
Process.Start("notepad.exe");
}It was ok till now but then I put Timer Duration to 100 milisconds!!!!!!! When I started my Service and Bllllaaaassdsstttt!!!!!!! My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted. Anand Desai Developer Atharva Infotech
-
Hi Coders, Here's a code which I wrote few days ago. When I run it it caused my pc hanged. I had to restart my pc for it. I was creating a windows service few days ago. In that, I put a "Timer Control". And according to it's ticks, I wanted to run my process. And, for checking purpose by mistake I wrote following Process.Start instead of EventLog.WriteEntry in my code:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e)
{
Process.Start("notepad.exe");
}It was ok till now but then I put Timer Duration to 100 milisconds!!!!!!! When I started my Service and Bllllaaaassdsstttt!!!!!!! My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted. Anand Desai Developer Atharva Infotech
-
Anand Desai wrote:
My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted.
:laugh: It's the revenge of the notepads because you've been spending too much time with your
insert dev env name here
. ;PGet it an expensive perfume or scrap-booking kit to shut it up.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chineese Proverb] Jonathan C Dickinson (C# Software Engineer)
-
Hi Coders, Here's a code which I wrote few days ago. When I run it it caused my pc hanged. I had to restart my pc for it. I was creating a windows service few days ago. In that, I put a "Timer Control". And according to it's ticks, I wanted to run my process. And, for checking purpose by mistake I wrote following Process.Start instead of EventLog.WriteEntry in my code:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e)
{
Process.Start("notepad.exe");
}It was ok till now but then I put Timer Duration to 100 milisconds!!!!!!! When I started my Service and Bllllaaaassdsstttt!!!!!!! My screen was full of NotePads.... n kept comming every 100 miliseconds!!!! until I restarted. Anand Desai Developer Atharva Infotech
Could've been worse:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e){
Process.Start("devenv.exe");
}Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan Portland, Oregon, USA
-
Could've been worse:
private void onTimerEvent(object sender,System.Timers.ElapsedEventArgs e){
Process.Start("devenv.exe");
}Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan Portland, Oregon, USA
No it can go worse far If I put that this windows service StartMode to "Automatic": Just imagine, when ever I start my pc, my blasting windows service also get started automatically n starts throwing notepads to my desktop every 100 miliseconds!!!...untill I restart.. and loop continue........ DeadLock Hey, This seems simple virus, insn't it?
Anand Desai Developer Atharva Infotech
-
No it can go worse far If I put that this windows service StartMode to "Automatic": Just imagine, when ever I start my pc, my blasting windows service also get started automatically n starts throwing notepads to my desktop every 100 miliseconds!!!...untill I restart.. and loop continue........ DeadLock Hey, This seems simple virus, insn't it?
Anand Desai Developer Atharva Infotech
Yeah, don't get any ideas. :laugh:
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan Portland, Oregon, USA
-
Yeah, don't get any ideas. :laugh:
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan Portland, Oregon, USA
Surely running in safe mode would give you the chance to correct this