Thumbnail view freezes on 43'' monitor

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

I can no longer reproduce the blinking icons and the thumbnails not shown for the files in the bottom of the file panel.

I don't know whether it is due to this:
history.txt wrote:09.10.23 Fixed: Thumbnails view: Dynamically increase number of images in cache when there are more images shown than cached (32/64)
or this:
history.txt wrote:11.10.23 Fixed: Thumbnail view: Memory leak in internal thumbnail load function from JPG thumbnails (32/64)
or both.

EDIT - after testing this, I encountered this in my TC 11.02rc2 x64: https://tcmd.madsenworld.dk/duplicatebuttonbar.png where you can see that the buttonbar is duplicated and the background in both buttonbars is white. At this point TC was frozen (didn't react to either mouse or keyboard) and had to be restarted.

I have been able to reproduce the freeze. I am i Branch view in the right side with the thunbnail view, to get enough pictures to test with. the rest of my settings are as described earlier, and the thumbnail zoom factor is 50%.

The freeze happen after I have been scrolling up and down in the right side with the images for a while, and I then go to the left panel and start navigating there.


More peculiar - I had a 32bit TC running while I has doing the thumbnail testing in my 64bit TC, and after the freeze of the 64 bit TC, the 32bit TC suddenly looked like this: https://tcmd.madsenworld.dk/corrupttc.png - it got fixed again after minimizing the window.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *ghisler(Author) »

Sorry, I cannot reproduce any kind of freeze. I need step by step instructions to reproduce it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

I need step by step instructions to reproduce it
It can be difficult and also screen size etc. have an impact. I will try later.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

Here is how I can reproduce it:

Use these ini settings:

Code: Select all

[Configuration]
ThumbsLocation=F:\Thumbs
ThumbsCopyDel=1
ThumbOptions=15
ThumbGdiplusTypes=*.jpg *.dng *.crw *.arw *.cr2 *.cr3 *.nef *.orf *.pef *.raf *.rw2
ThumbPlgTypes=*.* | *.jpg *.avi *.mp3 *.mp4 *.wmv *.mov *.mpeg *mpg *.m4v
ThumbExplTypes=*.jpg *.avi *.mp3 *.mp4 *.wmv *.mov *.mpeg *mpg *.m4v | *.htm* *.lnk
ThumbIrfXnTypes=*.*
ThumbTxtTypes=*.txt *.ini *.mnu *.inc *.lng *.htm*
ThumbsCustomFieldsEnabled=1
ThumbsCustomField=[=tc.writedate.D-M-y]  [=tc.size.bkMG]\n[=shelldetails.Dimensioner]
ThumbWidthNoCache=128
ThumbHeightNoCache=72
ThumbIconSize=32
PreloadThumbnails=2
ThumbnailPrealloc=100000
ThumbnailMemoryLimit=500

[Colors]
ThumbnailFrame=-1

[ThumbsCustomField]
0exts=*.jp* *.gif *.png *.bmp *.tif *.wdp *.heic *.ico
0fields=[=tc.writedate.D-M-y]  [=tc.size.bkMG]\n[=shelldetails.Dimensioner]

[Layout]
DriveBar1=1
DriveBar2=1
DriveBarFlat=0
InterfaceFlat=0
DriveCombo=1
CurDir=1
TabHeader=1
StatusBar=1
CmdLine=1
KeyButtons=1
HistoryHotlistButtons=1
DirectoryTabs=1
XPthemeBg=0
BreadCrumbBar=1
TabHeaderThemed=0
TabHeaderBoldArrow=1
DarkListBorders=1
ButtonBarVertical=1
ButtonBar=1
I maximize TC's window (1920x1080 screen), I use no Scaling in neiter Windows not TC, I use Microsoft Sans serif,8,b in the file panels

Thumbnail size is 128x72
I set the thumbnail zoom to 50%

With these settings my TC looks like this: https://tcmd.madsenworld.dk/thumbstest.png

I use a picture folder with 131 subfolders in Branch view and the file mask set to *.jpg only, which gives 19737 files.

I activate the Thumbnail view for this branch view and scroll up and down both with PgDn/PgUp and the mouse wheel. after a few seconds TC freezes (doesn't react to keyboard or mouse in the file panel. Sometimes I have to go to the opposite panel and navigate between directories before it happens.

Sometimes after the freeze if I take focus away from TC and put it back the whole TC window gets gray: https://tcmd.madsenworld.dk/crachedtc.png

I can close the frozen window with the rd X button. If I use my restart button (cm_Exit 9) TC just shuts down without restart.

I can reproduce it with a clean ini file if I add PreloadThumbnails=2 to the ini file, and set the thumbnailsize to 128x72.

I tried to remove these two settings from my work copy:

Code: Select all

[Configuration]
ThumbsCustomField=[=tc.writedate.D-M-y]  [=tc.size.bkMG]\n[=shelldetails.Dimensioner]

[ThumbsCustomField]
0exts=*.jp* *.gif *.png *.bmp *.tif *.wdp *.heic *.ico
0fields=[=tc.writedate.D-M-y]  [=tc.size.bkMG]\n[=shelldetails.Dimensioner]
But that did not make any difference.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

I have narrowed it down to this ini file: https://tcmd.madsenworld.dk/thumbstest.zip

Start TC with the thumbstest.ini file
Navigate to a picture folder with a lot of jpegs in the right side.
If the pictures mostly are located in subfolders, activate Branch view.
Activate Thumbnail view for the right side.
Scroll fast up and down with the mouse wheel, and the scroolbar. It seems important to go all the way back to the top once in a while. Try also to navigate in the folders in the left side in between.
Here the freeze usually occurs after doing this for 20-60 seconds.

I can reproduce it with both 64bit and 32bit TC under Windows 7.


Since it could be a video card / video driver problem, I tested it on my second screen that uses another video card/drivers.
My second screen is only 1280x1024, so I lowered the zoom factor to 40%, and I could then also reproduce it on this screen.

I have 14 GB installed RAM, so that should not be a problem
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

Ihave now tested it under Windows 10 with the same ini-file, here on a laptop with a 1366x768 screen, so I tried with both 40% and 30% zoom factor, but I have still not been able to reproduce the freeze.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *ghisler(Author) »

Unfortunately to fix this problem I had to make some very significant changes to the caching of thumbnails:
Until now, TC was saving the bitmap (GDI object) of the thumbnail for each entry, and discarded it when there were too many. This wasn't a big problem until now, but with the option to zoom and very big screens it can become a problem because the number of GDI objects a program can allocate is limited.

In TC3, I'm now extracting the bitmap data (as a big byte buffer) just like when I write it to the disk cache, but keep it stored instead of the bitmap objects. To draw a thumbnail, I then briefly recreate the bitmap, draw it, and immediately release it again. This way the number of cached thumbnails can be much higher, limited only by the available memory.

To avoid overloading the memory, I'm currently limiting the combined size of all cached thumbnails to 500 MByte AND to 1/10 of the installed RAN, whichever is smaller. I have also worked on the function which deletes thumbnails when the allowed memory is exceeded.

Finally, I'm also using my own internal message queue now to send icons, thumbnails, folder sizes etc. from the extract threads to the main window. This is done to avoid that the windows message queue gets flooded with messages, which could result in lost icons or thumbnails.

I'm aware that these changes may lead to new bugs, but it was really inevitable to make these changes, otherwise there wouldn't be a way to get rid of these low resource hangs. Therefore please test the changed thumbnail function extensively.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

The problems seems to be fixed with this new thumbnail caching scheme.

The history says:
history.txt wrote:17.10.23 Fixed: Thumbnail view: Ignore the value of ThumbnailMemoryLimit on NT based systems. Instead use new value ThumbnailSizeLimit, which limits the size (in Megabytes) the thumbnails are allowed to take (min 1 MB, max 1 GB, limited to max 10% of physical memory) (32/64)
The Help says:
Help wrote:ThumbnailSizeLimit= Maximum size in Megabytes the loaded thumbnails may take in memory (default: 20MB in Win9x/ME, 500MB on Windows NT/2000/XP and newer, max. 10% of total installed RAM).
The Help does not mention a 1GB limit only the 10% limit.

If I want to use 1GB should I then write ThumbnailSizeLimit=1000 or ThumbnailSizeLimit=1024 :?:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *ghisler(Author) »

The minimum of 1 MB isn't mentioned in the help either.
If I want to use 1GB should I then write ThumbnailSizeLimit=1000 or ThumbnailSizeLimit=1024
The maximum supported is 1024.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Thumbnail view freezes on 43'' monitor

Post by *Hacker »

Christian,
I agree with petermad that the supported values should be documented.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

ghisler(Author) wrote: 2023-10-19, 08:49 UTC The minimum of 1 MB isn't mentioned in the help either.
That too - should be mentioned in the help.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *ghisler(Author) »

OK, I will add them to the help.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *ghisler(Author) »

I have added the minimum and maximum to the help description, please verify it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Thumbnail view freezes on 43'' monitor

Post by *petermad »

I have added the minimum and maximum to the help description, please verify it
Confirmed added in TC 11.02rc4 :-)

Moderator message from: petermad » 2023-10-25, 18:10 UTC

Moved to "TC fixed bugs" from "TC11.x bug reports (English)"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Thumbnail view freezes on 43'' monitor

Post by *Hacker »

Christian,
ThumbnailSizeLimit= Maximum size in Megabytes the loaded thumbnails may take in memory (default: 20MB in Win9x/ME, 500MB on Windows NT/2000/XP and newer, min. 1MB, max 1GB and max. 10% of total installed RAM).
If the options only accepts the number as MB, I'd suggest writing 1024MB as the maximum, otherwise people won't know - should they write "1GB"? "1"? "1000"? "1024"? "1024MB"?

Myself I originally thought the maximum should be written as 1000MB (but then you wrote it's 1024MB), so I guess it's easy to be confused.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply