Skip to content
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

Closing xed while a large file is loading does not terminate xed #637

Closed
syildizz opened this issue Apr 20, 2024 · 5 comments
Closed

Closing xed while a large file is loading does not terminate xed #637

syildizz opened this issue Apr 20, 2024 · 5 comments

Comments

@syildizz
Copy link

 * Xed version 3.4.5
 * Distribution - Mint 21.3

Issue

When a large file is loaded a loading bar appears. If xed is closed when the loading bar is still ongoing, xed does not stop running and instead continues to use the CPU.

Steps to reproduce

  1. Click on a large file.
  2. Wait to see the loading bar at the top showing "Loading <file> from <folder>".
  3. Close xed before the file is able to load.
  4. Open system monitor and check CPU usage.

Expected behaviour

Xed should terminate when it is closed.

Other information

xed_loading_file

xed_still_ongoing

@BanceDev
Copy link
Contributor

BanceDev commented Jun 5, 2024

I attempted to verify this issue by opening a 512MB binary file since that is the limit of notepad on windows. I was able to close out of the editor before it finished loading. This may be potentially due to spec differences. Can anyone else verify whether this is a bottleneck of weaker hardware? If so I could look into potentially making a feature like a warning that pops up for larger files/files with long individual lines like some binary file types.

@syildizz
Copy link
Author

syildizz commented Jun 5, 2024

I've added more information about this issue.

The issue still persists for me.
I can close out of the editor, but the process does not terminate.

In the original comment, I used this file. I just misclicked it and closed it immediately after. That's when I first encountered this issue.

Here are my specs after running "neofetch --stdout".

OS: Linux Mint 21.3 x86_64 
Host: 82XT LOQ 15APH8 
Kernel: 6.2.0-39-generic 
Uptime: 16 mins 
Packages: 2905 (dpkg), 22 (flatpak) 
Shell: bash 5.1.16 
Resolution: 1920x1080 
DE: Cinnamon 6.0.4 
WM: Mutter (Muffin) 
WM Theme: Mint-Y-Dark-Purple (Mint-Y) 
Theme: Mint-Y-Dark-Purple [GTK2/3] 
Icons: Mint-Y-Purple [GTK2/3] 
Terminal: gnome-terminal 
CPU: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16) @ 3.800GHz 
GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile 
GPU: AMD ATI 05:00.0 Phoenix1 
Memory: 2952MiB / 15161MiB 

Here is my disk benchmark

disk_benchmark

I've attached a video where I demonstrate the issue live for better documentation.

test.mp4

As can be seen, when I first click the cancel button and then close it works as expected but when I close without clicking the cancel button while the file is loading then the window closes whilst the process does not terminate.

@BanceDev
Copy link
Contributor

BanceDev commented Jun 5, 2024

I see what you mean now. When I tested I used the cancel button first before closing. I feel that is mildly intuitive but it could be a good idea to have the quit functionality just do the cancel under the hood itself and then close out. Is that essentially what you are suggesting?

@syildizz
Copy link
Author

syildizz commented Jun 5, 2024

I'm suggesting that if the window closes then the program should terminate. Yes, canceling under the hood would achieve that goal. You could also not allow the window to close if the file is still loading and expect the user to press cancel first. Both options would make more sense then the program appearing to close but still running in the background in my opinion.

@BanceDev
Copy link
Contributor

BanceDev commented Jun 5, 2024

I agree. Didn't quite understand your issue at first but this certainly should get fixed. I will look into a solution here soon. Thanks for the extra information!

BanceDev added a commit to BanceDev/xed that referenced this issue Jun 6, 2024
new method _xed_tab_cancel_load is called in xed-notebook to prevent use of computer resources after closing xed or a xed tab
clefebvre pushed a commit that referenced this issue Jun 11, 2024
new method _xed_tab_cancel_load is called in xed-notebook to prevent use of computer resources after closing xed or a xed tab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants