Strange text in file history and slow closing of IMatch

Started by Mees Dekker, December 22, 2020, 04:44:13 PM

Previous topic - Next topic

Mees Dekker


Since a couple of days, I noticed that in the file history some strange messages appear (like <StackPanel HorizontalAlignment...>. See screenshot. It is only present on a number of files that I copied from one folder to another (both folders are monitored by IMatch, copying was done inside Imatch)

Don't know exactly when this started, but to me it seems that it began after installing the new dashboard. Deleting the dashboard and resetting did not result in any change.

I also noticed that Imatch performs slower than it used to do. Not sure whether this has anything to do with the history panel, but it started at the same time. Especially when closing IMatch I get the message: "waiting for background operations to complete", even when the database was idle at the time of stopping. Eventually IMatch will ask for P&G to run. Also database diagnosis is very slow to start (much slower than it used to be).

I attached both a normal log file, and a debug log file as well.

No other changes to my system (DELL workstation 7820, 12 cores, 24 logical cores) or workflow.


Mario

This looks like something in the file name / path is breaking the XAML markup in the History Panel for some reason.
Please provide the name and folders of the affected files (select the file in a file window and then do Ctrl+C to copy the file name into the Windows clipboard).

The BACKUP log shows just some runs of the database diagnosis, nothing unusual.
In the other log IMatch reported an exception / crash while scanning a folder while the database was shutting down.
I have seen this a couple of times when file system requests made by IMatch (e.g. reading a file via a WIC codec or similar) were prolonged or even blocked by a virus checker.
The file system call never returned and IMatch, after running into several time-outs, had to shut-down the process. All this happens while IMatch is shutting down normally.
This would also explain why IMatch is shutting down slow - it waits for file system calls or similar to return until a timeout expires...

Did you make any change to the system recently?
Does the anti-virus reports something?
Is IMatch an exception in the AV?
Anything special about the files in the folders last processed (search the attached log for CIMEngine5::AddOrUpdateFolder to find the folder names).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

Hi Mario

here is the path and name of 1 of the affected files. All files in this folder are affected.

P:\Foto's\Privé\2018\2018-02 Antarctica\5 Boeken\5c Tecco\0101 S&R Antarctica (03689).jpg

I searched for anything special in the folders last processed: nothing special.

However: I also found a lot of references to 'V:\develop\IMatch5\src\ptpicore\PTPlugInManager.cpp(808)'. In Windows Explorer, I don't see any V: drive.

I used to have the developer mode set to "on" (probably to have the resource manager in my menu's for translating Imatch), but switched that to "off" because of a discussion about the version of IMatch. See : https://www.photools.com/community/index.php?topic=10864.0

sinus

Maybe this & ?

Only a shot in the dark, Mario does know it better.
Best wishes from Switzerland! :-)
Markus

Mario

The & is probably the problem.
The V: drive refers to a virtual environment on my system, so this is OK. It just allows me to know exactly what is where and where to look for problems logged.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

You are probably right, because only the copied files that have a & in their name, show these unexpected messages.

However: it is still unclear to me how this & can be the problem. These files are copies of files with exactly the same filename, but these are stored in a different folder for the last 2 years. Never any problem occurred until recently. And I have lots of files that contain a &.

It seems that now all files that contain a & have this problem. Something must have changed in either Windows or the way Imatch handles these filenames. Any files with this & in their name, take forever to be rescanned.


Mario

The & has a special meaning for XAML markup. IMatch must 'escape' &'s when they are contained in text before processing the text to XAML.
It seems that the History Panel does not do that yet - which makes the XAML markup invalid and you see the plain XAML instead of the properly formatted text.
No big deal, I will fix this for the next regular release.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

Hi Mario,

would be great if this XAML markup problem could be fixed. Thanks in advance for the swift replies.

Will that also fix the very slow rescanning of files and the very slow shutdown of the database or should I look further?

Mees

Mario

This is totally unrelated.
My bet would be that something is freezing IMatch during file system access and the #1 reason for this is the virus checker.
Maybe ExifTool or the WIC codec gets "stuck" and IMatch has to wait until the timeout is reached, and this causes the avalanche of errors and delays during shut-down.
We need more info, debug logging etc...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Please open a new bug report for the shut-down issue as needed.
I have fixed the strange text display for file names / paths containing a & in the History panel and upgraded this post to a bug report.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

Hi Mario

Thank you so much for fixing this & item so quickly, even Christmas does seem to interfere with your excellent service  :)

I'm glad the strange messages did indeed disappear. All is back to normal. And what is even better: the very slow database performance also is back to its normal speed.

Before version 2020.2.2/2020.12.4 I never had this problem with the & (and the slow speed) and I would certainly have noticed it, since I do use the history panel a lot and these files have been around for some 2 years. I did not change any settings in my virus checker (Windows Defender) and the entire IMatch folder is excluded from virus checking.

So contrary to what you said : that the slow speed and the & problem are totally unrelated; I still think that there must have been some relation. The & problem was introduced at the same time the slow speed occurred (version 2020.12.2/202.12.4) and also they both disappeared after you fixed the & problem. Could it be that most users never noticed this because they don't  use & in the filename?

So: whatever caused the problem to appear some weeks ago, it is gone now but I strongly suspect a relation between the two.

Thanks again and best regards,

Mees

Mario

I have no idea.

As far as I can tell from the source code of the History Panel, this "&" issue was there for a long time.
It only
a) affects history entries which display file names (move, copy) and only when
b) an & is contained in the file name somewhere and
c) the details option in the History Panel is on

which also explains why this has not been reported before.

I have no idea how this impact the performance so badly. Even if the XAML parser went totally nuts while parsing the invalid syntax (due to the X) and spent a second to parse it, there are only a few entries in the history panel. I did not notice any slow-down during my test to reproduce this. But, as always, computers sometimes work in strange ways... ;D
The important bit is that you can now work normally again.

Usually I don't work/ship over Christmas, but the bug with the disabled source file name pattern input field was too critical.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

Take some rest now and stay healthy.

Hope 2021 will be good for you and all IMatch-users :)

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook