ExamDiff Pro 9.0 don't recognize changed files

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
Gomez
New Member
Posts: 5
Joined: Thu Apr 19, 2018 11:53 pm

ExamDiff Pro 9.0 don't recognize changed files

Post 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
Attachments
Screenshot of my settings
Screenshot of my settings
ExamDiff Pro.PNG (49.24 KiB) Viewed 13141 times
AlexL
Expert Member
Posts: 126
Joined: Wed Aug 11, 2004 6:25 am
Location: Israel
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post by AlexL »

Could it be that at least one of the compared files (or both) is/are located on network drives?
Gomez
New Member
Posts: 5
Joined: Thu Apr 19, 2018 11:53 pm

Re: ExamDiff Pro 9.0 don't recognize changed files

Post by Gomez »

Yes the second file is on a network drive.
AlexL
Expert Member
Posts: 126
Joined: Wed Aug 11, 2004 6:25 am
Location: Israel
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
Gomez
New Member
Posts: 5
Joined: Thu Apr 19, 2018 11:53 pm

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
User avatar
psguru
Site Admin
Posts: 2103
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
psguru
PrestoSoft
JeremyNicoll
Expert Member
Posts: 100
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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?
AlexL
Expert Member
Posts: 126
Joined: Wed Aug 11, 2004 6:25 am
Location: Israel
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
JeremyNicoll
Expert Member
Posts: 100
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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?
User avatar
psguru
Site Admin
Posts: 2103
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
psguru
PrestoSoft
Gomez
New Member
Posts: 5
Joined: Thu Apr 19, 2018 11:53 pm

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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!
User avatar
psguru
Site Admin
Posts: 2103
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
psguru
PrestoSoft
Gomez
New Member
Posts: 5
Joined: Thu Apr 19, 2018 11:53 pm

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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
Attachments
Unbenannt.PNG
Unbenannt.PNG (9.53 KiB) Viewed 13085 times
User avatar
psguru
Site Admin
Posts: 2103
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: ExamDiff Pro 9.0 don't recognize changed files

Post 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.
psguru
PrestoSoft
Post Reply