Forum > Editor

idea for an additional error message

(1/2) > >>

Nicole:
do this:

- use a shared directory by a Lazarus Win 7 VM and a Win 10 host for your projects
- start your software by Win 10
- open the project within the VM
- does not work (surprise!)

Not every time you may be aware of what you have done wrong.
So my idea: Drop an error message alike
- exe cannot be created
- program already started by another location or so

I use Lazarus 2.2.2, should be the last but one version

MarkMLl:
There's already a Tools -> Options -> IDE Startup -> Lazarus instances setting, but this presumably works by some form of interprocess communication which is (effectively) in-memory (i.e. including local sockets etc.). The problem would be extending this in a reliable way to operate over what are in effect separate systems.

I'm not convinced that having two IDE instances access the same .lpi is an error in all cases. Even if it were treated as such, the question then arises of whether having two IDE instances accessing different projects which happen to share one or more units is an error. The question also arises of how to avoid false positives, allowing that particularly when at least one VM is involved there is no reliably-shared process ID, user ID and so on.

If something did have to be done perhaps a list of possibly-live sessions in the .lps would work, with the user being obliged to sort things out before the IDE would proceed. However I think the support burden would be enormous, with a constant stream of users complaining about a message about such-and-such process ID accessing the project and absolutely no understanding of the technology involved.

I think I'd argue that this is a VM configuration issue: for a VM to allow multiple OS instances to access the same directory is inherently unsafe, and the user/administrator should be aware if he has set up network shares etc. that allow this.

MarkMLl

Bogen85:

--- Quote from: MarkMLl on November 01, 2022, 08:17:24 am ---I think I'd argue that this is a VM configuration issue: for a VM to allow multiple OS instances to access the same directory is inherently unsafe, and the user/administrator should be aware if he has set up network shares etc. that allow this.

--- End quote ---

I don't think that is necessarily a problem, as VM shares are typically like network shares, and multiple OSes accessing the same directory on a network share at a time is the norm.

The issue here, as you already noted MarkMLI, is Lazarus not understanding multiple instances across machine boundaries, which would not be practical for it to have to do.

Also, this is a Windows issue, and on most *nix likely would not manifest like this.

True, on Windows the executable could not be overwritten, and that should likely have a better error message.

But even though most *nix would act differently in this case, allowing the executable to be overwritten, there would likely be other negative side affects trying to work on the same project from two different instances, where those instances have no knowledge of each other.

MarkMLl:

--- Quote from: Bogen85 on November 01, 2022, 08:38:10 am ---I don't think that is necessarily a problem, as VM shares are typically like network shares, and multiple OSes accessing the same directory on a network share at a time is the norm.

--- End quote ---

But you'd not usually expect somebody to be working on the same files on a (Windows or other) server and on client systems connected to it.

Not an easy one to sort out, particularly in a cross-platform way.

MarkMLl

Nicole:
@Mark
misunderstanding:

Win 10 does not use Lazarus or the IDE, but the software, which is written by it.
The Win 7 VM is the "backstage", which generates and repairs the software, which is in test by everyday use by a direct call under Win 10.

So if you repair a running car, - this is no good idea.
Nevertheless, it sometimes happens by mistake.

Navigation

[0] Message Index

[#] Next page

Go to full version