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

App will not compile with the addition of a single line of code

$
0
0

I was compiling a project "Chart" which defines a TRecord which contains a number of boolean variables, one of which was "showygrid". I was building the code up with it working fine when I entered "showygrid:=true;" in a "with the record" block. The PC immediately went very slow, and I had to restart. I reopened Delphi, and the project, and ran it again. This time I get variable behaviour. With the line "showygrid:=true;" in, the project does not run, and I either have to "reset" and sometimes I don't. Sometimes I get "failed" and sometimes I get "success" even though it doesn't create a running executable. With that single line remmed out, the exe compiles and runs fine. Eventually I get the message "cannot create file Chart.exe". When I look at the file in Explorer, it is over 11MB in size, which is astonishing. If I try to delete it, Explorer says it is in use, even if I have actually shut down Delphi! I even renamed the boolean to "dispygrid" and the line "dispygrid:=true;" but the behaviour was the same, the project seems to compile but doesn't run with the line in, and works OK without it. I am utterly unable to see why that single line crashes the app so strangely.

I am running Delphi 10 Starter Edition on Windows 10 OS.

Any suggestions, anyone?


Viewing all articles
Browse latest Browse all 3212

Trending Articles