0

I'm using parallels VM and recently had my code in Dropbox contained within the VM. Dropbox was quite problematic in that it is really slow if you have a lot of files. Since Parallels happily shares folders from the HOST, and one of those folders is the HOST Dropbox folder, I started using that drive (essentially \mac\Dropbox mapped as W:). All goes well, the VM is much faster and I can easily access the pas/dfm files.

HOWEVER, when I build the project, the compiler complains that it cannot find DFM files (eg. about.dfm, login.dfm etc). The various DFM files are all there and the compiler complains of different DFM files, ie. one build it will be login.dfm and about.dfm, the next it will complain it cannot find Waiting.dfm. All of the DFM files are there, readily editable in the IDE.

The only thing I could try, other than constantly trying to build the project, was to put the path of the project into the library. This made no difference.

In another project the compiler cannot find the project resource (res) file. And, of course, that file is also there.

[dcc32 Error] E1026 File not found: 'EMPSecureInitialize.res'
[dcc32 Error] E1026 File not found: 'EMPSecureInitialize.res'

[dcc32 Error] E1026 File not found: 'About.dfm'
[dcc32 Error] E1026 File not found: 'Login.dfm'
[dcc32 Error] E1026 File not found: 'EMPSecureSlideShow.dfm'
[dcc32 Error] E1026 File not found: 'About.dfm'
[dcc32 Error] E1026 File not found: 'Login.dfm'
[dcc32 Error] E1026 File not found: 'EMPSecureSlideShow.dfm'

Projects with the source on a local drive, build without issue. Projects with source on a network (Parallels Host) drive arbitrarily do not find DFM or RES files. Those files are always and readily found when using the IDE, ie. click Design and the form appears.

I could understand if this was a consistent fault, but it is not 100% repeatable, sometimes the build works as expected. Is there some sort of weird timing or path construct that the compiler uses?

Kevin Black
  • 119
  • 1
  • 10
  • There are so many huge components involved in your scenario that it will be really hard to reveal the culprit. I don't think that DropBox is a proper platform to host source code. Why don't you just use some cloud-based source control like [GitHub](https://github.com/) or [BitBucket](https://bitbucket.org/)? – Peter Wolf Aug 13 '19 at 23:39
  • @PeterWolf Sure there are other options, but using Dropbox (on the host) means I can get to the files easily (they are local on the HOST) and there is versioning as well as the SVN repository that is kept there. It seemed like a simple solution (and with minimal changes) to avoiding Dropbox Thrashing every time I start my dev machin. Regardless, I take your point and will try some other cloud storage medium. – Kevin Black Aug 14 '19 at 00:51
  • There may be some sort of limitation on the number of remote files you can have open at a time via the mapped drive. If I recall, shared folders have an option to control number of concurrent connections. – Jerry Dodge Aug 14 '19 at 00:58
  • 2
    Solution will start with getting rid of dropbox – David Heffernan Aug 14 '19 at 05:33
  • Sorry to ask an obvious question but when the compiler complains that it can't find xxx.DFM, have you checked that it is physically present in the same folder as the corresponding xxx.PAS file? I'm asking because I'm not sure what you mean by "The various DFM files are all there". – MartynA Aug 14 '19 at 09:04
  • I had a similar problem and solved it by ensuring my network drive was mapped under both my user account and admin account (Win10 VM using Fusion). – John Easley Aug 14 '19 at 20:13
  • @MartynA Yes, what I mean is that all of the DFM files and RES files that the compiler complains about being missing are physically there. And they are usable so in the IDE if I go into Design mode I can amend the forms adding components and changing properties. – Kevin Black Aug 15 '19 at 00:34
  • @JohnEasly the Drive is mapped using the Sharing option in VM configuration for Parallels. I assume permissions are handled by Parallels. I don't have any option (in that process at least) to change any of the underlying permissions. – Kevin Black Aug 15 '19 at 00:36
  • And as noted in my later comment, with Dropbox stopped on the Parallels HOST and accessing the folder via the Parallels mapped HOME folder (which is \\mac\Home) then I can access the Dropbox folder directly (\\mac\Hone\Dropbox). If I then try to build the application using that path, I am still getting the fairly arbitrary ...Cannot Find xxxxx.DFM. So it seems to me the issue is not with Dropbox as suspected, but has something to do with Parallels drive/folder mapping. That is not something I am going to solve so I will go with my OneDrive Local solution. – Kevin Black Aug 15 '19 at 02:03
  • @KevinBlack the share is mac partition? That could have something to do with it.. – John Easley Aug 15 '19 at 17:55
  • @JohnEasley, possibly though if I replicate the process using shared oneDrive folder (on macOS) rather than the Dropbox folder it seems to be OK which tends not to support your claim. Further, if I physically stop Dropbox on the HOST, I still get the issue which would support your claim that it has something to do with macOS. So essentially I have no idea. I will use the files locally within the VM and replicate to a cloud system later. – Kevin Black Aug 16 '19 at 00:24
  • @KevinBlack strange. I've used Dropbox for a quick code repos for personal projects and I've never had a problem.. If you are still working towards a solution, then maybe try using Process Explorer to see what's going on behind the scenes, but if you're happy with oneDrive, then let's drop it.. – John Easley Aug 16 '19 at 01:26
  • @JohnEasley Thanks for the input. I'll drop it on the basis I think I/we could disappear down a rabbit hole for not much benefit. The OneDrive solution is working. It certainly replicates much faster than Dropbox, but that's probably because it is nowhere near as populated. Again, thanks for your input. – Kevin Black Aug 17 '19 at 00:40

1 Answers1

0

While it is practically impossible for anyone to reproduce your precise environment to reproduce this issue, I have a very strong feeling the issue is with a limitation in the number of concurrent files that can be opened at a time. At least on Windows, when a folder is shared, it has the ability to control the number of concurrent connections.

Imagine how the compiler works. It needs to open numerous files rapidly to read their contents and build DCUs out of them. First, the PAS files are loaded. Then, those which depend on additional files, such as DFM or RES files, get those loaded. Then all gets linked together to produce an output. That's a lot of files the compiler needs to open at the same time.

So there's likely a way to control and increase the number of concurrently open files through the Parallels virtualization. This doesn't seem to be an issue with Dropbox.

Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
  • Well if the files are in the same VM and local, it works fine and has worked fine for a number of years. This problem only arises when using the shared (Dropbox) folder. I tried to repeat the same building issues using a OneDrive folder, ie. in the same way this was shared by the Host with the VM. It worked fine, there were no DFM or RES files it could not find. TBF the Dropbox files on the host are significantly more, but they are not being accessed in the build. The build environments were copied one to the other and were identical. It's looking like a Dropbox issue. – Kevin Black Aug 14 '19 at 06:20
  • Sorry, Jerry, but I'd be very surprised indeed if it is anything whatever to do with any limit on the number of current open files. It's easy to test: just invoke the compiler manually from the command line and use your tool of choice to watch the number of open files. My guess is that it's a DropBox quirk. – MartynA Aug 14 '19 at 09:10
  • @KevinBlack What happens if Dropbox isn't currently running? – Jerry Dodge Aug 14 '19 at 19:17
  • @JerryDodge There is an issue with stopping Dropbox on the HOST. Because the sharing is done using Parallels VM Configuration->Sharing, if Dropbox is not running on the HOST then it does not map the drive on the guest. An option would be to map the drive myself, but even though shared, I cannot see the folder on the guest. With Dropbox stopped on the HOST and accessing via the HOME folder (as in Home:\Dropbox) I still get the DFM files not found. So it appears to be an issue with Parallels sharing rather than Dropbox. I am tempted to simply use the folder in local onedrive, that seems to work. – Kevin Black Aug 15 '19 at 01:59
  • @KevinBlack That's what I was suspecting. It could be Dropbox itself put some limitation. Even when it's disabled, its "rules" are left behind. I'm not too familiar with sharing via MacOS, but I do a lot of sharing on Windows networks, including mapped network drives, and have seen issues related to hitting concurrent limits. It could even be HDD related. – Jerry Dodge Aug 15 '19 at 02:30
  • @KevinBlack I'd also advise not to use any of those cloud solutions for your code. I tried that once a long while back, and while I don't remember what it was that I had problems with, it was enough for me to never try it again. Use an appropriate system for that which is meant for the purpose, such as GitHub. – Jerry Dodge Aug 15 '19 at 02:33
  • @JerryDodge, Yes sound advic. The cloud systems seem to create more issues than they solve. I will indeed look at GitHub as you suggest. – Kevin Black Aug 15 '19 at 06:26