0

I am using C++ Builder XE3.

Most of the time, the Beyond Compare utility embedded in XE3 works without any problems, but it gets into a mode where it can't open the temp file associated with the buffer. It shows the "File Not Found" message, then the path to the temp file.

It will work if I save the file, but as soon as I make any changes, it gets lost again. Shutting down Builder and cleaning out the temp directory is of no help.

Any ideas how to stop this random like behavior.

user5108_Dan
  • 379
  • 1
  • 9
  • If it cannot find the file then it cannot find the file. Did you verify that the file actually exists? Have you tried using [SysInternals Process Monitor](https://technet.microsoft.com/en-us/sysinternals/bb896645) to verify that Beyond Compare is actually checking the correct path, despite what its error message says? – Remy Lebeau Aug 19 '15 at 01:04
  • When it fails, BC is looking for a numbered file, like BC591, but the temp directory only contains a file like BC590, off by 1. That part is clear. The problem is that this behavior is random, and once it gets into this mode, I have no idea how to get it out of this mode. – user5108_Dan Aug 19 '15 at 09:23

1 Answers1

2

Make sure you call bcomp.exe for diffs and merges.

This opens every compare and merge in a separate helper process, allowing the launching program to detect when the comparison is complete.

If you use bcompare.exe, it opens all comparisons in a single process, so the launching program can't detect when the comparison is complete if you launch more than one diff. This usually results in the launching program cleaning up temp files prematurely and a file not found error.

Chris Kennedy
  • 2,639
  • 12
  • 11
  • OK, but how does this allow me to compare the buffer with the file? That is what I am usually interested in. Am I missing something? – user5108_Dan Aug 19 '15 at 19:03
  • Most applications save the buffer as a temp file, then have the external diff tool open the temp file.If you already have Beyond Compare open and call bcompare.exe, the new comparison is passed on to the existing process, the calling application thinks the comparison is complete, then cleans up the temp file. This causes the file not found error because the temp file no longer exists when Beyond Compare attempts to open it. A separate bcomp.exe is opened for each tab or window, so temp files aren't cleaned up until the tab or window is closed. – Chris Kennedy Aug 25 '15 at 22:00
  • I should explain that my expertise is in electronics and numerical algorithms, not software, so I don't always understand this software stuff. I don’t have multiple comparisons running, and even if I shut down and restart Builder (and BC), I continue to have the problem. Eventually the problem goes away by itself, and then it may take 2 months to resurface. This isn’t a show stopper, just a nuisance. My work around has been to paste the buffer into my own temp file, and feed that to BC. I was hoping someone else had seen this behavior and knew the trick to stop it. – user5108_Dan Aug 27 '15 at 13:58