-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS X 10.13.4 complete freezes on scrolling and the scrolling is not smooth enough. #1182
Comments
Could you try to reproduce with |
Ran |
FWIW native Kitty image previews are coming in the next release. |
Okay, I dug deeper. The problem reproduced with and without image previews, so I though it had nothing to do with them in first place. So I tried something else. I tried scrolling by repeatedly pushing 'j' key instead of pushing it and not releasing. It seems to me that ranger has something to do with a fast key input (I have mine modified so that the delay between key presses when I don't release the button is really low) so it overflows and stops answering to any command. In kitty I sometimes manage to fix it by switching to another terminal window and then switching back again. So ranger doesn't lag itself, it seems that it just can't handle really fast scrolling by fast input of commands and for some reason stops answering to any if overflown. |
Hmm, could you try a different ncurses application to see if this is something we can fix on our side? |
If you have OS X, you can try memorizing your InitialKeyRepeat and KeyRepeat defaults (to change them back) performing: |
Okay last news. I guess it's both. Both my fast scrolling + file preview buffering. Had a hint, because it stops freezing after I slowly scroll through the whole folder once. Then there are no problems with my fast scrolling speed (despite the choppiness). So I thought there IS some issue with previews at least. If I scroll manually, even pressing fast - everything is okay. If I scroll by not releasing the button - it freezes 100% of times if done the first time after I reopen ranger and try to reproduce without scrolling through the whole folder manually first. It definitely has something to do with fast flow of file previews. It doesn't even have anything to do with images. So temporary solution is to turn off file previews for that not to freeze at all / scroll manually / not scroll at all and use find. |
Tried vifm and enabled right pane as a quick preview pane by this guide: (https://superuser.com/a/455551) for when I scroll through. Despite the fact It previews just pure file code instead of ranger's cool preview of what inside .zip and so on - it doesn't freeze. If vifm is ncursed based (google said it was), then I guess the problem is not with ncursed, or at least not to that extent. |
Could you maybe look into how many tasks are spawned? You can see these in the task_view, opened with |
I tried doing that, but when it freezes - it doesn't respond to any input command. Is there a way to show task view simultaneously scrolling down so I can see if there is anything in task view? |
Right, that is problematic : ). |
Have you tried doing what I suggested with testing it on OS X after modifying KeyRepeat? |
I haven't because the multiple reboots are too much effort to put into this rn : ). I'm not entirely surprised by the issue though, there's been talk about doing proper async for previews so I think if that is implemented then this issue'll be solved too. I'll look into reproducing when/if I start work on this but that's definitely not for the upcoming release. I can imagine this is an annoying issue for you but it's one of those things that's not easy to debug. Consider using more appropriate movements like |
Yeah It's manageable, I can move my way around, thanks. Hope to see image previews on kitty :) |
So this haven't been fixed yet? I encounter same issue. |
It should be somewhat fixed on master, coming in the next release (a better fix would require a much more complicated design with asynchronous execution). For completeness I'm referring to #1193. |
I'm encountering this issue as well, although for me the speed of scrolling through files does not appear related to the cause of the freeze; instead, the freeze occurs more or less randomly on any file that isn't simply pain text. It also occurs regardless of the terminal or shell being used. |
@purgat0ri, next step is finding out what kind of files it happens for. |
@toonn PDF files occasionally, .ooutline files frequently, and images fairly seldom. |
I have the same issue. I'm running iTerm2 build 3.3.1 on Mojave, with ranger running frequently inside of tmux. My key repeat is set to 15, and ranger constantly freezes / locks up, causing me to kill the pane from tmux. Both ranger-1.9.2 and master experience the issue with the same frequency for me. I'd say without a doubt that it's related to ranger spawning arbitrary programs for previewing files. If I take my time and scroll very slowly it doesn't happen. However, as soon as I scroll at my normal pace, ranger freezes. I tested a medium size directory with around 30 mixed file types. I scrolled by holding down "j" and hit "w" to open the task view frequently. After doing this for about a minute, ranger froze up / crashed just as I opened the task view. It contained 9 files queued for preview. There were 3 gzip'd archives, 1 zip file, and the rest were assorted text based files. |
This issue happens to me on Mojave with iTerm2. I noticed that hitting I'm not able to alway replicate the issue, but it has happened enough times that I came googling. |
Tbh this just sounds like sometimes generating a preview is slow. The only easy fix is to disable the previews you don't care about. Please don't "+1" this issue unless you have useful information to add, like which of the programs scope uses to generate previews is most often at fault. |
Did some research on that problem. I rarely get a full freezing, but often encounter with non-quitting processes, and that's kinda annoying. This line explicitly tells that we can send Now I'm trying to localize the problem. I found that the code starts looping endlessly in these lines. The problem encounters when fast scrolling through large files, and when it appears and doesn't freeze ranger, these files can be seen on I suppose there's a deadlock somewhere that happens when preview hasn't been fully loaded & isn't required anymore. Hope I'll succeed in discovering the reason in the next few days. BTW it seems not really useful to load all file content & show preview only after this. There has to be an opportunity for optimization somewhere here. |
Okay, I finally found a bug. Never use hard-coded numbers for signals, they may vary for different platforms (see signal(7), "Signal numbering for standard signals" section). Kinda funny that the bug is 13 years old :) But there's a problem with tests I have no idea how to fix for now: testing breaks for |
Got it, we have to specify 2.x.x version for pylint in requirements.txt . |
@toonn can you review these two fixes, please-please-please? 🙂 They're really tiny and they'll allow OS X users to use ranger without troubles |
Current Behavior
Slow and jagged scrolling in iTerm2 and Terminal.app (actually fast and smooth scrolling in kitty terminal emulator).
When there are many files with .jpg / .png in a folder, on scrolling it randomly freezes forever. Freezes only the ranger process, not reacting to anything. Only process restart helps. Happens frequently but not always. Sometimes it just works fine, but most of the time it freezes on a random file while scrolling. It could be a file with any extension, but most of the times it is images/pdf files when it freezes.
It never freezes when a folder consists only of nested folders or if there are just text documents in it.
System specs are pretty strong, so I can't really blame it on my mac, I guess...
Expected Behavior
Smooth and fast scrolling, no freezes. At least no freezes, scrolling smoothness is manageable.
Steps to reproduce
The text was updated successfully, but these errors were encountered: