Build Transmission on Windows

Ask for help and report issues with the Windows version of Transmission
Post Reply
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

Version 2.01 of QTr for Windows is up viewtopic.php?f=1&t=7612&p=37848#p37848

Almost vanilla build from the transmission sources. I added the little change to select(); Jordan asked for some testing on this http://trac.transmissionbt.com/ticket/3311#comment:20, my own tests have shown no problem there.

Bugs? What bugs? It's pwerfect ;-)
Lacrocivious
Posts: 11
Joined: Wed Jan 24, 2007 12:17 am
Location: Atlanta Metro Area, Georgia, US

Re: Build Transmission on Windows

Post by Lacrocivious »

QTransmission 2.01+ appears to slowly increase memory use without giving it back.
Then again, this memory use may be normal for the code involved on the Windows platform.
In any case, here is an informal case study that may be of some use or interest to you.

CPU use is consistent throughout, usually under 1% and seldom exceeding 3%;
very occasional and brief use of 5% to 7% observed.

________________________

01 July 2010

QTransmission-2.01+-r10904-Setup.exe

Windows 7 Ultimate 32-bit (new install)

hp 530 - Intel Core 2 CPU T5200 1.60GHz - 2.00 GB RAM

AT&T ADSL provisioned as 300/39 KB/s; 270/39 KB/s typically best actual

Top Processes gadget (from Micros**t Gadget Gallery) for 'top' equivalent
All CPU Meter gadget (from Micros**t Gadget Gallery) for CPU/RAM meter
Task Manager from Windows 7 (Processes tab)

Initial Transmission load: One torrent, 1.4 GB, decently seeded

Memory (Task Manager calls it 'Private Working Set'; Top Processes says 'Private Set'

Code: Select all

Time (approx)  Task Manager Top Processes

20:30		     23,516K		36MB
20:32		     23,516K		40MB
21:32		     27,092K		44MB
22:08		     26,748K		45MB
22:11		     28,808K		46MB
23:00		     30,940K		48MB
23:23		     31,508K		48MB (endgame)
23:24		     31,512K		50MB then back to 48MB
23:25		     31,484K		48MB (seeding; active)
23:48		     31.496K		48MB (seeding; active, holding steady)
________________________

System reboot

Transmission loaded immediately after boot desktop housekeeping finished.
Same single torrent as above already loaded and seeding.
Within seconds, added two new torrents, one 700MB, one 900MB, both decently seeded.

Code: Select all

Time (approx)  Task Manager Top Processes

23:52		      7,736K		23MB (one torrent loaded; seeding)
23:58		     25,420K		54MB (two torrents added, downloading, three total)
08:14		     41,144K		69MB (one torrent finished and seeding; other 77% done)
17:16		     44,148K		72MB (third torrent in endgame)
21:00		     44,188K		72MB (three torrents seeding)
________________________

Overall I am well pleased with this client on Windows 7. It looks and feels like the linux client.
Thank you for the work you have done on this.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

Memory leaking is a well known problem, it was discussed in this thread some time ago, newer versions improved. It used to leak also in Linux, just not as much as in Windows, Qt seems to be the major waster.

There is one funny effect: if you minimize the application the memory it uses diminishes, usually by a lot... but its not consistent, it regains it with time or maximizing it.
Diablofan
Posts: 5
Joined: Fri Jun 04, 2010 10:53 pm

Re: Build Transmission on Windows

Post by Diablofan »

rb07 wrote:Diablofan :

Two points, first like the notes say, "it doesn't work as stand-alone server" so the test you did with "a torrent file with files that already existed" will not work. I'm still tracking down that problem which only happens with my port to Windows.

Second, I've used it as front end for a daemon running on a NAS for a long time, no problem at all. I've also tested it as stand-alone server on a Netbook (a small Toshiba NB200 with an Atom processor), no high CPU problem, no overheating, no unusual memory use or leak, nothing like you describe... it just doesn't connect to any peers or, to be precise, it connects but doesn't do anything just waits for the "handshake" then kills the connection; and with version 2.00b1 something new, it crashes.

So your description is something I have never seen and its the first time somebody reports something like it; there must be something else happening.
Sorry for the late reply, forgot to check back on this til just now ^^;

First: As stated in one of your later posts, I was trying to use this as a standalone client. Not a server, just a client. And to clairfy: I had the files downloaded and I wanted to locate them from Transmission so it would just start immediately seeding the files.

Second: Didn't try to set it up as a server because thats just overkill for what I use it for, so I had no use for it as a server.
rb07 wrote:Diablofan :

Just an idea, do you have a firewall or any kind of "Internet security"?

What you described sounds like some reports about really crapy versions of those.
Nope, just Windows Firewall at the time, it was, quite literally at the time, a fresh install.
rb07 wrote:Fixed stand-alone operation. You can run local sessions now.

Changed to libevent 1.4.14 .

Updated the downloads link viewtopic.php?f=1&t=7612&p=37848#p37848 with the build of version 2.00 release.

I'll update the Wiki next, for those who like to build it themselves. Did not build the GTK+ application... but since most of the changes I made where to libtransmission it may also work (it should).

I'll probably follow Longinus00 advice and start a new thread later, it would be nice to have more people testing, I'm sure there are more little bugs but nothing as big as Diablofan reported above (for those technically inclined: it was select() being used to wait, the Windows select() was just returning an error so the program looped as fast as it could; I changed to gnulib but it turned out it also had a bug on select() when used for waiting).
*makes note to test this version to see if it produces the same error*

So the problem was with an endless loop with select() eh? Well, that sounds like it would drive the processor to overheat.

I'll try to get back with info about this build and if it reproduces this error or not (hopefully not) soon, after my friend goes home so I can use my desktop again.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

Diablofan :

We are at version 2.01 now, and a new revision of that one will follow shortly (I received a bug report about file names and paths with non-ASCII characters not working).

Also you mention a "fresh install"... that reminded me of likely problems one finds in Windows: the Windows Firewall will block the communication (it used to pop up a panel asking if you want to keep it blocked or not, but since I work with the firewall disabled I'm not sure if it still does that).

And then is the limit on "simultaneous" connections, the infamous tcpip.sys limit. While I was testing on a Windows XP Home laptop it silently dropped connections, and the limit was 10; Windows XP Pro is a little better; in both I changed the limit. I don't know about the other flavors of Windows.
Diablofan
Posts: 5
Joined: Fri Jun 04, 2010 10:53 pm

Re: Build Transmission on Windows

Post by Diablofan »

rb07 wrote:Diablofan :

We are at version 2.01 now, and a new revision of that one will follow shortly (I received a bug report about file names and paths with non-ASCII characters not working).

Also you mention a "fresh install"... that reminded me of likely problems one finds in Windows: the Windows Firewall will block the communication (it used to pop up a panel asking if you want to keep it blocked or not, but since I work with the firewall disabled I'm not sure if it still does that).

And then is the limit on "simultaneous" connections, the infamous tcpip.sys limit. While I was testing on a Windows XP Home laptop it silently dropped connections, and the limit was 10; Windows XP Pro is a little better; in both I changed the limit. I don't know about the other flavors of Windows.
I know, I read all the way up before replying :P

I added Transmission into the firewall as an allowed program, I'll try with Windows Firewall disabled.

And as for the simultaneous connections issue, I'm gonna patch that up if I haven't done that already...I don't think I did.
Diablofan
Posts: 5
Joined: Fri Jun 04, 2010 10:53 pm

Re: Build Transmission on Windows

Post by Diablofan »

I think we have a winner now.

Transmission 2.01 (10898) works great on Windows 7 Ultimate.

Just batch added the torrents I had loaded from uTorrent, located all the data and it's working like a charm. No bogging down, no overheating.

One bug, which I think is one, I did come across was that when I added a torrent and the files were located somewhere other than the default downloads folder, I couldn't verify the data even though I changed the location when I was in the add torrent dialouge. I clicked it yet it wouldn't verify. Right clicked it to set the location, ticked Local data is already there, clicked okay, then tried to verify again but it wouldn't verify. =\
deeznutz
Posts: 1
Joined: Wed Jul 14, 2010 8:58 am

Re: Build Transmission on Windows

Post by deeznutz »

I apologize if this has been asked before, but is it possible for QTr to only allow for a single instance of the application to be ran?

I have associated the .torrent extension with qtr.exe, but sadly each time i double click on a torrent file in a web browser, or in windows explorer, a new QTR window/app is launched :(
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

deeznutz wrote:I apologize if this has been asked before, but is it possible for QTr to only allow for a single instance of the application to be ran?
No, at least not yet.
I have associated the .torrent extension with qtr.exe, but sadly each time i double click on a torrent file in a web browser, or in windows explorer, a new QTR window/app is launched :(
Starting with version 2.00 the Qt application added DBUS support which probably was intended to do exactly what you want... but Windows doesn't use DBUS, it normally uses DDE for this.

To build the 2.x series I built DBUS for Windows, re-build Qt with DBUS support enabled, and added the libraries to the install package. But I don't have plans to use it, so all you get for all that work is an error message (if you run the application from a terminal/console) that says that the DBUS daemon is not running.

If you want to experiment I could make available the DBUS daemon and tools, you'll need to learn how to use it, what to do, and at the end probably find that it doesn't do any good because the browser (Windows Explorer, and your default Web browser) don't use DBUS anyway... well that was very pessimistic... you probably can make it work, but instead of associating the file extension to the QTr application you'll have to use the DBUS tool to "send a message" to the application... if its running... or start it if its not. Qt's DBUS support on Windows looks like being old or incomplete, and its not easy to find documentation about what they have done; I tried.

Did you experiment with the DDE part of the file extension association? I don't know if Qt adds something (in Windows) to make that work.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

deeznutz :

I tested DBUS and it works as you expected, no problems.

I don't have an install package already made since to run a daemon on Windows you need a small helper program (to install it as a Windows service), dbus-launch doesn't seem to do what is needed. But using the dbus-daemon in "session" mode, as needed, is very simple. Nothing else is required since QTransmission already does the work (checks if its already running using DBUS and just adds the torrent(s) before exiting; the first QTr instantly opens the add torrent panel).

With the next revision of QTransmission I'll add the file association, the magnet URL association (if I find how to do that), and a separate installer for DBUS.

Answering my own question: no, Qt doesn't have DDE support. So the easy way on Windows is not an option.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

Version 2.03 is available on the usual list: viewtopic.php?f=1&t=7612&p=37848#p37848

Changes in this version:
  • The installer adds or modifies .torrent and magnet association. Just like deeznutz asked, this enables a single instance of the application to open torrent and magnet files (from your Web or file browser for instance). Warning: My installer takes control of the associations with no questions asked, so if you use other torrent client... ask nicely and I'll make the installer ask or something.
  • The "one instance" works via D-Bus. I was going to make available an installer for it but found that I didn't need to, dbus-daemon is now part of the installation, and the user doesn't have to do anything, libdbus (used by the application) launches the daemon if none is running.
  • Changed libcurl version to latest, 7.21.0 .
  • Changed libevent to latest, 1.4.14b-stable .
  • Executables and libraries are compressed with upx (to save a few MB on download).
  • Some bugs in the 2.03 distribution were corrected, you can see the changes in the patch files on the Wiki: https://trac.transmissionbt.com/wiki/Bu ... ionlibrary, most of the differences are the "porting to Windows" part, some are changes in development that I consider worth using now.
  • Not fixed: handling of "non-English" (actually non ASCII) file names. This is work in progress.
  • Not fixed: Diablofan report about local verification. Actually I haven't checked, I did check that it works with a remote session, no problem, I don't know if local sessions misbehave.
Thanks to Jordan and jch for their changes.
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Build Transmission on Windows

Post by Jordan »

rb07, thanks for continuing to do these builds. It's very cool to see this progressing along. :)
Longinus00
Posts: 137
Joined: Fri Aug 21, 2009 5:46 am

Re: Build Transmission on Windows

Post by Longinus00 »

rb07 wrote:Version 2.03 is available on the usual list: viewtopic.php?f=1&t=7612&p=37848#p37848

Changes in this version:
  • Some bugs in the 2.03 distribution were corrected, you can see the changes in the patch files on the Wiki: https://trac.transmissionbt.com/wiki/Bu ... ionlibrary, most of the differences are the "porting to Windows" part, some are changes in development that I consider worth using now.
Is this really necessary?

Code: Select all

diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/utils.cc transmission-2.03/qt/utils.cc
--- transmission-2.03-orig/qt/utils.cc	2010-07-20 23:13:42.000000000 -0500
+++ transmission-2.03/qt/utils.cc	2010-07-21 20:31:45.000000000 -0500
@@ -76,12 +76,12 @@
         else if( size < (int64_t)GIGABYTE_FACTOR )
         {
             displayed_size = (double)size / MEGABYTE_FACTOR;
-            str = tr( "%L1 MiB" ).arg( displayed_size,  0, 'f', 1 );
+            str = tr( "%L1 MiB" ).arg( displayed_size,  0, 'f', 2 );
         }
         else
         {
             displayed_size = (double) size / GIGABYTE_FACTOR;
-            str = tr( "%L1 GiB" ).arg( displayed_size,  0, 'f', 1 );
+            str = tr( "%L1 GiB" ).arg( displayed_size,  0, 'f', 3 );
         }
     }
 
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Build Transmission on Windows

Post by rb07 »

Longinus00
No, that is just one of my preferences, I like to see more digits as the units get bigger... and somebody even asked nicely on this forum about making that a configurable option.
chk712
Posts: 4
Joined: Thu Jul 29, 2010 2:43 pm

Re: Build Transmission on Windows

Post by chk712 »

Hi rb07,

first of all thanks for doing this. Transmission is my favourite BitToorent-Client so i'm looking forward to see it on Windows too. :)

However i have a little problem. I installed the latest Version, v2.03 of Transmission on Windows, it was a bit buggy though and crashed often so i wanted to uninstall it using the Uninstaller in Transmission's directory, but it failed to uninstall it. I get following error when it says "Uninstall is completed" and i click on the finish button:

Code: Select all

can't read "conf(UninstallRemoved)": no such element in array
can't read "conf(UninstallRemoved)": no such element in array
    while executing
"if {$conf(UninstallRemoved) && !$conf(UninstallRenamed)} {

puts $fp "set uninstall [list $conf(uninstall)]"
puts $fp {
set i 0
while {[file exists $u..."
    (procedure "::InstallJammer::CleanupTmpDir" line 20)
    invoked from within
"::InstallJammer::CleanupTmpDir "
    (procedure "::InstallJammer::exit" line 12)
    invoked from within
"::InstallJammer::exit"
    (procedure "::InstallJammer::FinishEventHandler" line 7)
    invoked from within
"::InstallJammer::FinishEventHandler .wizard"
    (command bound to event)
I can't even close the window then, got to finish it by clicking close on the context menu in the window bar.

I'd also be interested in what Transmission leaves on the hard disk when it was uninstalled. Any folders in AppData or something?

Using Windows Vista 64-bit btw.

Greetings, chk
Post Reply