Damn I *** that posting up a little bit...
Here it is one more time:
I just found another bug... GOD DAMN IT.
I am a *** ing BUG MAGNET...
And you people are *** ING LAZY and really STUPID/RETARDED.
*** ING TEST YOUR CODE YOU SONS OF *** ES !
Anyway... now I have to alter the message to *** ing post it properly...
(Outlook express makes an attachment of begin begin or something)
It's amazing how my brain manages to solve problems while I am asleep.
"Yesterday" I was tired and I didn't see the problem.
"Today" I wake up and immediatly understand the problem.
At least I think so...
There are two threads:
The code which they execute is
(which I will put side-by-side, for illustration):
// Outlook express bug was here:
// If I put these two pieces of code side by side like so:
ThreadMain line 1 ThreadTest line 1 it makes an attachment of it oh my god
while not Terminated do
The order in which these statements are executed is probably what is causing
the problem in rare cases.
The rare case would be:
1. ThreadMain ThreadTest.Terminate;
2. ThreadTest.while not Terminated do
3. ThreadMain ThreadTest.WaitFor;
So you see the problem now ?
I do, the problem is:
First ThreadMain tells ThreadTest to terminate, then ThreadTest immediatly
Then ThreadMain tries to wait for ThreadTest to terminate... but it already
So ThreadMain waits forever on ThreadTest to terminate !
That's why it can never work ?!
So if I am correct about this then CodeGear has had a bug in there thread
code up to this day....
Which is about 10 years or so ?!
This bug is still in Delphi 2009 ?! WOW.
Which more or less proves how difficult it can be to find/detect bugs.
^^^ Probably caused by their bad testing as well ;) :) ^^^
I solved this with a critical section for the terminated boolean...
Maybe there is a better/more efficient solution ???
On a side note:
I left my computer running the whole "night" because it's downloading
Brother in Arms: Hells highway :)
Also Call of Duty 5 will come out 8 days from now ? So that gonna be fun too
lol. Gonna be busy *** weeks :)
Anyway something happened to my computer when I was a sleep and downloading
with BitComet 0.63 or so:
BitComet is still working... but Explorer.EXE crashes with an unknown
exception... probably in the .NET section or so ;)
I hope my computer didn't get hacked or infected ;) Maybe it was just a
failed hack attempt but this shows Windows X64 still has some serious bugs
here and there... (Explorer.exe hangs sometimes too...)
I restarted explorer.exe so now everything is fine...
Today Microsoft is probably gonna patch some holes... I always wait a
little bit with patching the operating system with new patches... One never
knows how that works out... sometimes people have problems with new patches
so that's why I always wait a few days or weeks... to know if the patches
work ok or not ok ;) :)
Skybuck ! =D