files icon indicating copy to clipboard operation
files copied to clipboard

Slow double click on folder in Column View causes unexpected message

Open aral opened this issue 3 years ago • 11 comments

What Happened?

Clicked on a regular folder on my laptop’s main drive.

I see this from time to time. No idea how to reproduce. Clicking on the folder again fixes it

Screenshot from 2022-01-24 12-38-52@2x .

Steps to Reproduce

n/a (see above)

Expected Behavior

This message should never appear during regular use.

OS Version

6.x (Odin)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

aral avatar Jan 24 '22 12:01 aral

The message indicates that something positively cancelled the operation that enumerates the files in the chosen folder rather than the operation failing for some other reason (e.g. non-existent or connection broken). If the operation times out (30 seconds) then a different message should be displayed. Files cancels the operation before closing or reloading the view or after a timeout. There could possibly be a race condition if the folder is loaded twice in quick succession I guess :shrug:

jeremypw avatar Jan 24 '22 12:01 jeremypw

The message given about the server is a fallback message given when the reason for the folder not loading cannot be determined except by showing the system error message.

jeremypw avatar Jan 24 '22 13:01 jeremypw

Not sure if this is related but I noticed that sometimes on startup I get an error in the terminal Directory.vala:686: Error reported by next_files_async: Operation was cancelled and one of the tabs does not reload. This seems to happen with three or more tabs being restored but only for certain folders being focused. I haven't experienced it during use. It is not related to the timeout for loading the files as far as I can see since it still happens when it takes less than a second to load the tabs.

jeremypw avatar Jan 28 '22 17:01 jeremypw

@aral Please could you confirm which view mode you are using when this happens (Grid, List, Column) and how you open the folder (click on bookmark, click on view, click on pathbar, click on breadcrumb context menu etc).

I am going to submit a PR that stops the pathbar cancelling any directory objects it may be using as a tab may be loading files from the same directory. This fixes my issue but I cannot reproduce yours yet.

jeremypw avatar Jan 28 '22 17:01 jeremypw

@jeremypw Hey Jeremy, I believe I was in column view as that’s what I usually use and I likely single clicked but it was a while ago so I don’t remember exactly, sorry (it’s also possible I double-clicked by mistake). Oddly, the screenshot doesn’t show which mode is active.

aral avatar Jan 29 '22 18:01 aral

Thanks @aral, I'll investigate in column view. When the alert view is showing the mode switcher is disabled so does not show which mode is active.

jeremypw avatar Jan 30 '22 09:01 jeremypw

@jeremypw Reproduced it last night (still not every time): column view, double click on folder.

aral avatar Jan 30 '22 09:01 aral

I can reproduce it by double clicking at a particular, intermediate, rate slightly slower than a "true" double click. I think the clicked folder needs to have quite a large number of files in it. A "true" double click will open the clicked folder as the root (leftmost) column whereas two single clicks opens another column (twice). I should now be able to track down where this race is occuring.

jeremypw avatar Jan 30 '22 09:01 jeremypw

The linked PR seems to fix this issue although it turned out to be a more extensive review of directory initialise/reload/cancel than intended. I may have to break it up to have a change of it being reviewed/merged.

jeremypw avatar Jan 31 '22 18:01 jeremypw

Reconfirmed on Horus

jeremypw avatar Mar 08 '23 15:03 jeremypw