Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 1888

User type constants not correctly allocated when compiled in "Release"

$
0
0

C++ Builder XE8 subscription update 1 Professional - running on Win 7 (32 bit) PC.

I have a fairly large VCL project (on going). Latest version compiles, links without errors or warnings when compiling in "debug" mode and runs as expected. When I change to "release" mode the code still compiles and links without any errors or warnings but it does not run correctly: some const arrays of user types seem to be allocated memory but they are not correctly initialised. The software runs as if all the integers in the user types are initialised as zero and all the Strings (aka VCL Unicode strings) are initialised as empty strings. Individual const types of the user type ARE initialised correctly, it is only the const arrays of the individual const types that are not.

The problem is consistent - ie if I change settings back to "debug" and recompile then the application works as expected. If I change back to "release" it fails again.

I am not quite sure how to debug this further (any constructive ideas welcome!).

Has anyone else seen this?


Viewing all articles
Browse latest Browse all 1888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>