Bug 232785 - Crash on DCC Chat
Summary: Crash on DCC Chat
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-31 01:55 UTC by Julien Humbert
Modified: 2010-03-31 19:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace from KCrash (5.09 KB, application/octet-stream)
2010-03-31 01:56 UTC, Julien Humbert
Details
Backtrace on debugfull (4.34 KB, application/octet-stream)
2010-03-31 02:11 UTC, Julien Humbert
Details
Relevant Backtrace, with debugging symbols really enabled (7.46 KB, text/plain)
2010-03-31 14:36 UTC, Julien Humbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Humbert 2010-03-31 01:55:39 UTC
Version:           Version 1.2.3+ #4032 (latest Git) (using KDE 4.4.1)
Compiler:          gcc version 4.4.3 20100316 (prerelease) (GCC) 
OS:                Linux
Installed from:    Archlinux Packages

As of commit 5127d1ce71b264696a5e7f38971643fe251ecae4, Konversation crashes on DCC Chat. Reverting this change should be made.

Backtrace attached.
Comment 1 Julien Humbert 2010-03-31 01:56:49 UTC
Created attachment 42391 [details]
Backtrace from KCrash
Comment 2 Eike Hein 2010-03-31 02:00:33 UTC
Unfortunately the backtrace is not useful -- could you rebuild with -DCMAKE_BUILD_TYPE=debugfull and crash it again?
Comment 3 Julien Humbert 2010-03-31 02:11:42 UTC
Created attachment 42392 [details]
Backtrace on debugfull

Seems not to be more informative, I probably have to install more debug packages ?
Comment 4 Eike Hein 2010-03-31 02:15:03 UTC
The debug packages for kdelibs and qt would probably be good, yeah - thanks :).
Comment 5 Julien Humbert 2010-03-31 02:42:03 UTC
I will provide full backtrace, with debug packages a bit later, I have to recompile the packages (Archlinux doesn't provide debug precompiled packages).
Comment 6 Eike Hein 2010-03-31 02:46:06 UTC
Thanks! Sorry for the hassle.
Comment 7 Julien Humbert 2010-03-31 13:55:53 UTC
I missed something when compiling because the report is the same as previous, I think I can't go further in this way with Arch, I don't know handle this to much. But to test a bit more, I reverted to e5cc8a7a831152f541edbfe717d9ee54253ef57d and it still crashes, so it is not 5127d1ce71b264696a5e7f38971643fe251ecae4 commit that is in fault, I will try to find the one, because I know it worked 1 or 2 week before.
Comment 8 Julien Humbert 2010-03-31 14:36:24 UTC
Created attachment 42404 [details]
Relevant Backtrace, with debugging symbols really enabled

Oh, I've forgot to disable debug symbols stripping from Konversation in the last tests, my bad.

So here is a relevant Backtrace.

(And I didn't found in the last commits the one that is making crash the app)
Comment 9 argonel 2010-03-31 18:59:20 UTC
commit 51c20ebc0cb6a15aa69c96c364d956c5fdbc16a9
Author: eli mackenzie <argonel@gmail.com>
Date:   Wed Mar 31 12:50:19 2010 -0400

    prevent a dcc chat from failing at creation
    
    -uninitialized variables are not your friend
    -ensure text view is created even if m_chatExtension has a strange value
    BUG:232785

diff --git a/src/dcc/chat.cpp b/src/dcc/chat.cpp
index 7eda290..cc5d15a 100644
--- a/src/dcc/chat.cpp
+++ b/src/dcc/chat.cpp
@@ -42,7 +42,8 @@ namespace Konversation
               m_selfOpened(true),
               m_dccSocket(0),
               m_dccServer(0),
-              m_chatStatus(Configuring)
+              m_chatStatus(Configuring),
+              m_chatExtension(Unknown)
         {
             kDebug();
             // set default values
diff --git a/src/dcc/chatcontainer.cpp b/src/dcc/chatcontainer.cpp
index ca5b866..96ecb8d 100644
--- a/src/dcc/chatcontainer.cpp
+++ b/src/dcc/chatcontainer.cpp
@@ -48,13 +48,7 @@ namespace Konversation
             m_headerSplitter->setStretchFactor(m_headerSplitter->indexOf(m_topicLabel), 0);
 
             // setup layout
-            if (m_chat->extension() == Chat::SimpleChat || m_chat->extension() == Chat::Unknown)
-            {
-                IRCViewBox *ircViewBox = new IRCViewBox(m_headerSplitter, 0);
-                m_headerSplitter->setStretchFactor(m_headerSplitter->indexOf(ircViewBox), 1);
-                setTextView(ircViewBox->ircView());
-            }
-            else if (m_chat->extension() == Chat::Whiteboard)
+            if (m_chat->extension() == Chat::Whiteboard)
             {
                 QSplitter* chatSplitter = new QSplitter(Qt::Vertical);
 
@@ -70,6 +64,12 @@ namespace Konversation
 
                 m_headerSplitter->addWidget(chatSplitter);
             }
+            else //(m_chat->extension() == Chat::SimpleChat || m_chat->extension() == Chat::Unknown)
+            {
+                IRCViewBox *ircViewBox = new IRCViewBox(m_headerSplitter, 0);
+                m_headerSplitter->setStretchFactor(m_headerSplitter->indexOf(ircViewBox), 1);
+                setTextView(ircViewBox->ircView());
+            }
 
             m_dccChatInput = new IRCInput(this);
             getTextView()->installEventFilter(m_dccChatInput);
Comment 10 Julien Humbert 2010-03-31 19:56:05 UTC
Working great, nice fix, thanks :)
Comment 11 Eike Hein 2010-03-31 19:58:07 UTC
Thanks for going through all the trouble to get us the backtrace, too :).