HyDr0g3n - | 3 Nov 2007 00:09
Picon
Favicon

reload problem


Since recent libtorrent svn, my reloadTorrent code is crashing and I don't understand why. Here is the code :

  // Remove torrent
  s->remove_torrent(h.get_torrent_handle());
  // Add torrent again to session
  unsigned int timeout = 0;
  while(h.is_valid() && timeout < 6) {
    qDebug("Waiting for the torrent to be removed...");
    SleeperThread::msleep(1000);
    ++timeout;
  }
  QTorrentHandle new_h;
  if(full_alloc) {
    new_h = s->add_torrent(t, saveDir, resumeData, storage_mode_allocate);
    qDebug("Using full allocation mode");
  } else {
    new_h = s->add_torrent(t, saveDir, resumeData, storage_mode_sparse);
    qDebug("Using sparse mode");
  }

Here is the bug I get : 
http://pastebin.ca/759204

Is this a bug in libtorrent or is my code wrong?

Regards,
Chris.
_________________________________________________________________
Retrouvez Windows Live Messenger sur votre mobile !
(Continue reading)

HyDr0g3n - | 3 Nov 2007 19:08
Picon
Favicon

Bug piece_picker


A qBittorrent user reported a problem with latest svn:
https://bugs.launchpad.net/qbittorrent/+bug/150636/comments/16
https://bugs.launchpad.net/qbittorrent/+bug/150636/comments/18

Apparently this is linked to the piece picker. Could you look into it please?

Chris.
_________________________________________________________________
Votez pour vos acteurs de séries TV préférés et tentez de gagner un voyage à Hawaï !
http://messengerawards.divertissements.fr.msn.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Ishan Arora | 4 Nov 2007 22:28
Picon

libtorrent torrent_status::pieces_progress

Hi,

I am writing a real-progress-bar for qBittorrent using the bitmask
torrent_status::pieces. For this purpose it would be better if there was a
vector<float>* pieces_progress. Please tell me if an equivalent is already
present in the library or if it could be added soon. Thanks.

Regards,
Ishan
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Arvid Norberg | 6 Nov 2007 09:06
Picon
Picon
Favicon

Re: Bug piece_picker

On Nov 3, 2007, at 11:08, HyDr0g3n - wrote:
>
> A qBittorrent user reported a problem with latest svn:
> https://bugs.launchpad.net/qbittorrent/+bug/150636/comments/16
> https://bugs.launchpad.net/qbittorrent/+bug/150636/comments/18
>
> Apparently this is linked to the piece picker. Could you look into  
> it please?

This has been fixed already, in revision [1720].

--
Arvid Norberg

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Arvid Norberg | 6 Nov 2007 09:11
Picon
Picon
Favicon

Re: reload problem

This is caused by an optimization I introduced quite recently.

It's not shown where t comes from in this code snippet, I believe you  
get it by calling get_torrent_info() on your handle. If the torrent  
is seeding, torrent_info stored by libtorrent will be incomplete.  
Everything that is not required to seed the torrent will have been  
freed at that time. So, the torrent_info object you get from  
libtorrent cannot be used to add a new torrent again.

This is a bit unfortunate, and I did not think about this case when I  
introduced this optimization. I see 2 possible solutions:

1) add a way to tell libtorrent not to perform this optimization
2) the client can load the torrents from disk when they are re-added

--
Arvid Norberg

On Nov 2, 2007, at 16:09, HyDr0g3n - wrote:

>
> Since recent libtorrent svn, my reloadTorrent code is crashing and  
> I don't understand why. Here is the code :
>
>   // Remove torrent
>   s->remove_torrent(h.get_torrent_handle());
>   // Add torrent again to session
>   unsigned int timeout = 0;
>   while(h.is_valid() && timeout < 6) {
>     qDebug("Waiting for the torrent to be removed...");
(Continue reading)

Arvid Norberg | 6 Nov 2007 09:15
Picon
Picon
Favicon

Re: libtorrent torrent_status::pieces_progress

On Nov 4, 2007, at 13:28, Ishan Arora wrote:

> Hi,
>
> I am writing a real-progress-bar for qBittorrent using the bitmask
> torrent_status::pieces. For this purpose it would be better if  
> there was a
> vector<float>* pieces_progress. Please tell me if an equivalent is  
> already
> present in the library or if it could be added soon. Thanks.

No, there isn't. However, you can get the download queue for the  
torrent, and in it see which pieces are being downloaded. It also  
tells you which blocks are complete and which are currently being  
downloaded, as well as the number of bytes received of the blocks  
being downloaded. So, the information is there, it's just not  
compiled as a vector of floats.

--
Arvid Norberg

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
HyDr0g3n - | 6 Nov 2007 14:28
Picon
Favicon

Re: Bug piece_picker


This is what I thought, according to svn log. However, the user is still experiencing it apparently :
https://bugs.launchpad.net/qbittorrent/+bug/150636/

Chris.

----------------------------------------> From: arvid <at> cs.umu.se> Date: Tue, 6 Nov 2007 00:06:23
-0800> To: libtorrent-discuss <at> lists.sourceforge.net> Subject: Re: [libtorrent] Bug
piece_picker>> On Nov 3, 2007, at 11:08, HyDr0g3n - wrote:>>>> A qBittorrent user reported a problem with
latest svn:>> https://bugs.launchpad.net/qbittorrent/+bug/150636/comments/16>>
https://bugs.launchpad.net/qbittorrent/+bug/150636/comments/18>>>> Apparently this is linked
to the piece picker. Could you look into>> it please?>> This has been fixed already, in revision [1720].>>
--> Arvid Norberg>>>>
-------------------------------------------------------------------------> This SF.net email
is sponsored by: Splunk Inc.> Still grepping through log files to find problems? Stop.> Now Search log
events and configuration files using AJAX and a browser.> Download your FREE copy of Splunk now>>
http://get.splunk.com/> _______________________________________________> Libtorrent-discuss
mailing list> Libtorrent-discuss <at> lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss

_________________________________________________________________
Vous êtes plutôt Desperate ou LOST ? Personnalisez votre PC avec votre série TV préférée !
http://specials.divertissements.fr.msn.com/SeriesTV.aspx
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Mikhail Idris | 12 Nov 2007 06:44
Picon
Gravatar

Enable pe-support with visual studio?

How do you enable pe-support with visual studio? The documentation on the
website is not very helpful at all and doesn't show how except only being
build by others.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
MooPolice | 12 Nov 2007 07:51
Picon
Favicon

Re: Enable pe-support with visual studio?

> How do you enable pe-support with visual studio? The documentation on the
> website is not very helpful at all and doesn't show how except only being
> build by others.

add TORRENT_USE_OPENSSL to the projects preprocessor settings;
pe_crypto.cpp must be part of the project;
add path to the openssl header files, ie: "openssl\inc32";
add openssl lib, ie: "openssl\out32\libeay32.lib"

i hope i didn't forget anything

MassaRoddel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Valiulin Timur | 18 Nov 2007 14:26
Picon
Favicon

Invalid calculation of distance_exp between DHT nodes

Hi,

It seems that there is a bug in calculation routine for DHT buckets
The routine never returns correct distances for buckets 152, 144, 136 ( i.e. for buckets n = k * 8 ). Thus the
appropriate buckets are always starving.
Now the routine looks like:

int distance_exp(node_id const& n1, node_id const& n2)
{
  int byte = node_id::size - 1;
  for (node_id::const_iterator i = n1.begin(), j = n2.begin()
    , end(n1.end()); i != end; ++i, ++j, --byte)
  {
    TORRENT_ASSERT(byte >= 0);
    boost::uint8_t t = *i ^ *j;
    if (t == 0) continue;
    // we have found the first non-zero byte
    // return the bit-number of the first bit
    // that differs
    int bit = byte * 8;
    for (int b = 7; b > 0; --b)
      if (t >= (1 << b)) return bit + b;
    return bit;
  }

The inner cycle misses =, and after the fix it should look like:
    for (int b = 7; b >= 0; --b)

Best Regards,
Timur
(Continue reading)


Gmane