Page 1 of 1

ExamDiff Pro 9.0 don't recognize changed files

Posted: Fri Apr 20, 2018 12:24 am
by Gomez
Hi there,

I use Visual Studio 2017 as programming environment.
When I change and save a file with Visual Studio while I also compare it with ExamDiff Pro, I dont get a notification that something has changed.
I have to recompare the file with ExamDiff Pro to get the new version.
The mainproblem is if I save in ExamDiff Pro I risk to loose changes If I dont recompare first.

If I change the file with notepad, ExamDiff Pro gives me a warning that the file has changed.
If I change something with ExamDiff Pro Visual Studio recognize the changes an gives me a warning.

As attachment I added a screenshot of my settings, but I don't think thats the problem.
Someone has an idea whats the cause of this problem?

Greetings,
Gomez

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Fri Apr 20, 2018 2:08 am
by AlexL
Could it be that at least one of the compared files (or both) is/are located on network drives?

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Fri Apr 20, 2018 3:03 am
by Gomez
Yes the second file is on a network drive.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Fri Apr 20, 2018 3:25 am
by AlexL
Then you are lucky, because you get the correct picture at least after you re-compare. In my corporate network, even after recomparing several times, I sometimes still see the old picture, so I have to relaunch the viewing S/W (ExamDiff Pro in our case). This is probably because of some over-caching in the corporate network configuraion (in my case). In your case it could be something other, but you can try to complain to your network administrator. Of course, I don't fully eliminate possibility of bug in any S/W including EDP, but I doubt that it's EDP's fault.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Fri Apr 20, 2018 3:46 am
by Gomez
Sorry, I think I didn't express myself well.
The file on which I'm working on is saved local on my pc, just the "compare file" is on a network drive.
So ExamDiff Pro don't notice that the local file was changed.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Fri Apr 20, 2018 8:31 am
by psguru
I just tested with VS 2017, and EDP did get change notifications.
If I change the file with notepad, ExamDiff Pro gives me a warning that the file has changed.
If I change something with ExamDiff Pro Visual Studio recognize the changes an gives me a warning.
You need to test one more scenario: use some other editor that can track changes, e.g. Textpad, and see if it gets it after a change in VS. In any case, I'm not sure what can be done about this as, even in your own experiment, EDP could get change notifications from Notepad.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Sat Apr 21, 2018 3:46 am
by JeremyNicoll
I've never used Visual Studio, so know nothing about its configuration options. But it's hard to see how this could happen unless VS is deliberately not updating file date- and time-stamps when it saves a file. Is there any config option that affects that? Or, maybe, it's saving changed files under a temporary name then renaming the old and new files?

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Sat Apr 21, 2018 3:51 am
by AlexL
I'm not sure that it's file timestamp. I suspect that it's MS Windows API mesasge WS_FILE_SYSTEM_CHANGED (or something like this) which is sent to all running Win32+ applications when something is written to disk (at least, to local disk), regardless of directory entry which holds timestamps.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Sat Apr 21, 2018 5:20 am
by JeremyNicoll
> I'm not sure that it's file timestamp. I suspect that it's MS Windows API mesasge ...

But why would VS not just use standard file services to write a change to disk, and then the OS do whatever it normally does to tell other apps about that? If a message is involved.. is the the OP using any Message-intercepting code - WinSpy or any of the automation products like AutoHotKey? - can they interfere with Message propagation?

Does VS hold the file that's being edited open throughout the edit session, or open it, read it and close it at the start, then open it again for each write? And would that make any difference anyway?

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Sat Apr 21, 2018 7:37 am
by psguru
AlexL wrote: Sat Apr 21, 2018 3:51 am I'm not sure that it's file timestamp. I suspect that it's MS Windows API mesasge WS_FILE_SYSTEM_CHANGED (or something like this) which is sent to all running Win32+ applications when something is written to disk (at least, to local disk), regardless of directory entry which holds timestamps.
FYI, EDP uses ReadDirectoryChangesW API to receive change notifications.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Tue Apr 24, 2018 6:32 am
by Gomez
I don't use any Message-intercepting code.

I opened one file with Visual Studio, Notepad++ and ExamDiff Pro:

-Edit the File with Visual Studio:
Notepad++ recognize it
ExamDiff don't recognize it

-Edit the File with Notepad++:
Visual Studio recognize it
ExamDiff recognize it

-Edit the File with ExamDiff:
Visual Studio recognize it
ExamDiff recognize it

But I can live with this "bug" (if it is one) so even if you find no solution, thanks for your help!

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Tue Apr 24, 2018 2:40 pm
by psguru
We'd work on this if only it was reproducible here. If you are very curious, try the tool from https://www.codeproject.com/Articles/95 ... angesW-all (you only need the sample executables) and see if (and what) it catches after saving a file in VS17.

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Tue Apr 24, 2018 11:18 pm
by Gomez
At first the File ykqvnj5v.uug~ gets added an modified two times, the rest u can see in the screenshot.

I just noted that if I creat a new project on my C:\ drive and change it with Visual Studio EDP gets the change. Just my "work project" which is on the D:\ drive gets not recognized if i change it with Visual Studio (with notepad the change gets recognized).

EDP is installed at my C:\ drive

Re: ExamDiff Pro 9.0 don't recognize changed files

Posted: Thu Apr 26, 2018 12:38 pm
by psguru
Gomez wrote: Tue Apr 24, 2018 11:18 pm I just noted that if I creat a new project on my C:\ drive and change it with Visual Studio EDP gets the change. Just my "work project" which is on the D:\ drive gets not recognized if i change it with Visual Studio (with notepad the change gets recognized).
Thanks, this was the key piece of data. For some reason VS saves files differently on C: drive vs. D: drive (or, perhaps, any non-C: drive). On D: drive it never sends "File Modified" notification for the file itself. We'll make a change to handle this in the next build of 10.0.