qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.26k stars 3.97k forks source link

qBittorrent GUI "not responding" frequently #15822

Closed minhngoc25a closed 3 months ago

minhngoc25a commented 2 years ago

qBittorrent & operating system versions

qbittorrent: 4.3.9 64 bit OS: Windows 10 Pro 21H2 x64 10.0.19044 Qt: 5.15.2 libtorrent:1.2.14

What is the problem?

My qBittorrent is having frequent "Not responding" issues of the GUI. This is the list of when it happens:

  1. On launch, I must wait for a few minutes for the "Not responding" qBittorrent to respond again. (also happens at startup)
  2. Double-clicking the qBittorrent icon in the system tray.
  3. When I have qBittorrent minimized, "Not responding" would happen again if I turn to the window.
  4. When I launch the Torrent Download window from a magnet link or a torrent metadata file.
  5. Occasionally, when statistical values are updated.
  6. Sometimes, when I start/stop or perform any other action against a torrent (or many torrents).

Please note that while the GUI is unresponsive, the software itself still download/seed torrent normally during that period.

I think that I started to have this problem after installing some Windows updates. It is probably the one I installed from 4-5 December. Here is my update history: image

Additional context

https://youtu.be/x3z_n1LaJlA ("Not responding" issue in preview)

Log(s) & preferences file(s)

https://pastebin.com/TxRf41Ys (qBittorrent preferences file)

minhngoc25a commented 2 years ago

I have met this problem too Try deleting windows prefetch files C:\Windows\Prefetch\QBITTORRENT_4.3.9.10_X64_SETU-27F4B97D.pf C:\Windows\Prefetch\QBITTORRENT.EXE-A56F94EE.pf

Thanks. I've tried this without any luck. The "Not responding" thing still happens.

ackerthehacker2 commented 2 years ago

I am seeing the same problem with 440rc1 on the Mac size too[](url Sample of qBittorrent.txt )

minhngoc25a commented 2 years ago

I don't have any idea how, but I think some update must have broken qBittorrent. The frequency of this issue increases with the number of torrents I have in the client. Previously, qBittorrent was able to run with 10-12 torrent seeding/completed smoothly.

IA21 commented 2 years ago

I don't have any idea how, but I think some update must have broken qBittorrent. The frequency of this issue increases with the number of torrents I have in the client. Previously, qBittorrent was able to run with 10-12 torrent seeding/completed smoothly.

This is true for me as well (windows 10 / 4.3.9 and some previous versions as well). Not Responding only happens for me when its been running for some time, not immediately. But I have noticed this problem get worse as I add more torrents. For me, it started sometime after I crossed 50 torrents. Right now I'm at ~60 and the frequency of Not Responding is increasing. When it gets into Not Responding state, there's no way to get it to work. Windows force closes it but the background task stays stuck so any new instances I start stay in offline mode because of the stuck background process. There's no way to manually kill the background process either. I have to with like half an hour for windows to somehow kill it as well before I can relaunch. Multiple times, I have left it running overnight only to find out in the morning it got stuck sometime during the night and the download did not finish.

Korb commented 2 years ago

Probably I have the same problem. Immediately after I launch the application, it does not respond for a long time (at least an hour - I did not wait for it to finish), but it intensively uses the hard drive and the Internet. There are no downloadable torrents, only a dozen handed out:

2022-01-14_21-22-42

qBittorrent x64 4.4.0 qBittorrent x64 4.4.0 qt6 Microsoft Windows 10.0.19043.1466

I have met this problem too Try deleting windows prefetch files C:\Windows\Prefetch\QBITTORRENT_4.3.9.10_X64_SETU-27F4B97D.pf C:\Windows\Prefetch\QBITTORRENT.EXE-A56F94EE.pf

Did not help.

I renamed the qbittorrent.pdb file (148 MB) - after running the application, I did not notice any changes.

IA21 commented 2 years ago

I don't have any idea how, but I think some update must have broken qBittorrent. The frequency of this issue increases with the number of torrents I have in the client. Previously, qBittorrent was able to run with 10-12 torrent seeding/completed smoothly.

This is true for me as well (windows 10 / 4.3.9 and some previous versions as well). Not Responding only happens for me when its been running for some time, not immediately. But I have noticed this problem get worse as I add more torrents. For me, it started sometime after I crossed 50 torrents. Right now I'm at ~60 and the frequency of Not Responding is increasing. When it gets into Not Responding state, there's no way to get it to work. Windows force closes it but the background task stays stuck so any new instances I start stay in offline mode because of the stuck background process. There's no way to manually kill the background process either. I have to with like half an hour for windows to somehow kill it as well before I can relaunch. Multiple times, I have left it running overnight only to find out in the morning it got stuck sometime during the night and the download did not finish.

ok so I found out why I was having the not responding issue. I have unreliable internet. often times, a single network request for me takes way too long to resolve. The requests immediately before and after it will finish as usual but one will take very long to finish. e.g. I type something in chrome address bar and press enter. it will keep waiting for 10-15 seconds and then respond. I have no idea why its happening and cant be arsed to solve it completely. My temp solution is to just see if a request takes slightly more time that usual (google responses are very fast), I just retry and get the response immediately.

The reason I typed all this out is I'm pretty sure qbt is doing some network requests on the main GUI thread and one of those requests sometimes takes too long. It doesn't matter if that request was completed late, qbt is already stuck. I've left qbt running over night sometimes and a torrent that should have finished halfway through the night is shown still unfinished in the Not Responding, stuck qbt window. This has happened more than once. qbt has had many hours to start working and it does not recover. Once its stuck, its stuck.

I found this out by chance. I had a stuck qbt window in front of me and I had to turn my wifi off for some other reason. As soon as I disconnected, qbt started responding. I connected to wifi and it resumed the download. I've repeated this a couple times since then and I'm sure its qbt not able to handle an unreliable connection. I had this issue in a previous qbt version as well so I upgraded to 4.3.9 and it kept happening.

Again, my network issue isn't a simple internet disconnection issue. I used to have that before with another isp and qbt used to handle it no problem. My current network issue (random delays) is very weird and I'm been seeing weird behaviors in all sorts of apps and programs.

Korb commented 2 years ago

I was helped by completely uninstalling the application (including all settings) and reinstalling it. Probably the cause of the inoperability was the automatic addition of 570 announce-trackers to each torrent (the "Automatically add these trackers to new downloads" setting) — https://github.com/qbittorrent/qBittorrent/issues/13530#issuecomment-748484934 and https://github.com/qbittorrent/qBittorrent/issues/13530#issuecomment-791913583.

It would help me to run the application in safe-mode - to delete current downloads, or delete them through configuration files. But I did not find either the first way or the second.

myfingerhurt commented 2 years ago

I do have lots of seeding files located at mapped network drive. I do have automatically adding lots of trackers into new downloads. After updating to v4,4,2, qbittorent keeps no responding for at almost 24 hours. Beside this, qbittorent will freeze for very long time, 1 hour at least for every new torrent task I'm trying to add.

  1. So I terminated it and starting v4.4.2 again, not working.
  2. Tried to downgrade to v4.4.1, same thing.
  3. I found my local download drive had less than 1GiB available space left, so I cleared out a little bit to have 100GiB+ free space, but not helping.
  4. Renamed qt.conf to qt.conf.bak also did to qbittorrent.pdb, still freezing from star-up.
  5. Uninstalled qbittorent completely and also select remove cache and torrents. GUI finally showed up.

It seems the qbittorent is doing nothing when freezing. image

TonyLCH commented 2 years ago

After using the qt5 version, this problem no longer exists. qBittorrent Windows (qt5 RC_1_2 x64):https://www.fosshub.com/qBittorrent.html?dwl=qbittorrent_4.4.2_RC_1_2_qt5_x64_setup.exe

minhngoc25a commented 2 years ago

@minhngoc25a @myfingerhurt @IA21 Can you still experience this issue with latest qBittorrent v4.4.2 that has Qt5 and Libtorrent 2.0.5+?

If you still do, then please try this:

Open Advanced Settings and modify these:

  1. Make sure your File Pool Size is at least the default 5000.
  2. increase RAM usage limit from 512 MiB to be 30~60% of your RAM amount.
  3. Change Network Interface from Any interface to be Ethernet or something else that is your main connection, click Apply and restart program.

I had fixed this issue by myself in December. I have applied all system updates and after the update, the program continued to function normally without the "Not responding" issue. Looks like the OS update fixed the memory issue of many software, including qbittorrent. I will still leave this issue "opened" for folks that still face this issue. (And I'm using v4.4.1 FYI, will update to v4.4.2 when I find it at least stable for many users)

IA21 commented 2 years ago

@minhngoc25a @myfingerhurt @IA21 Can you still experience this issue with latest qBittorrent v4.4.2 that has Qt5 and Libtorrent 2.0.5+?

If you still do, then please try this:

Open Advanced Settings and modify these:

  1. Make sure your File Pool Size is at least the default 5000.
  2. increase RAM usage limit from 512 MiB to be 30~60% of your RAM amount.
  3. Change Network Interface from Any interface to be Ethernet or something else that is your main connection, click Apply and restart program.

I'm still on 4.3.9 and as I mentioned in my previous post, the issue was happening due to my network acting weird. I switched to using ethernet and that fixed the problem. So I changed my router and the issue has went away completely even on wifi. I no longer get the Not Responding state in qbittorrent even though I have not changed any settings in the program.

Network issues should never hang the UI but this seemed to be a very specific bug I could not trace down since I'm not very knowledgeable in networking. For example, when my internet would go out, qbt would just stop downloading as expected but the UI would keep working. The Not Responding state would happen while internet was working but something went wonky between the machine and router's wifi.

Mosesofmason commented 2 years ago

The same issue when I running with the latest Qt6 version (high CPU%, UI no response), however, Qt5 seems does not have the issue, but I am not sureThe latest Qt5 version also has this issue.

cheater commented 2 years ago

I've had my first freeze of qBittorrent ever after upgrading from 4.3.6 x64 to 4.4.3.1 x64 while reporting bug #17131. Could the issue have started somewhere between 4.3.6 and 4.3.9?

For no reason I could see, the UI just stopped responding for a while. I left it alone and it's fine again, but it took a long time (> 1 minute after which I stopped watching it). I am on the latest Windows 10 so the Windows version being recent doesn't create the issue - it simply did not exist in 4.3.6 even with the same, latest, Windows 10 version.

MeruOtonashi commented 2 years ago

I can confirm having this issue on 4.4.3.1 qt6.3.0 Libtorrent 2.0.6.0 on Windows 11 Pro 21H2.

About 5 days ago, I started downloading and seeding around 78 torrents consecutively. qBittorrent is now plagued with the application randomly not responding, either scenario occurs:

  1. The UI is completely frozen, and you need to force the task to close. Then, in task manager, it leaves a lingering process that I can't kill with an "Access denied" error. At this point, the only fix is to reboot the computer.
  2. All torrents suddenly see the trackers being "Not Contacted" under status, but the UI is still responsive. In this situation, I can quit the app without problem and relaunch it and it'll start working again.

Seems to me like as soon as you hit a high amount of ongoing torrents at the same time, it will eventually crash.

MeruOtonashi commented 2 years ago

I tried adjust the RAM usage limit to 2048mb, and it still crashes. image

MeruOtonashi commented 2 years ago

Giving more details, I've tried running 4.4.3.1 on both Qt6 and Qt5, both exhibiting the same behavior of the UI freezing.

I've downgraded back to 4.4.2 Qt6, and the UI hanging issues are completely gone. It seems like a possible regression in the changes that was introduced.

cheater commented 2 years ago

@MeruOtonashi that's very helpful, are you able to locate the exact two versions such that ui freezing doesn't happen in one but it happens in the very next one right after it?

IA21 commented 2 years ago

About 5 days ago, I started downloading and seeding around 78 torrents consecutively.

Off topic but is this because of a certain tracker celebrating its anniversary? 🙂

MeruOtonashi commented 2 years ago

@cheater Pretty much sure it is the jump from 4.4.2 to 4.4.3 that exhibited this behavior. 4.4.3.1 is just a translation fix to the application according to the changelog.

@IA21 Perhaps? >_> ;)

jcjveraa commented 2 years ago

@cheater Pretty much sure it is the jump from 4.4.2 to 4.4.3 that exhibited this behavior. 4.4.3.1 is just a translation fix to the application according to the changelog.

@IA21 Perhaps? >_> ;)

Actually, I just installed 4.4.3.1. which brought me t this topic as now the UI is 'Not responding'.... I upgraded from a 4.x release (4.3.x if I recall correctly) using the 'Windows' installer from fosshub (i.e. the 'official' release). I downloaded and installed the default Windows version with a SHA256 35ab8e46152663eab858e902d159f918bc77620db4d9eb5dec85a959b9b99316

I have now downloaded the specific x64 version of the installer (SHA256 07f1777b4508c5629e26bb592050dfd4421169b76de79001d2f0350f92010f23) and reinstalled again ('dirty' without uninstalling anything beforehand), now it's working fine again. I probably had the x64 version installed before too, not sure.

Hypothesis: some issue mixing different types of Windows releases?

cheater commented 2 years ago

I've only had x64 .exe installer versions.

Bear in mind. Before you say "it's working again", give it some time... the bug may rear its head yet again

MeruOtonashi commented 2 years ago

@cheater You're right, the problem is happening again with 4.4.2 x64 Qt6, though it happens far less often than 4.4.3.1. What I mean is that in 4.4.3.1, it can take as little as 15-20 minutes before the issue happens, on 4.4.2, it takes several hours before it freezes.

I believe we can cross out the upgrade from an older version to this as well as I had to reinstall my PC from scratch because of a SSD failure when I initially installed 4.4.3.1.

suddenlydoomy commented 2 years ago

Hi there. I just had a similar problem on Windows 10, running the portable version of 4.4.2.

It turned out that something had locked one of the files that qB was using for one of my torrents. I.e., Windows Explorer wouldn't let me delete the file and appeared to lock up when I tried. I logged out of Win 10, logged back in, moved the file to the trash and restored it (to confirm it wasn't locked), and now qB appears to be behaving fine.

Mosesofmason commented 2 years ago

@suddenlydoomy which file?

noelmullankuzhy commented 2 years ago

End QbitTorrent process from task manager. Go to C:\Users\YourUsrName\AppData\Local\qBittorrent Rename the BT_backup folder to BT_backup_old. Now run QbitTorrent. Now it will start but all your torrents will not be shown Now go to the settings and enable queueing and set it to 10 or something. If you have added additional trackers, remove them. Now quit the QbitTorrent Go to C:\Users\YourUsrName\AppData\Local\qBittorrent You can see the BT_backup folder is again created. Now copy files from BT_backup_old to BT_bsckup. Now start qbitTorrent again. You will see all your torrents there. If still problem exists, try copying torrents in small batches back to the BT_backup folder.

myfingerhurt commented 2 years ago

I found an alternative way, it always responding and almost have never crashed the GUI. DON'T USE GUI -> USE WEBUI instead

Minimalize the GUI and don't click on or put mouse on it.

DON'T USE SMR HDD or Samba server based on any SMR HDDs for your target location.

Also if your files are located on mapped network drives through a very slow Wi-Fi connection or faulty LAN cables or some Asus motherboard with problematic Realtek GbE Controllers, then get a better adapter.

txtsd commented 2 years ago

This happens to me frequently on Arch

qBittorrent: 4.4.5
Qt: 6.3.1
Libtorrent: 2.0.7.0
Boost: 1.79.0
OpenSSL: 1.1.1q
zlib: 1.2.12
Mosesofmason commented 2 years ago

This issue persists in version 4.4.5 on Windows 10, I am considering switching to other clients now...

Mosesofmason commented 2 years ago

@PriitUring There is de facto no steps. Just launching the application, the UI is starting with no response at a random time and CPU% goes very high. As my comment on May 21st, I have tried different installation files already, it works for a while, but eventually, the stucking comes back. I also tried cleaning the temp files, and tweaking settings after reinstallation, without luck. There are only 20+ active torrents, so it should not be a problem. I am using a workstation with a 10th Gen Intel CPU, 64GiB memory, and M.2 solid disk, so it has nothing to do with the hardware. As many others mentioned, this issue occurs on many different hardware/platforms/OS, so I may have confidence it must be a software issue rather than hardware. Other comments have the info you mentioned, mark my comments as spam has also not helped resolve the issue or prevented users from leaving.

glassez commented 2 years ago

mark my comments as spam has also not helped resolve the issue or prevented users from leaving.

That comment was clearly spam, not bringing any benefit to solving the problem.

glassez commented 2 years ago

In fact, a lot of work has been done recently to speed up the startup, prevent freezes, etc. (although not all problems have been fixed yet). Unfortunately, all these fixes are not available in the 4.4.x branch, but will be provided with the v4.5 release.

txtsd commented 2 years ago

@glassez Can you link to the relevant PRs? I hope they decouple the business logic and the GUI.

cheater commented 2 years ago

I'd just like to point out something that might be a long shot, but it might be related. I used to have those "unresponsive qBittorrent" issues in the past. However, I am partial to think qBittorrent may not have been the reason for this at all.

I'm a bit of a hoarder of firefox windows/tabs. I have some profiles with hundreds of windows with tens to hundreds of tabs each. When I start up firefox, it takes a long while. For some reason, the windows just... keep popping up over each other for a while before the browser is "fully started". The interesting thing about this is that it starts out fast, then it slows down (windows pop up slower and slower), and then eventually it does it very quickly. It's like the relevant API has some sort of rate limiting, or goes into a bugged out mode.

Anyways, recently I've started having issues with something you'd think shouldn't be a problem. Opening a few Steam tabs (say, ten tabs) slows the browser down to a crawl. We're talking about steam store pages that display a single game on the page. However, closing the tabs again doesn't help. You need to restart the browser.

On top of this, another issue I've started noticing: if you have some Explorer windows open for a while, possibly with search results in them, then Explorer will slow down the GUI of the system to where it becomes very unresponsive. I've experienced this every now and then, and the latest such situation was today. Killing Explorer helped with the sluggish behavior. I think that's what happened the last time I've had issues with the qBitTorrent GUI. Note that today, when the issues got really bad with Explorer, qBitTorrent wasn't even started. Although I did start it a few times while those explorer windows were already open. (about 10-20 windows on local drive folders, with some of those windows displaying search results). My instance of qBitTorrent has 2200 torrents, and 250 are active. Of the active ones, all of them are on force download.

So, to get back to why qBitTorrent might be freezing at least some of the time for some of the people, I think there's something bad going on inside Windows 10 with it being unable to handle a huge amount of drawing operations or when you allocate a lot of GUI resources. So the question is if qBitTorrent is doing a lot of... something related to GUI, and if so, if it could be doing less of that. In itself qBitTorrent is not an issue for me, but I can't speak for those people who are on less powerful computers than mine. I have an intel 8086K and 64 gigabytes of ram - I bet most users don't have that kind of spec.

cheater commented 2 years ago

Oh, also, my current version of qBitTorrent is 4.4.3.1 (i'll upgrade in case I see slowness again), and I'm also using Firefox 104, and the latest updates on Windows 10.

IA21 commented 2 years ago

@Mosesofmason are you on wifi?

Mosesofmason commented 2 years ago

@IA21 nope, my workstation is on a wired LAN connection.

minhngoc25a commented 2 years ago

@minhngoc25a

If your still experiencing issues with newest qBittorrent, then please change issue title to: [Windows] qBittorrent GUI "not responding" frequently, because otherwise users who use MacOS or Linux might find this old issue and expect same solutions to solve their issues.

If anyone is still experiencing responsiveness issue, then please make sure you try:

  1. Newest qBittorrent v4.4.5 with libtorrent v1.2.17+ instead of libtorrentv2.0.7+.
  2. Specify how many active torrents, maximum Network speed shown by qBittorrent or Task Manager and try using newest versions default settings. If unwilling to use default settings then please specify what settings you're using, otherwise it's hard for everyone to reproduce if don't know what hardware, storage type and connection Interface, VPN provider and amount of active connections and torrents should be used and kept active to cause responsiveness related issues.
  3. Go to Advanced settings and specify your Network Interface and IP address to use IPV4 only or a specific one. Others who experiencing issues got it fixed if they didn't use IPv6 and if didn't allow using all Interfaces.

I've changed the title for you. Anyway, I no longer have this issue, as mentioned previously. I will still leave this issue open for other people.

ackerthehacker2 commented 2 years ago

Is the File pool size of 5000 correct? The docs say 40 ..when I had 5000, my machine became useless.

On Apr 2, 2022, at 1:59 AM, Irbaz Ahmed @.***> wrote:

@minhngoc25a https://github.com/minhngoc25a @myfingerhurt https://github.com/myfingerhurt @IA21 https://github.com/IA21 Can you still experience this issue with latest qBittorrent v4.4.2 that has Qt5 and Libtorrent 2.0.5+?

If you still do, then please try this:

Open Advanced Settings and modify these:

Make sure your File Pool Size is at least the default 5000. increase RAM usage limit from 512 MiB to be 30~60% of your RAM amount. Change Network Interface from Any interface to be Ethernet or something else that is your main connection, click Apply and restart program. I'm still on 4.3.9 and as I mentioned in my previous post, the issue was happening due to my network acting weird. I switched to using ethernet and that fixed the problem. So I changed my router and the issue has went away completely even on wifi. I no longer get the Not Responding state in qbittorrent even though I have not changed any settings in the program.

Network issues should never hang the UI but this seemed to be a very specific bug I could not trace down since I'm not very knowledgeable in networking. For example, when my internet would go out, qbt would just stop downloading as expected but the UI would keep working. The Not Responding state would happen while internet was working but something went wonky between the machine and router's wifi.

— Reply to this email directly, view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/15822#issuecomment-1086568962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJHJFL6OHZLMR4BY7POE223VC7V6JANCNFSM5JZBJVPA. You are receiving this because you commented.

Rubber-Duckie commented 2 years ago

Receiving the same issue on both 4.4.5 and qt 5.15.5, x64 Windows 10 21H2 The frozen UI happens after a few seconds of the application launching AND having already connected to a VPN before launching the app. This seems to be related to networking, for when the VPN connection is disabled, it will unfreeze and function normally. I have ensured that the client (Mulvad) is using an external DNS, also its inbuilt defaults, this seems to make no difference. The moment you disconnect from the VPN it springs back to life. What ever network ports sockets that this software is trying to use that seem to be on the UI thread will be the culprit.

I have attempted to set the network interface setting to "Mulvad" and to all, this makes no difference. Set to IPv4, no change.

So now I disconnected the VPN using Mulvad app, and QBittorrent comes back to life ( with active torrents in the list by the way). Then reconnect the VPN, but now QBittorrent is fine, it seems to have got what it wanted from a normal network connection and will operate without issue.

The Torrents will start downloading. Now, when you try to add a new torrent to the list, while connected to the VPN, it freezes again. The only way to unfreeze without killing the process is disconnect from the VPN.

The VPN is not a suspect since every other application has no issues connecting to the internet via the VPN connection.

I open process explorer, and despite the unresponsive UI, it seems to be actively continuing to download since you can monitor network traffic ongoing in the background.

So this is also linked to what ever the code is doing when you try to add a new torrent.

Rubber-Duckie commented 2 years ago

I have now emptied the torrent list (all) and closed QBittorrent. No Torrents in the list. Then started QBittorrent while the VPN is connected. It freezes again. So this is not related to exiting torrents in the list.

I disconnect the VPN connection. It unfreezes.

The VPN is set for split tunneling, where local IP addresses are NOT routed, i.e. connecting to a local network printer etc.

If you are attempting to use the loopback or some sort of self connection, this could be an issue. I see the app has established a connection on 65434 & 64535 to the local machine.

its strange as you have QBittorrent established a connection from 65434 to 65435 and also a second connection from 65435 to 65434. But this could be an issue if it is in some way blocked by a firewall or VPN routing table changes???

When I connect the VPN, I see two new connections made by QBittorrent (total 4 now) to itself. 3rd connection is port 2000 to port 0 (Listening), and the 4th is port 2000 to star dot star with no connection type.

2000 is the port number set for incoming connection btw in config,

I then change the networking to Ethernet, from Mulvad and a new connection is established with seemingly a GUID followed by internal.cloudapp.net.

Also despite setting it to connect using IPv4 only, it makes an IP6 connection! I then change the setting to IPv6 then save, then IPv4 and save. Then the IPv6 connection is terminating leaving just IPv4 again. Strange.

I connect to the VPN. Watching the network monitor, it freezes, but now notice a UDP connection now from 2000 to star dot star.

ok, now I have set the interface to All, and left it limited to IPv4 only.

What I notice is that while the VPn is connected and QBittorrent is not frozen, the IP connections are image

Then I attempt to add a torrent via file menu. No change. Any torrent it does not matter.

Now when I disconnect the VPN the connections at only that moment, there is a change. and the app unfreezes.

image

Raise the VPN again, and the connections come back, one is on a diff port

image

Now that the Torrent is added, in the list. Unpause it (while connected on the VPN now), and it starts to download for a moment then stops. If you right click on the torrent in the list, again it freezes.

Rubber-Duckie commented 2 years ago

Another observation. Start QBittorrent, connect to VPN. Then enter the setting menu cog icon. Then click cancel on the settings dialog box. QBittorrent freezes. Disconnect the VPN, QBittorrent unfreezes within about 5 seconds.

something is triggering this freeze on loading the settings dialogue since the moment you click cancel, the base form is left frozen. Perhaps the advanced setting dialog which enumerates various network resources.

Seems to definitely be some code that is blocking your main UI thread when attempting to access network adapters, namely in my case the Mullvad Tunnel adapter for instance, which is just this driver https://www.wintun.net.

Because, when the Mulvad client disconnects, it deletes the Tun Adapter. This means it is no longer registered so what ever your code (or some dependent library) is doing waiting for some response, is then released. It then un-blocks the thread and unfreezes the UI. Something is not correctly handling some sort of Network Adapter enumeration / resource request.

You detect when the network changes and refreshing session binding https://github.com/qbittorrent/qBittorrent/blob/bb2caabd613a51a25f1057f0093036132e565e16/src/base/bittorrent/sessionimpl.cpp

Which is why the UI unfreezes, again something not being handled correctly. I have no way to run and debug sorry, not a C++ person.

And also on torrent add (https://github.com/qbittorrent/qBittorrent/blob/f2dd1e645601e7b836aed28490a4f783eb046bc2/src/webui/api/appcontroller.cpp)

Which explains why the UI freezes up when you add a torrent, it again attempts to query the adapters

Both classes have had considerable changes over the last year or so.

Such as https://github.com/qbittorrent/qBittorrent/commit/8200ef6bd5aaeb142b112d11d758155c856e8350

Rubber-Duckie commented 2 years ago

Found that this issue was introduced in version 4.0 and v3.3.16 did not suffer this problem. @sledgehammer999 Seems to have been quite involved in the networking areas

Rubber-Duckie commented 2 years ago

Bump

ghost commented 2 years ago

@glassez , @Chocobo1 please take a look at the comments made by rubber ducky.

Rubber-Duckie commented 1 year ago

Just to add, currently this seems like a show stopper for anyone who is using split tunneling VPN adapters. Wonder if anyone could take a look at this issue.

To replicate, should be a case of enabling split tunneling within any split tunnel capable VPN software in windows.

Else grabbing a copy of Mulvad VPN here and trying it out. https://mullvad.net/download/app/exe/latest/

Rubber-Duckie commented 1 year ago

We are all having to move to Deluge until someone can be bothered to fix this. Very annoying since it has been open for a year and finally it seems there is a focus on the area causing this.

glucosegrin commented 1 year ago

Experiencing the same thing as Rubber-Duckie, but without VPN -

ie. Unresponsive UI, tied to network activity. If I delete the rule allowing qB to access the network in windows firewall, relaunch qB, everything is responsive (with windows prompting me for a new firewall rule).

As soon as I let qB access the network by granting it access through the windows firewall, the UI becomes locked. clicking anything, including the menu bar to change settings, makes it stop responding. If I block qB from the network, everything is fine.

happyTonakai commented 1 year ago

I encountered this problem since I add some RSS rules. Very annoying.

Rubber-Duckie commented 1 year ago

Given this "bug" lets call it, was introduced by areas of the code that @sledgehammer999 seems to have authored, only to now be boycotted seems very suspicious. This is a critical section of code that we need to be able to trust. Something very odd is going on within this sections code dependencies. There is all the information needed above so as to reproduce this issue with 100% certainly. Clearly there is an issue in the code, can the person responsible for writing it fix their bugs.

happyTonakai commented 1 year ago

@PriitUring Several days after I updated to 4.5.0, this issue never occurs again.

I don't know it is due to the newest version or the fact that I removed all the torrents whose file was deleted from disk.