You are here

Qbittorrent Portable Windows Close Application

20 posts / 0 new
Last post
eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
Qbittorrent Portable Windows Close Application

Couldn't find anywhere to report bugs for this portable app. So let me just mention it here. Feel free to point me in a better direction for bugs on this app or just move it to where is is more suited if you are an admin.

I noticed that every time I logout of windows (7 - 64b) and thus let windows close Qbittorrent Portable (QBP), the next time I log in and start Qbittorrent Portable again (shortcut is in the startup dir) it tells me that it wasn't closed properly and that I should restart it manually.

Doesn't seem to actually close unproper. That screen comes up with a few apps win is closing QBP has a note of closing connections or something of that nature then disappears from the list, a moment later the rest is closed. Everything seems proper.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 2 days 56 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
Don't

You shouldn't be letting Windows close it like that. When Windows does so, it generally closes the launcher prior to the app itself, which means the portable settings aren't being handled appropriately on the closing of the app.

If you're wanting Windows to close it, rather than closing it yourself, I recommend installing the app normally, rather than the portable package.

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
I'm sorry but your advice is

I'm sorry but your advice is useless as it defeats the whole purpose of using portable apps which isn't just for portability.

Why does win generally close the launcher before the app itself? Shouldn't that be fixed!? You know have it prevent itself from being closed as long as the main app is still running.
What settings aren't handled appropriately? The settings do not change as the app is closed or are they? Progress info seems to be handled ok.

gluxon
gluxon's picture
Offline
Last seen: 4 years 1 month ago
Developer
Joined: 2008-06-21 19:26
There's necessary cleanup

There's necessary cleanup some launchers have to perform after the app closes. We've explored potential workarounds to this problem, but unfortunately, you've discovered a limitation of the portable apps here. My understanding is that most workarounds or solutions aren't feasible or require administrative privileges.

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
I don't think administrative

I don't think administrative privileges would be a problem. If that is needed you could simply add a note telling people to set the app's compatibility to "Run this program as administrator".

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 2 days 56 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
Previously discussed

This has been discussed previously, here's an explanation of what's happening.

Note that the ability to have the platform shut down (most) PortableApps.com Format application is already available.

I am aware that applications are not used only for the portability. In fact, I, myself, have both the platform and applications installed to a partition on my computer, including qbittorrent. When running that particular application, I always close the app prior to allowing the platform to shut down the rest.

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
Is there a link missing or

Is there a link missing or something? Not seeing the explanation.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 2 days 56 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
added, see linked

The link was missed but has now been added. See the answer there.

OT - I was able to edit my comment even though there was a reply to it. Anyone else noticing the same thing?

Wm ...
Offline
Last seen: 7 years 9 months ago
Joined: 2010-07-17 12:37
Hello angry sailor

Is your point about QBP or a more general one?

Y'see if it is general (which I think it is) then you're in the wrong sub forum and want the full "how does this PA thing work anyway?"

your choice, Mr Angry

Wm

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
Wrong.

Wrong.
I'm only seeing this happen with QBP as you call it. So it's nothing general.
Where you get the angry part!? It's not like I've been cursing. And take a close look at the OP, didn't I say I was just mentioning this issue? It's not a big deal to have to click OK and restart it manually occasionally. But it isn't proper program behavior either.

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 9 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Clarification and Handling

I wanted to clarify quickly how things are working here and why you see the behavior you do. The recommended and supported way to shutdown all our apps running either locally, from a synced cloud drive, or from a portable drive, is to use the PortableApps.com Platform. It can automatically close down all your running portable apps, warn you of any you must close yourself (if they are "minimized" to the system tray) and then either eject or show the Windows shutdown/restart/logoff prompt. All of that happens by just clicking the power button on the PA.c Platform.

If you're running our apps without the PA.c Platform, they should be individually closed before shutting down Windows. The reason for this is that some apps that require it have a launcher sitting alongside the running app, waiting for it to close to move files back and clean up registry entries. Some apps don't require this. Some, like qBittorrent, do. If you shut down Windows without closing the running apps beforehand, Windows will just kill the processes off. This will cause files to be left behind on the local machine in some cases, or files left in the wrong location. When you run the app again the next time, it will alert you to this issue, and attempt perform a cleanup at that point in time.

Due to the way the PortableApps.com Launcher is currently coded, it can't automatically continue on or restart itself after showing you the message about it not properly being shutdown. If it were to restart itself, the state of the Windows environment variables would be mixed up from either the platform or the previous instance. This could cause TEMP files to not be properly cleaned up and similar issues.

In order to prevent Windows from shutting down and killing off the portable processes in the wrong order, we'll need to rewrite a section of the PA.c Launcher to be able to interact with the Windows shutdown API and tell Windows that we are still running and why so it can be displayed to the user. We can't handle this at the platform level as Windows demands that every single process that wants to keep running must interact with the API. This will require a bit of work to make happen that we haven't yet had time to look into.

In order to have the launcher be able to show the message and then continue working will also require a fair amount of coding that we haven't yet had time for.

Finally, the reason some apps like qBittorrent can't be properly closed by Windows or by the PA.c Platform is because, when they are minimized to the system tray, Windows can't send them the proper WM_CLOSE or WM_QUIT messages because they have no active "window" in Windows parlance. Only apps that appear as a window on your screen or an icon/button in your taskbar have an active window to receive such messages. This is why when you click power or eject on the PA.c Platform, it will alert you that a handful of apps are still running and you should close them yourself. Windows doesn't do this and will just unceremoniously kill off the processes in cases like this. So, if they have any changes within the app that haven't been saved (say if an app doesn't save changes you make to Options until you exit the app as opposed to clicking OK in the Options window), those changes will be lost because the app basically crashed.

I hope that clarifies a bit how things work today and will hopefully change in the future.

Sometimes, the impossible can become possible, if you're awesome!

depp.jones
Offline
Last seen: 17 hours 15 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Best explanation for a long time

Hi John,
any chance of making this post pinned or preserve it elsewhere? This discussion occurs every other week now and I think, it would ease things a lot to be able to point people to these facts (these explanations have been the most detailed for a while) than writing them over an over again. This issue seems understandable from a user's point of view, but as long as it is a technical limitation (or design feature), I think it is best to make people aware of it (not that every user would read it... Wink ).

Wm ...
Offline
Last seen: 7 years 9 months ago
Joined: 2010-07-17 12:37
Seconded

I agree that this does seem to be coming up quite frequently and it would be better to have a doc that could be pointed to. If nothing else it would save me having to be sarcastic Smile

Wm

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
Appreciated

Thanks very informative.

I would like to note though as there are quite a few referrals to the PortableApps.com Platform, it probably could be a nice addition if you are using quite a few portable apps from PortableApps.com but in my case and I'm most likely not the only one I'm currently only using 2 where only 1 is behaving a little annoying occasionally. Having to resort to a "third party" as it were just for this seems overkill. Besides that I'm not a fan of app management apps, apps should just run stand alone from A to Z if you ask me.

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 9 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Many Apps Need Help

It would be nice if all apps could, but most apps need help from our launcher. Even many that are "portable" since they leave random bits behind. For any app that does run fully portably (no local TEMP, APPDATA, or registry), doesn't leave bits behind on exit (see first note), and support the path to the data to be specified (so we can point it to the Data directory instead of having to move INI files or folders to a hard coded location relative to the app's EXE), we use the PA.c Launcher just as a glorified shortcut that also happens to set any environment variables, adjust any paths from the last path to the current one, and set the language and other things from the platform if available/needed. The PA.c Launcher then exits and the app runs solo. Apps like Duplicate Files Finder, Fyre, GetSudoku, gVim, LaxPaint, MicroSIP, Notepad2, PeaZip, Rufus, Stickies, Task Coach, and others all work like this since they are portable on their own and support data path/file redirection.

When we interact, we always suggest that they run cleanly and support data path/file redirection as it makes our jobs easier, makes data loss less likely, eliminates the (albeit low) memory footprint of the launcher while the app runs, and eliminates the need to show an error message like a bad close. Of course, the app itself may have been crashed, but it's up to the app to realize that and either warn you or try to recover from it.

Sometimes, the impossible can become possible, if you're awesome!

Wm ...
Offline
Last seen: 7 years 9 months ago
Joined: 2010-07-17 12:37
surely you should find an alternative app in this case?

I am sure if you look at the available apps and at the big ol' world out there you'll find the one App that you want that we weren't able to provide for you in exactly the way you want.

The way you are behaving it is almost as though John would have to put up a big warning banner so people like you won't moan because they weren't warned.

Surely torrents are by now generic and attachment to an application is anachronistic?

Wm

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
Could you please stop reading

Could you please stop reading stuff into my comments that isn't there!? I'm in no way moaning as you call it. You are clearly projecting predisposed thought patterns into what you read. Try to put your emotional involvement at the end of the chain, that way you have time time to realize it is really not important to this topic.

vf2nsr
vf2nsr's picture
Offline
Last seen: 7 years 11 months ago
Developer
Joined: 2010-02-13 17:10
Seems resonable what you request

problem is the request should go to the actual app developers, believe me if all apps were truly portable then PortableApps Platform would not even be necessary. Problem is they are not. I look at it much like using a car It is my car and I should be able to do what I wwant which means if I want to run the red light it should be allowed since it is my car I can do what I want....Alas if I choose to drive I need to follow certain rules for my and others safety. Same with PortableApps. If you want what you want and still want PortableAps then you need to follow its rules.

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

eNdEmiOn
Offline
Last seen: 2 years 6 months ago
Joined: 2014-06-11 21:12
The problem with that idea is

The problem with that idea is that the developers aren't that much interested in portability. And why should they if there already is a third party fulfilling that desire + they can ignore support towards that end. You know "If you want portability go to portableapps.com but we don't support it (let them deal with it)".

BTW I don't think your analogy fits with what has been said here.

vf2nsr
vf2nsr's picture
Offline
Last seen: 7 years 11 months ago
Developer
Joined: 2010-02-13 17:10
Nor do I feel

Your entire discussion of I want to do what I want to do or else is needed either. Again go to developer demand they make you hapy. It is their app not ours.

Rules are rules your choice you either follow them and enjoy the benefits or disregard and be upset

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

Log in or register to post comments