HEAP[qbittorrent.exe]: Invalid Address specified to RtlFreeHeap

Bug #571085 reported by lihuishuo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
High
Christophe Dumez

Bug Description

 const QVariantList& visualIndexes = settings.value(QString::fromUtf8("TransferListVisualIndexes"), QVariantList()).toList();
  if(visualIndexes.size() != listModel->columnCount()-1) {
    qDebug("Corrupted values for transfer list columns indexes");
    return false;
  }
  bool change = false;
  do {
    change = false;
    for(int i=0;i<visualIndexes.size(); ++i) {
      const int new_visual_index = visualIndexes.at(header()->logicalIndex(i)).toInt();
      if(i != new_visual_index) {
        qDebug("Moving column from %d to %d", header()->logicalIndex(i), new_visual_index);
        header()->moveSection(i, new_visual_index);
        change = true;
      }
    }
  }while(change);
  qDebug("Transfer list columns width loaded");
  return true;

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I don't see any changes in those lines. Do you think the crash is caused by this code but you don't know exactly what causes it?

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
Revision history for this message
lihuishuo (wwwlhs) wrote : Re:[Bug 571085] Re: HEAP[qbittorrent.exe]: Invalid Address specified to RtlFreeHeap

I try copy the code to the other project,it's all right.
I have nothing idea....

But ,in qBittorrent project,every with QSetting read registry of REG_MUITL_SZ fields are have "Invalid Address specified to RtlFreeHeap"

PS:My english is poor, I hope you would excuse me.<br><br>在2010-04-28 19:50:16,"Christophe Dumez" <email address hidden> 写道:
>I don't see any changes in those lines. Do you think the crash is caused
>by this code but you don't know exactly what causes it?
>
>** Changed in: qbittorrent
> Assignee: (unassigned) => Christophe Dumez (hydr0g3n)
>
>--
>HEAP[qbittorrent.exe]: Invalid Address specified to RtlFreeHeap
>https://bugs.launchpad.net/bugs/571085
>You received this bug notification because you are a direct subscriber
>of the bug.
>
>Status in qBittorrent - An advanced bittorrent client in C++ / Qt4: New
>
>Bug description:
> const QVariantList& visualIndexes = settings.value(QString::fromUtf8("TransferListVisualIndexes"), QVariantList()).toList();
> if(visualIndexes.size() != listModel->columnCount()-1) {
> qDebug("Corrupted values for transfer list columns indexes");
> return false;
> }
> bool change = false;
> do {
> change = false;
> for(int i=0;i<visualIndexes.size(); ++i) {
> const int new_visual_index = visualIndexes.at(header()->logicalIndex(i)).toInt();
> if(i != new_visual_index) {
> qDebug("Moving column from %d to %d", header()->logicalIndex(i), new_visual_index);
> header()->moveSection(i, new_visual_index);
> change = true;
> }
> }
> }while(change);
> qDebug("Transfer list columns width loaded");
> return true;
>
>To unsubscribe from this bug, go to:
>https://bugs.launchpad.net/qbittorrent/+bug/571085/+subscribe

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

According to my research (http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/2c816330-899a-44cd-b363-ffdc90796693), this might be due to the fact that you are compiling in debug mode but you are missing debug information for some libraries.

One solution may simply be to compile in release mode?

P.S: If you cannot understand part of my text, just tell me and I can ask my fiancee to translate in Chinese for you.

Revision history for this message
lihuishuo (wwwlhs) wrote :

Thank you very much.
I can read some.<br><br>在2010-05-01 18:02:33,"Christophe Dumez" <email address hidden> 写道:
>According to my research (http://social.msdn.microsoft.com/forums/en-
>US/vclanguage/thread/2c816330-899a-44cd-b363-ffdc90796693), this might
>be due to the fact that you are compiling in debug mode but you are
>missing debug information for some libraries.
>
>One solution may simply be to compile in release mode?
>
>P.S: If you cannot understand part of my text, just tell me and I can
>ask my fiancee to translate in Chinese for you.
>
>--
>HEAP[qbittorrent.exe]: Invalid Address specified to RtlFreeHeap
>https://bugs.launchpad.net/bugs/571085
>You received this bug notification because you are a direct subscriber
>of the bug.
>
>Status in qBittorrent - An advanced bittorrent client in C++ / Qt4: New
>
>Bug description:
> const QVariantList& visualIndexes = settings.value(QString::fromUtf8("TransferListVisualIndexes"), QVariantList()).toList();
> if(visualIndexes.size() != listModel->columnCount()-1) {
> qDebug("Corrupted values for transfer list columns indexes");
> return false;
> }
> bool change = false;
> do {
> change = false;
> for(int i=0;i<visualIndexes.size(); ++i) {
> const int new_visual_index = visualIndexes.at(header()->logicalIndex(i)).toInt();
> if(i != new_visual_index) {
> qDebug("Moving column from %d to %d", header()->logicalIndex(i), new_visual_index);
> header()->moveSection(i, new_visual_index);
> change = true;
> }
> }
> }while(change);
> qDebug("Transfer list columns width loaded");
> return true;
>
>To unsubscribe from this bug, go to:
>https://bugs.launchpad.net/qbittorrent/+bug/571085/+subscribe

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I'm trying to compile qBittorrent on Windows so that we can provide an official executable.
I managed to compile quite easily but it crashes on startup (when creating the QLocalSocket in main.cpp).

Could you please give me the commands you used to compile boost and libtorrent?

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. I figured out that I needed to create the qApp earlier. Now, it crashes on debug messages (like you had). Did you manage to fix this issue?

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

For your information, I have made a lot of Windows-related fixes in SVN branches/v2_2_x branch.

qBittorrent is now compiling and executing fine on Windows. We will officially package v2.2.9 for Windows. Thanks a lot for your helpful fixes and feedback.

Changed in qbittorrent:
milestone: none → 2.2.9
status: New → Fix Committed
Revision history for this message
lihuishuo (wwwlhs) wrote :

thanks a lot.
I have a idea.upload compiling depend to SVN.this can help most beginner,like me. :-)

在2010-05-31 03:51:27,"Christophe Dumez" <email address hidden> 写道:
>For your information, I have made a lot of Windows-related fixes in SVN
>branches/v2_2_x branch.
>
>qBittorrent is now compiling and executing fine on Windows. We will
>officially package v2.2.9 for Windows. Thanks a lot for your helpful
>fixes and feedback.
>
>** Changed in: qbittorrent
> Status: New => Fix Committed
>
>** Changed in: qbittorrent
> Milestone: None => 2.2.9
>
>--
>HEAP[qbittorrent.exe]: Invalid Address specified to RtlFreeHeap
>https://bugs.launchpad.net/bugs/571085
>You received this bug notification because you are a direct subscriber
>of the bug.
>
>Status in qBittorrent - An advanced bittorrent client in C++ / Qt4: Fix Committed
>
>Bug description:
> const QVariantList& visualIndexes = settings.value(QString::fromUtf8("TransferListVisualIndexes"), QVariantList()).toList();
> if(visualIndexes.size() != listModel->columnCount()-1) {
> qDebug("Corrupted values for transfer list columns indexes");
> return false;
> }
> bool change = false;
> do {
> change = false;
> for(int i=0;i<visualIndexes.size(); ++i) {
> const int new_visual_index = visualIndexes.at(header()->logicalIndex(i)).toInt();
> if(i != new_visual_index) {
> qDebug("Moving column from %d to %d", header()->logicalIndex(i), new_visual_index);
> header()->moveSection(i, new_visual_index);
> change = true;
> }
> }
> }while(change);
> qDebug("Transfer list columns width loaded");
> return true;
>
>To unsubscribe from this bug, go to:
>https://bugs.launchpad.net/qbittorrent/+bug/571085/+subscribe

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. I experience exactly the same problem as you. This is specific to msvc compiler and I am currently working on getting this to work properly. Apparently, msvc does not like me storing QVariantLists in QSettings. I found a solution but I need to fix this everywhere in the code.

Changed in qbittorrent:
status: Fix Committed → In Progress
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. All is fixed in SVN. It is now possible to build qBittorrent with msvc on Windows by following the instructions at:
http://sourceforge.net/apps/mediawiki/qbittorrent/index.php?title=Windows#Compilation_Steps

I also uploaded pre-built versions of the libs (see wiki page also).

We will provide official installers soon. Thanks a lot for your help and feedback, you played a big part in porting qBittorrent to Windows.

Changed in qbittorrent:
status: In Progress → Fix Committed
importance: Undecided → High
Changed in qbittorrent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.