Bug 228731 - crash when senting expired files.
Summary: crash when senting expired files.
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: dcc (show other bugs)
Version: 1.2.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Bernd Buschinski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-27 12:23 UTC by Filipe Azevedo
Modified: 2010-02-28 20:38 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (5.05 KB, text/plain)
2010-02-28 02:32 UTC, Filipe Azevedo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filipe Azevedo 2010-02-27 12:23:37 UTC
Application: konversation (1.2.3)
KDE Platform Version: 4.4.00 (KDE 4.4.0)
Qt Version: 4.6.1
Operating System: Linux 2.6.31-19-generic x86_64
Distribution: Ubuntu 9.10

-- Information about the crash:
I had sent files that expired, so i selected the 2 files then right click -> sent again -> boom crash ;)

 -- Backtrace:
Application: Konversation (konversation), signal: Segmentation fault
[KCrash Handler]
#5  QSortFilterProxyModelPrivate::proxy_to_source (this=0x2b146d0, proxy_index=...) at itemviews/qsortfilterproxymodel.cpp:331
#6  0x00007f71171c91bd in QSortFilterProxyModel::mapToSource (this=<value optimized out>, proxyIndex=...) at itemviews/qsortfilterproxymodel.cpp:2454
#7  0x00007f71171bfad6 in QSortFilterProxyModel::data (this=0x2b146d0, index=..., role=0) at itemviews/qsortfilterproxymodel.cpp:1675
#8  0x00000000005b1f2f in _start ()

Reported using DrKonqi
Comment 1 Dario Andres 2010-02-27 14:30:24 UTC
- If you can reproduce the crash at will (or you experience this regularly), can you install the "konversation-dbg" package and post a complete backtrace here? (you can get more information at http://techbase.kde.org/User:DarioAndres/Basic_Guide_about_Crash_Reporting ) Thanks
Comment 2 Filipe Azevedo 2010-02-28 02:32:50 UTC
Created attachment 41184 [details]
New crash information added by DrKonqi

Senting again files that have been cancelled/experied.
More than one file selected when right click / sent again was triggered
Comment 3 Bernd Buschinski 2010-02-28 20:38:22 UTC
commit 0714f669109cf3402748bcb651860c913e222bb9
Author: Bernd Buschinski <b.buschinski@web.de>
Date:   Sun Feb 28 20:04:52 2010 +0100

    - Fix crash when resend file action is used with more than one
      selected transfer.

    BUG:228849

diff --git a/src/dcc/transferpanel.cpp b/src/dcc/transferpanel.cpp
index 68fe48b..fb7198c 100644
--- a/src/dcc/transferpanel.cpp
+++ b/src/dcc/transferpanel.cpp
@@ -248,6 +248,7 @@ namespace Konversation

         void TransferPanel::resendFile()
         {
+            QList<Transfer*> transferList;
             foreach (const QModelIndex &index, m_transferView->selectedRows())
             {
                 if (index.data(TransferListModel::TransferType).toInt() ==
Transfer::Send &&
@@ -258,18 +259,22 @@ namespace Konversation
                     {
                         continue;
                     }
+                    transferList.append(transfer);
+                }
+            }

-                    TransferSend *newTransfer =
Application::instance()->getDccTransferManager()->newUpload();
+            foreach (Transfer* transfer, transferList)
+            {
+                TransferSend *newTransfer =
Application::instance()->getDccTransferManager()->newUpload();

-                    newTransfer->setConnectionId(transfer->getConnectionId());
-                    newTransfer->setPartnerNick(transfer->getPartnerNick());
-                    newTransfer->setFileURL(transfer->getFileURL());
-                    newTransfer->setFileName(transfer->getFileName());
+                newTransfer->setConnectionId(transfer->getConnectionId());
+                newTransfer->setPartnerNick(transfer->getPartnerNick());
+                newTransfer->setFileURL(transfer->getFileURL());
+                newTransfer->setFileName(transfer->getFileName());

-                    if (newTransfer->queue())
-                    {
-                        newTransfer->start();
-                    }
+                if (newTransfer->queue())
+                {
+                    newTransfer->start();
                 }
             }
         }