 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mike King Guest
|
Posted: Thu Mar 04, 2004 7:22 pm Post subject: Random Build problems |
|
|
I am having random build problems. The project builds successful but when I
run the application I get errors that I cannot explain. When I re-build the
project the application works correctly. I have turned off pre-compiled
headers, and I delete all of the object files before re-building. The scary
thing is I do not when the application is build incorrectly. The
application is very large and it is very difficult to test every feature
after the build. Has anyone had a similar problem before? Does anyone know
how to solve this?
|
|
| Back to top |
|
 |
Harold Howe [TeamB] Guest
|
Posted: Thu Mar 04, 2004 9:15 pm Post subject: Re: Random Build problems |
|
|
Mike King wrote:
| Quote: | I am having random build problems. The project builds successful but when I
run the application I get errors that I cannot explain. When I re-build the
project the application works correctly.
....
Has anyone had a similar problem before?
|
I had a problem on one project where using make would evetually create
an EXE that would crash right off the bat. Doing a full build made the
problem go away. I have spoken with other developers that have the same
problem.
| Quote: | Does anyone know how to solve this?
|
I never did solve it. It was practically impossible to submit a bug
report for this, because only my project with 100+ forms would exhibit
the problem. Small, trivial problems don't.
To work around the issue, I just made sure to do a full rebuild when
releasing EXEs into production.
h^2
|
|
| Back to top |
|
 |
Mike King Guest
|
Posted: Thu Mar 04, 2004 9:39 pm Post subject: Re: Random Build problems |
|
|
| Quote: | I never did solve it. It was practically impossible to submit a bug
report for this, because only my project with 100+ forms would exhibit
the problem.
|
I to have a large project not as large as yours. I have 39 forms, 106 .cpp
files, and 148 .h files. I also have template classes and functions which I
have been told can be hard on the compiler.
|
|
| Back to top |
|
 |
Duane Hebert Guest
|
Posted: Thu Mar 04, 2004 10:59 pm Post subject: Re: Random Build problems |
|
|
"Mike King" <emailMK (AT) excite (DOT) com> wrote
| Quote: | I am having random build problems. The project builds successful but when I
run the application I get errors that I cannot explain. When I re-build the
project the application works correctly. I have turned off pre-compiled
headers, and I delete all of the object files before re-building. The scary
thing is I do not when the application is build incorrectly. The
application is very large and it is very difficult to test every feature
after the build. Has anyone had a similar problem before? Does anyone know
how to solve this?
|
I just posted a similar problem last month or so. It had to do with fstream and using
infile with a string. I actually found something on QC similar but it would work after a
build and stop working after a make or subsequent build.
I had a similar thing yesterday where a function that was parsing a std::string
was returning incorrect data (basically just a stringstream conversion
from a string to a double failing on the eof() check.) I put in a debug line
which cause a rebuild of the obj and the problem went away. I removed the line and the
problem stayed gone. The function is simple and well tested. I can't explain it and
it's a bit scary. Funny thing is that it's called in hundreds of places but would
always fail in the same call.
Also with BCB 5 it would have problems like drop down list mouse overs would
cause crashes, then a rebuild would solve it.
In most cases, a full build will "fix" the problem (unless of course you're including
rc files in you project As others have mentioned, we make sure to do a full
release build and run it for a while before shipping. This usually catches it.
|
|
| Back to top |
|
 |
Duane Hebert Guest
|
Posted: Fri Mar 05, 2004 12:17 am Post subject: Re: Random Build problems |
|
|
"Duane Hebert" <spoo (AT) flarn2 (DOT) com> wrote
| Quote: |
I just posted a similar problem last month or so. It had to do with fstream and using
infile with a string. I actually found something on QC similar but it would work after a
build and stop working after a make or subsequent build.
|
Should have mentioned that this one seemed to be mostly affected by turning
CodeGuard on.
|
|
| Back to top |
|
 |
evil Guest
|
Posted: Fri Mar 05, 2004 11:03 am Post subject: Re: Random Build problems |
|
|
On Thu, 4 Mar 2004 14:22:02 -0500, Mike King <emailMK (AT) excite (DOT) com> revealed:
| Quote: | I am having random build problems. The project builds successful but when I
run the application I get errors that I cannot explain. When I re-build the
project the application works correctly. I have turned off pre-compiled
headers, and I delete all of the object files before re-building. The scary
thing is I do not when the application is build incorrectly. The
application is very large and it is very difficult to test every feature
after the build. Has anyone had a similar problem before? Does anyone know
how to solve this?
|
Welcome to BCB.
Sometimes similar stuff happens to me. Or, I remove a .cpp and a .h file from
the disk, and sources that #include this .h file that I removed will still
happily compile. Then one day it simply stops working and gives me the error
message it should have given me long ago.
Why did it work all the time before I wonder? I see things like this happen
from time to time, it's like a .cpp file isn't really compiled but pulled
from a cache or something.
--
Acting stupid is often smart.
|
|
| Back to top |
|
 |
Duane Hebert Guest
|
Posted: Fri Mar 05, 2004 3:17 pm Post subject: Re: Random Build problems |
|
|
"evil" <invalid (AT) email (DOT) address> wrote
| Quote: | Welcome to BCB.
Sometimes similar stuff happens to me. Or, I remove a .cpp and a .h file from
the disk, and sources that #include this .h file that I removed will still
happily compile. Then one day it simply stops working and gives me the error
message it should have given me long ago.
Why did it work all the time before I wonder? I see things like this happen
from time to time, it's like a .cpp file isn't really compiled but pulled
from a cache or something.
|
Yep. It seems to be related to the size of the project in some way. We started
having these kinds of problems with larger projects though it's hard to say
what the level is. It's also hard to create any reproducable test case.
Removing the class explorer helped to get rid of some of the bugginess but
not all. Lately I've been getting some strange "assertion failed ..." errors
and a full build seems to stop them. I'll write down the exact error next time
it happens and post it here. Maybe someone has some ideas? Or
maybe Borland will release something that works...
|
|
| Back to top |
|
 |
Jack In Bottle Guest
|
Posted: Sun Mar 07, 2004 6:20 am Post subject: Re: Random Build problems |
|
|
I have to say that the problem is not BCB's builder compiler or linker (and
I am sure 99.99% I am right).
I told my folks "Do not complain the BCB, it is sure you made a bug!" and
said that to me too. Up to now I am always right about that :)
It is so familiar problem! cause I had it so many times. Most of the case
are memory or variable initial problem.
What I do to tackle down the problem is to put "try catch" block in my
program, each fatal error will show which blocks is wrong: something like
this:
try {
<statments>;
} catch(...){
AnsiString s;
s.printf("%d at %s : Opps, error in this block", __LINE__,
__FILE__);
ShowMessage(s);
}
When the error occus, it show you approxmately the position where in your
source code's it is.
This way has fixed lot problems in the code that was not written by me.
Without this, it will be realy time consuming to read all the code that was
not written by me.
"Mike King" <emailMK (AT) excite (DOT) com> wrote
| Quote: | I am having random build problems. The project builds successful but when
I
run the application I get errors that I cannot explain. When I re-build
the
project the application works correctly. I have turned off pre-compiled
headers, and I delete all of the object files before re-building. The
scary
thing is I do not when the application is build incorrectly. The
application is very large and it is very difficult to test every feature
after the build. Has anyone had a similar problem before? Does anyone
know
how to solve this?
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|