Hello Sam (or anyone)
Okay, this one looks like a real stinker. (I am a poor but honest C programmer getting to grips with the gorgeous -- but pretty picky -- Visual C# programming environment.)
I am used to prolonged attempts at debugging which include swearing at the screen, etc etc. But this one I have no idea how to begin handling:
My program (see last thread) performs an enormous number of pretty simple calculations using three parameters (it was five, but I cut the number down to make life easier.)
In other words, it takes the loose form:
for (x = 0; x < 100; x++)
for (y = 0; y <100; y++)
for(z = 0; z <100; z++)
(do sequence of simple calculations) . . .
This loop repeatedly crashes, for no apparent reason, except that it produces a window with a message muttering on about Context Switch Deadlocks and something called MDA.
I tended, until a couple of days ago, not to examine this message deeply since it meant nothing whatever to me. Until I noticed something about "if 60 seconds have passed without pumping . . . ."
Now: I discover, after much use of hand-made debugging statements, that if my multiple loop takes more than about a minute to execute, this window is indeed produced.
If I increase the 'step' to say "x (or Y or z) += 10", though, so that the entire loop executes inside a minute, all is well.
Okay, no fooling, sixty-odd seconds without anything happening on screen --- that is, with just the Form present but no messages or other visible occurrences being produced --- triggers the (M)anaged (D)ebugging (A)ssistant [suggested substitute acronyms spring readily to mind)
into preventing my program from producing a result.
Fine. I can see it's trying to be helpful and does at least save me from sitting there in an endless loop, but I know the loop isn't in fact endless because increasing the aforementioned 'for/next step size' lets it end quite nicely, as long as it does so inside minute.
I cannot however use a step value of anything larger than 1, as it happens, and am quite prepared to sit and drink coffee for the ten or fifteen minutes it may actually take to execute with this small step size even with my superduperfast Cray-type processor (ok, Athlon or whatever). So:
How do I --
-- disable the MDA
-- make the application do some 'pumping', whatever 'pumping' may be?
-- or otherwise handle this problem?
With cheers and love,