// JP opened flex table

Click to See Complete Forum and Search --> : release executable size different after rebuild all and no changes made???? Then it will crash on th


Mike Turner
November 21st, 2000, 04:31 AM
Hello! I'm running VC6++ sp3 Standard. Lately I'm having a problem. Sometimes when I compile, things that used to work in my app will now crash...

I've noticed that crashes happen only when the compiler produces an exe about 100+ K less than the time when everything worked!

Sometimes the only problem will be a different color than there should be, showing when I set a highlight color or something, other times a certain dialog window cannot be opened without crashing a second afterwards.

Does anyone know what could be causing the change in compile size!? I have been running some tests, Rebuild ALL, Execute, etc... without adding code or making serious changes (except maybe an extra space for a comment to get the Execute to rebuild the exe) the produced exe size can change drastically...

So far the to issues that happen the most are when I open a particular dialog window, the new window will crash the app, or if I set the system highlight color to red, it will be green.. These are the 2 common faults when the exe is too small...

Could the complier be leaving out sections of code for some reason!? Or corrupting it?

Thanks!!!

Roger Allen
November 21st, 2000, 04:45 AM
The compiler can give dodgy object code when all code optimizations are in place. Try recompiling with all optimizations disabled. (Assuming your not in debug mode)

Have you tried debugging the version that crashes? If its a release, you can add debug symbols etc and attach to it as you would a debug version. You can then see what could be causing the problem.


Roger Allen
Roger.Allen@www.sirius-analytical.com
Ok, Points make prizes, and ratings make points.
Did I help?

Mike Turner
November 21st, 2000, 07:15 PM
Ok thanks! I don't play with the debug or compiler options much, I'll look for those and give it a try! :)

Mike Turner
November 21st, 2000, 07:17 PM
Actually, I don't seem to have any the optimizations enabled... I can't enable them or disable them, they're locked out! But from the ones I can see, they're all disabled. I cannot even scroll the list down.

What should I have the "inline function expansion" set to?

nikb
November 22nd, 2000, 06:16 AM
The reason that optimizations are disabled is because you are inspecting the "Debug" configuration of your executable. You can enable optimizations by doing the following:

Go to Project, then Settings. Select the C/C++ tab, and from the dropdown, select "Optimizations". If the list appears disabled, the combobox at the top of the list is probably set to "Disable (Debug)" and thus causes the items to be disabled.

Anyways, about the problem you're having: I have, on occasion, seen the compiler produce "dodgy code" as Mr. Allen put it, even with optimizations disabled. This however, has only happened to me when the compiler is setup to use Edit & Continue, even if I do not make use of the feature itself. I can't pin it down any more than that, and of course, standard disclaimers apply: E&C may not be the reason.

The compiler seems to think that all object files are in order, and no rebuilding is necessary, and the only way to get things fixed is to force a full rebuild.

Sorry I could not be of more help.

-n

Mike Turner
November 23rd, 2000, 05:18 AM
Thanks about the edit & continue... BTW, I am not inspecting the debug version, it's the release version and the optimizations are still disabled. :) Go figure!

Is there another way to force a complete rebuild other than "rebuild all"? Sometimes when I'm having the problem, rebuild all takes several retries before it does fix it.

nikb
November 23rd, 2000, 05:20 AM
The only other way that I know of, is to manually delete all the files in the "Debug" and "Release" folders under your project directory. But as far as I can tell, that is exactly what the IDE does when you order a rebuild all.

As a sidenote, do you compile your code on a local drive, or a drive mounted remotely (via Samba for example)

//JP added flex table