If you also did not add a path in your "Project options" settings on the "Path" page, then that is fine.
If you did put any path there that points into the Lazarus or FPC sources, or unit or lib folders then that may be an issue.
If you did put a path there that points some other place, that is fine.
I assume you just placed the json parser unit into your project folder? That would be fine too.
I didn't add any paths manually, but there is a total of three paths listed which were added automatically by using the "Add" function of the project inspector. All three paths point to sub-folders in my project folder. All files in these paths are units, the separate folders are just to keep things organised.
I don't have any paths pointing to Lazarus or FPC sources, no.
Yes, the json parser unit is in the project folder.
However, now it gets interesting (maybe, if I am not mistaken).
LCL (and dependencies) would not likely be rebuild.
Unless you change the "configure rebuild Lazarus" settings, or you have "additions and overrides" affecting packages in your project options (see that tab in project opts).
You can also watch the messages windows: Does it say anything about "compiling package ..."? Or does it only output stuff about compiling your project?
Because, if LCL and dependencies is not recompiled, and if you have no other packages.... And if I am right, then there should be only one instance of fpc and one of ppc. (Someone of the fpc team might be able to confirm that).
Of course if you don't notice that that ppc___ didn't stop, and you compile again, then you would have two.
But I understand that a single compilation (one time pressing F9, or one time choosing "build") leads to several ppc___.
I don't have anything in "Additions and Overrides" right now, although I did use it a few times to compile the project with qt5 in order to test it against issues I was encountering with gtk2.
I'm not entirely sure about "Configure "Build Lazarus"". I've had to rebuild it once or twice for whatever reason, but that might even date back to a separate installation of an older version of Lazarus and I don't think I've used anything beside the default settings. So probably not relevant here.
A quick Ctrl+F through Messages after a successful run does not show any instance of a "compiling package" message.
I just got word from a member of the fpc team. If really only your project is buid, then there should be only one fpc and one ppc process (and both are single threaded).
That is, if the IDE only starts one compilation. Which in this case it should.
You don't have any custom settings in "complier commands" of the project settings?
No, I don't have any custom settings in "Compiler Commands".
What I've observed so far suggests that a single run/compile doesn't lead to several instances of fpc/ppcx64 by itself, but that the instances created by a single run don't end after the run, even when the app is closed, probably because they are still stuck in the endless loop that causes the initial issue for which I opened this forum thread. So they end up "orphaned", and new instances are created on the next run, leading to a pile-up over time.
The problem with the thread locks is:
- indeed you can compile lazarus as a whole divided over several threads, I believe it is even the default.. And multiple ppc's as a result.
- but packages can rely on shared units and resources, like sysutils, objpas, etc, etc, etc, even ppu's.
- and such constructs can subsequently cause a thread deadlock issue.
It is not something that happens often but it does happen every now and then, that's why I turned that off.
Building Lazarus with several threads does not always work very well. If it works, it works much faster, though. 9 out of 10 cases or better.
It is a bad luck = bad lock issue. Building FPC itself does not suffer from that issue.
It is darn hard to debug, so I chose the easy way out.
You can check that this is indeed the case in process windows on several platforms like windows and linux.
I assume this isn't entirely relevant here since I'm not building Lazarus or any packages, but it might be worth a try: how can I turn off multi-threading?