On Mon, Aug 9, 2010 at 9:48 PM, Carlos Galisteo <cgalis...@k-rolus.net> wrote:

>> (and delete ~/.qwit2 and ~/.config/arti/qwit2.conf
>> $ qwit
>> (and configure for Twitter account WITHOUT OAuth)
>> Crash with output:
>> Fatal: ASSERT failure in QVector<T>::operator[]: "index out of range",
>> file /usr/include/qt4/QtCore/qvector.h, line 346

Well, I have this one.

As I thought, it is a problem with an empty tweets widget (empty vector).

As you can see in the attached patch it can be easily skipped just not
going though this lines on the first execution. (Obviously this is a
proof of concept I'll send to upstream so he can implement a cleaner
fix).

Alternatively, if you don't want to recompile, you can just edit
~/.qwit2/messages, and change '1\*\size' from 0 to 1. It'll allow you
to run the application for the first time.

Please confirm this workaround is working for you and if you are able
to reproduce the "HMAC(SHA1) is not supported" issue.

Thanks.


-- 
---
Carlos Galisteo <cgalisteo AT k-rolus.net>
GPG key :0x8E0076E9:
Fingerprint: 939E 3D10 EAA2 A972 3AF2  E25C 26B7 D8E3 8E00 76E9
---
--- src/QwitTools.cpp   (revisión: 346)
+++ src/QwitTools.cpp   (copia de trabajo)
@@ -784,12 +784,20 @@
        bool addingOldMessages = (messages.size() && (messages[0].id > receivedMessages[0].id));
 
     bool more = true;
-    for (int i = 0; i < receivedMessages.size(); ++i) {
-        if (receivedMessages[i].id > messages[messages.size() - 1].id) {
-            more = false;
+    
+    if (messages.size() > 0){
+        for (int i = 0; i < receivedMessages.size(); ++i) {
+            if (receivedMessages[i].id > messages[messages.size() - 1].id) {
+                more = false;
+            }
         }
     }
+    else{
 
+        cout << "First time here?\n";
+
+    }
+
        for (int i = 0; i < receivedMessages.size(); ++i) {
                usernames << receivedMessages[i].username;
                QVector<Message>::iterator j = qBinaryFind(messages.begin(), messages.end(), receivedMessages[i]);

Reply via email to