[Bug] ImageLists are slow and buggy
[Bug] ImageLists are slow and buggy
Drawing multiple 16x16 icons results into some icons being drawn wrongly (different icon from ImageListID gets used, or no icon at all).
question := (2b) || !(2b) © Shakespeare.
Re: [Bug] ImageLists are slow and buggy
code example? screenshot? :O
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: [Bug] ImageLists are slow and buggy
MasterScript.ahk navigate to a folder with multiple .ahk scripts on 1st tab and watch top right LV.
question := (2b) || !(2b) © Shakespeare.
Re: [Bug] ImageLists are slow and buggy
I followed your instructions and did not see any problems.
Why did you claim they are slow?
All of the actual work - creating the ImageList, adding icons into it, storing the image number for each ListView item, and drawing the icons - is done by MS code. AutoHotkey just passes the icon numbers you give it in LV_Add/LV_Modify to the ListView API.
Why did you claim they are slow?
All of the actual work - creating the ImageList, adding icons into it, storing the image number for each ListView item, and drawing the icons - is done by MS code. AutoHotkey just passes the icon numbers you give it in LV_Add/LV_Modify to the ListView API.
Re: [Bug] ImageLists are slow and buggy
try to navigate back and forth in the treeview at left between 2 folders with ~10-20 ahk scripts each.
You'll notice that listview at left sometimes gets list items without an icon.
Well, I don't know the internals, maybe it's MS's code is so buggy/slow.
You'll notice that listview at left sometimes gets list items without an icon.
Well, I don't know the internals, maybe it's MS's code is so buggy/slow.
question := (2b) || !(2b) © Shakespeare.
Re: [Bug] ImageLists are slow and buggy
Critical seems to help, at least I could not reproduce it with Critical:
Code: Select all
FolderTree: ; TreeView's G-label that should update the "FolderTree" TreeView as well as trigger "FileList" ListView update.
Critical
Re: [Bug] ImageLists are slow and buggy
Well, for me critical didn't help and I still could reproduce the issue:HotKeyIt wrote:Critical seems to help, at least I could not reproduce it with Critical:Code: Select all
FolderTree: ; TreeView's G-label that should update the "FolderTree" TreeView as well as trigger "FileList" ListView update. Critical
As you can see in the listview at right some rows are missing icons.
question := (2b) || !(2b) © Shakespeare.
Re: [Bug] ImageLists are slow and buggy
The problem doesn't occur on my Windows 7 system.
It does occur in my Windows XP virtual machine - some icons appear momentarily and then disappear, one by one (but very quickly). I confirmed via SendMessage that the correct image index had been set. Setting "Icon1" again for all items after a delay appeared to work around it.
I did not see any item receive the wrong icon.
Anyway, I think it would be more accurate to say that ListViews have occasional problems rendering icons (in this script on some systems at least). I doubt it has anything to do with the ImageList.
It does occur in my Windows XP virtual machine - some icons appear momentarily and then disappear, one by one (but very quickly). I confirmed via SendMessage that the correct image index had been set. Setting "Icon1" again for all items after a delay appeared to work around it.
I did not see any item receive the wrong icon.
Anyway, I think it would be more accurate to say that ListViews have occasional problems rendering icons (in this script on some systems at least). I doubt it has anything to do with the ImageList.
Re: [Bug] ImageLists are slow and buggy
I think it has something to do with reentrancy caused by notification messages. The icons disappearing on certain items corresponds with an 'I' (item change) notification being received for that row. So some sort of interruption occurs while the item is being added, an item change notification is sent (even though it's a new item), and the icon disappears. I don't know what sort of item change (normally indicated by ErrorLevel), because part way through debugging I've lost the ability to reproduce the problem.
That is to say, the original script now works perfectly on both my Windows 7 system and my XP VM, without having made any changes to either system.
I was also unable to reproduce the problem with Critical, or without AltSubmit, which enables the 'I' notification. Critical negates some reentrancy problems because it prevents the script from checking for messages, particularly if you use Critical 10000 or similar.
Removing AltSubmit or gFileList temporarily while adding items would probably also work around the problem.
That is to say, the original script now works perfectly on both my Windows 7 system and my XP VM, without having made any changes to either system.
I was also unable to reproduce the problem with Critical, or without AltSubmit, which enables the 'I' notification. Critical negates some reentrancy problems because it prevents the script from checking for messages, particularly if you use Critical 10000 or similar.
Removing AltSubmit or gFileList temporarily while adding items would probably also work around the problem.
Re: [Bug] ImageLists are slow and buggy
You didn't, because I cut a single imagelist down to many smaller once. Combine them all together and correct the code to use correct index for icons from IL and you'll get wrong icons being assigned to LV rows as well.lexikos wrote:I did not see any item receive the wrong icon.
Re: [Bug] ImageLists are slow and buggy
Thanks, I'll try thatlexikos wrote:I think it has something to do with reentrancy caused by notification messages. The icons disappearing on certain items corresponds with an 'I' (item change) notification being received for that row. So some sort of interruption occurs while the item is being added, an item change notification is sent (even though it's a new item), and the icon disappears. I don't know what sort of item change (normally indicated by ErrorLevel), because part way through debugging I've lost the ability to reproduce the problem.
That is to say, the original script now works perfectly on both my Windows 7 system and my XP VM, without having made any changes to either system.
I was also unable to reproduce the problem with Critical, or without AltSubmit, which enables the 'I' notification. Critical negates some reentrancy problems because it prevents the script from checking for messages, particularly if you use Critical 10000 or similar.
Removing AltSubmit or gFileList temporarily while adding items would probably also work around the problem.
Re: [Bug] ImageLists are slow and buggy
Neither removing gLabel and AltSubmit from vBookmarksList LV, nor setting critical 10000 to FolderTree label, nor both of these things at once helped.
Re: [Bug] ImageLists are slow and buggy
Forums don't matter: a bug is a bug.
Re: [Bug] ImageLists are slow and buggy
I think you did not understand just me's post.
Recommends AHK Studio
Who is online
Users browsing this forum: ThePeter and 57 guests