Jump to content
Martin Sedgewick

10.3.1 has been released

Recommended Posts

Hello, I'm encountering a problem with Delphi 10.3.1, which seems to show up nowhere on the forums so far:

migrated a project from Delphi XE7 which was working fine for several years.

in 10.3.1, the compiler is ignoring changes I make to a regular unit (.pas) of a VCL exe.

 

Even adding a blatant syntax error (which shows a red entry in the IDE error list), when compiled, gets completely ignored, and the compilation succeeds.

The DCU for this unit is re-timestamped, with what seems to be the source prior to the modification.

 

the issue seems to be fixed (though not confirmed 100%) by enabling the "save upon compile or build"  option.

when saved, the updated content of the .pas seems to make its way into the dcu, and breakpoints can be set again, to match the new PAS content (instead of being offset to match the previous code).

 

There are no duplicate unit names in the project, and a rebuild does not necessarily fix the issue.

 

Has anyone else encountered this problem?

I would like to see if this is only occurring at my site (i.e. project related) or if this is a known issue, with a bug filed for it.

 

Thanks a lot!

Share this post


Link to post

Please check your paths.

Also you might want to consider deleting the .dproj and let Delphi rebuild a new one based on the .dpr

 

Share this post


Link to post
1 hour ago, Khorkhe said:

in 10.3.1, the compiler is ignoring changes I make to a regular unit (.pas) of a VCLexe.

 

Every time this happens to me, there are duplicate source files on different paths.

I believe I am editing ./myproject/thisversion/myfile.pas, while I actually am in ./myproject/thatversion/myfile .pas
Sometimes this happens because I used find in files on the wrong path, or a file was included in the project from the wrong path.

Share this post


Link to post
Posted (edited)

Did the following:

 - went over the search paths thoroughly, removed everything that was not necessary (sources of the current project, bins of required libraries).

 - deleted the existing .dproj, let Delphi auto-create one

 - did a global search made sure there is one and only one version of my sources on the PC

 

Still ignores unsaved pas.

Worth noting that the project is not small.

 

Tried reproducing the issue on a fresh blank project but failed to do so. 

 

Edited by Khorkhe
missing info
  • Like 1

Share this post


Link to post

Is the unit in question explicitly mentioned in the project or is it a unit that is only used indirectly?

  • Like 2

Share this post


Link to post

@Uwe Raabe the unit is explicitly mentioned in the project.

 

Some good news!  I was able to reproduce the issue on a very small project (single unit) where all the big project specific details do not apply, see the info below and screenshot attached:

 

 - in the code: the syntax error is visible, unsaved.

 - top left: IDE detects the error

 - project options: all defaults, no search paths

 - messages: compilation success (same as popup window)

 - windows explorer: exe and dcu have different timestamps, off by one minute: the exe was re-created on the second compilation, but the DCU was ignored.

 

to top it off, second screenshot shows the code saved, yet the problem persists.

 

not sure what to make of this. I do have a batch script that can delete all my generated outputs, full clean and rebuild, but this is not practical at all.

when to trust that the compiler did its job correctly?

 

delphibug.jpg

delphibug2.jpg

Share this post


Link to post
1 hour ago, Khorkhe said:

I was able to reproduce the issue on a very small project

Can you attach that here?

Share this post


Link to post
1 minute ago, Uwe Raabe said:

Can you attach that here?

already did, they are the two screenshots in my previous post.

Share this post


Link to post
Posted (edited)

just for curiosity what happens if you write in the uses list : uses .... Main.pas  in 'src\frm\Main.pas';

 

if it helps then you have an other main.pas in your search path and you should be able to open it with ctrl-click on the unit name in the uses list.

Edited by Attila Kovacs

Share this post


Link to post
3 minutes ago, Attila Kovacs said:

if it helps then you have an other main.pas in your search path.

I'll give it a shot but if you check previously attached screenshot, the project search path is empty, and there's one dcu in the unit output directory.

Share this post


Link to post
53 minutes ago, Khorkhe said:

already did, they are the two screenshots in my previous post.

You attached the screenshots, but I was referring to the small project.

Share this post


Link to post
Posted (edited)

I can easily reproduce this putting a 2nd unit1.pas anywhere in the search path and/or library path _AND_ storing the applications unit1.pas somewhere else like the .dpr itself. The search order is given.

 

(btw. IDE dies badly if you put a file into the uses lists with 0 bytes length :D)

 

Edit: Maybe some dead entries in the .dproj? It's suspicious that you didn't create a new project because it's not called Project1, did you copy the old one?

Edited by Attila Kovacs

Share this post


Link to post
3 hours ago, Uwe Raabe said:

You attached the screenshots, but I was referring to the small project.

ah apologies for the misunderstanding. here it is:

PBXAlert - Copy.rar

Share this post


Link to post

I tried to reproduce it here, but unfortunately without success.

 

BTW, how did you manage to create the mainform twice in the DPR?

Share this post


Link to post

@Uwe Raabe Hehe, I managed it too a couple of weeks ago. Don't ask me how, but that was a looooong loooong debug session until I found the problem 😉

Share this post


Link to post
Posted (edited)
12 hours ago, Attila Kovacs said:

IEdit: Maybe some dead entries in the .dproj? It's suspicious that you didn't create a new project because it's not called Project1, did you copy the old one?

@Uwe Raabe found two main form entries, no clue how that could have happened, possibly the compiler migration?  Cleaned it up in any case.

this is a project started on XE7, which I've taken to 10.3 (no copy, just compile as is).

 

Uninstalled all addons (MMX, CNPack, GExperts) to isolate the problem.

 

It also seems I have located the culprit to be the "background compilation" option.  Had it enabled since XE7 due to large cycles / long compilation, which have since gone down drastically to a point where the background compilation is no longer really needed.

 

This is reproducible on a fresh 10.3.1 project, maybe add a button and an OnClick event.

 

the current steps to reproduce:

 - have background compilation on

 - full build, just in case

 - build passes successfully

 - introduce syntax error, don't save

 - compile without saving

 - compilation passes successfully (incorrect behavior)

 

to fix:

 - disable background compilation

 - remove syntax error

 - save and full build, just in case

 - compilation passes successfully

 - introduce syntax error, don't save

 - compile without saving

 - compilation fails (correct behavior)

Edited by Khorkhe
  • Confused 1

Share this post


Link to post

Can't reproduce. BUT I have stupid Error Insight disabled. Which incidentally is recommended at this time (actually since it was introduced).

Share this post


Link to post

It really annoys me that they didn't adapt Error Insight for inline declared variables. So ugly!

Share this post


Link to post
13 minutes ago, Lars Fosdal said:

It really annoys me that they didn't adapt Error Insight for inline declared variables. So ugly!

They would have a ton of other bugs to fix before adding this new feature...all in all it is a waste of time and energy, just scrap it and invest said time and energy into more crucial parts of the IDE.

  • Like 1

Share this post


Link to post
1 hour ago, Lars Fosdal said:

The new IDE skinning is a disaster.

And they even removed the checkbox to disable theming from the IDE settings dialog in 10.3.1. Instead of fixing the obvious problems with said dialog. There still is a registry setting (probably left unnoticed 😉 ) which disables theming but they may as well remove it in the future releases leaving us with an unusable IDE... I wish all resources spent on this theming nightmare since XE2 (? don't remember when it all began) were allocated to real bug fixing.

  • Like 5

Share this post


Link to post
7 minutes ago, Alexander Elagin said:

I wish all resources spent on this theming nightmare since XE2 (? don't remember when it all began) were allocated to real bug fixing.

And don't forget the resources spent on fixing that theming stuff, not just in the IDE but also in the IDE extensions. I spent several days just trying to fix things in GExperts that were broken due to

  1. introducing the theming
  2. bugs in theming
  3. bugfixes in theming

And I am still not done.

And GExperts doesn't even support theming itself, I don't want to consider the time it would take to actually support it (and I am definitely not going to spend that time).

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×