Click to See Complete Forum and Search --> : Application is crashing on different machines


AlionSolutions
December 11th, 2006, 03:59 PM
Hi,
I just came across a strange problem: I have coded an application using Borland C++-Builder (using VCL-Classes) and recently I bought a new computer. It is a dualcore 64-Bit system running Win XP Pro 32 bit. When I started the program, it crashed at several locations, where it did run perfectly on the old machine (Athlon XP 2000+ Win XP Pro). I needed to recompile it on the new system and everything was fine.. no crashes.
Now when I gave the program to my girlfriend for testing and installed it on her computer (my old system) it crashed at the same locations, where it crashed when I first ran it on my new system.

My question is: Is it possible, that I cannot compile applications on my new system that run on older systems. Or otherwise: Is it possible that the system one compiles an application on affects on which machine the application is able to run?

I mean, I use no special assembler code inside my application. So it must be machine independent. Or....?

I located the parts where the crashes occur everywhere, where multithreading was used. I don't use the Borland VCL Thread Classes such as TThread. I create my threads by calling Win32 CreateThread.

Thanks in advance for any tips

Juergen

MrViggy
December 11th, 2006, 04:20 PM
Sounds like a sync issue. Threaded apps can contain sync bugs that don't show up until you try to run them on a multiple processor machine (dual core processors count as multi processor machines).

Viggy

AlionSolutions
December 11th, 2006, 04:28 PM
Thanks for your suggestion MrViggy.
If I understand you right with the sync-problem, I am pretty sure that it is not the case. I have allways just one additional thread asside from the main thread running. If a new rendering is started, the old thread is killed by setting an Event, checking it in the thread and exit if it is set. So before a new rendering thread is started, I make sure that any working previous thread exits. I have had this thought too, but since it doesn't crash not only on the new machine when compiled on the old one, butr vice versa, I do not think that it is the case.

Thanks anyway

Juergen