1
vote
3answers
87 views

Avoiding Stack Overflow Exception

I am stuck with a stack overflow exception in this section of code, it is obviously occurring because the Customer object calls a list of CustomerBackgroundLevel objects, each one of which creates a ...
0
votes
2answers
66 views

Infinite loop while reading file

I get a random line from file: using (FileStream ifs = new FileStream(path, FileMode.Open, FileAccess.Read)) { using (StreamReader sr = new StreamReader(ifs, Encoding)) { long lastPos = ...
6
votes
2answers
246 views

Infinite loop invalidating the TimeManager

I am experiencing a very tricky defect in my WPF application to track down. The error message is: An infinite loop appears to have resulted from repeatedly invalidating the TimeManager during ...
0
votes
2answers
99 views

Start infinite loop automaticaly with WCF service

I have a WCf service. AMong with several services I need to write a piece of code that always check for updates in a SAP table and update a SQL Server database. This function need to start when the ...
0
votes
1answer
65 views

Code Goes To An Infinite Loop

I was trying to create a function that basically creates some binary data/converts it and modifies it on basis of an equation stores it and exports output as HTML. Here's the truncated code: ...
3
votes
1answer
214 views

while(true) / while(1) vs. for(;;) [duplicate]

Possible Duplicate: for ( ; ; ) or while ( true ) - Which is the Correct C# Infinite Loop? Why choosing for (;;){} over while(1)? What's the difference between while(true), while(1), and ...
2
votes
3answers
101 views

C# -infinite for loop

private void button1_Click(object sender, EventArgs e) { int j, counter=0; j = 2; for (int i = 0; i < 100; i=i*2) { j = j - i; while (j<25) { ...
1
vote
0answers
143 views

Infinite loop in custom VirtualPathProvider causing IIS Crashes

Our IIS is crashing at regular intervals and we have made a crash dump through DebugDiag that we are investigating. The exception code is always e053534f which I believe is a stack overflow so have ...
-1
votes
2answers
195 views

infinite loop in C#

This simple program take an input of integers and print them , but stop printing if it sees 60 string input = string.Empty; int intValue = 0; int[] numbers = new int[5]; ...
2
votes
4answers
126 views

Stuck in infinite loop

I cant see the problem here. I am stuck in an infinite loop when I call an entry. I am doing wcf so I have my server working fine. This is my client. Everything works if i take the loops out. But I ...
3
votes
1answer
150 views

Continually scanning a value in memory without using an infinite loop

I'm scanning outside program's memory. The code looks like that: while (true) { read(x) if (x changed since last check) { x = new value; . . . } Thread.Sleep(0); } I ...
3
votes
4answers
219 views

Infinite looping consumes 100% CPU

I am stuck in a situation where I need to generate a defined frequency of some Hz. I have tried multimedia timers and all other stuff available on the internet but so far an infinite loop with some ...
1
vote
1answer
240 views

C# UnhandledException from another thread keeps looping

I have a thread that is very simple. The only thing the Thread object does is throw new Exception();. The reason why I did that is because I needed to test what happens if a exception happens in a ...
1
vote
3answers
186 views

why does list.count returns 0 in this code [closed]

I want to find all the factors of this number and store the factors into a list but this list.count returns zero List<double> listOfFactors = new List<double>(); public void ...
-2
votes
3answers
154 views

how to get out of a loop [closed]

a newbie question about c# i want to write a program that monitors a serial com port I have some code that works but it was written for a dos console box, i want a windows app. And be able based on a ...

1 2 3 4
15 30 50 per page