kvirc / KVIrc

The KVIrc IRC Client
http://www.kvirc.net/
GNU General Public License v2.0
236 stars 75 forks source link

Crash while pasting a previous channel log #2103

Closed AndrioCelos closed 8 years ago

AndrioCelos commented 8 years ago

Expected behavior

The log would be pasted into the channel window.

Actual behavior

Segmentation fault.

Steps to reproduce the issue

  1. Download the attached file and replace a recent channel log file with it.
  2. Open the channel in question (with the 'Paste last channel log' option enabled)

    System information

This was first observed on Windows 10, 64-bit, but I was able to reproduce it in Ubuntu 16.04, 32-bit, as well. The KVIrc version is as of commit https://github.com/kvirc/KVIrc/commit/05c7d2e523bdeb25909be6cbb963188bf66b563a.

A stack trace from the latter follows:

#0  __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50
#1  0xb7f1735b in QString::QString (this=0xbfffe108, ch=0x258008 <error: Cannot access memory at address 0x258008>) at /usr/include/i386-linux-gnu/qt5/QtCore/qstring.h:650
#2  0xb7f198cb in KviQString::vsprintf (szSrc=..., szFmt=..., list=0xbfffe1d4 "") at /home/andrea/KVIrc/src/kvilib/core/KviQString.cpp:699
#3  0x081be82e in KviWindow::output (this=0x8a2f580, iMsgType=25, datetime=..., szFmt=...) at /home/andrea/KVIrc/src/kvirc/ui/KviWindow.cpp:1279
#4  0x081bfebe in KviWindow::pasteLastLog (this=0x8a2f580) at /home/andrea/KVIrc/src/kvirc/ui/KviWindow.cpp:1520
#5  0x08106559 in KviChannelWindow::KviChannelWindow (this=0x8a2f580, lpConsole=0x887a448, szName=...) at /home/andrea/KVIrc/src/kvirc/ui/KviChannelWindow.cpp:242
#6  0x082e8db6 in KviIrcConnection::createChannel (this=0x89dcdc8, szName=...) at /home/andrea/KVIrc/src/kvirc/kernel/KviIrcConnection.cpp:637
#7  0x081d6449 in KviIrcServerParser::parseLiteralJoin (this=0x8727678, msg=0xbfffe4cc) at /home/andrea/KVIrc/src/kvirc/sparser/KviIrcServerParser_literalHandlers.cpp:310
#8  0x0820238a in KviIrcServerParser::parseMessage (this=0x8727678, message=0x8a2af70 ":Artur!Andrio@192.168.0.42 JOIN #angelina * :\003\065\017'Andrio Celos'", pConnection=0x89dcdc8)
    at /home/andrea/KVIrc/src/kvirc/sparser/KviIrcServerParser.cpp:110
#9  0x082f009a in KviIrcConnection::incomingMessage (this=0x89dcdc8, pcMessage=0x8a2af70 ":Artur!Andrio@192.168.0.42 JOIN #angelina * :\003\065\017'Andrio Celos'")
    at /home/andrea/KVIrc/src/kvirc/kernel/KviIrcConnection.cpp:1936
#10 0x0830889b in KviIrcLink::processData (this=0x8573400, 
    buffer=0xbfffe60b ":Artur!Andrio@192.168.0.42 JOIN #angelina * :\003\065\017'Andrio Celos'\r\n:local.test.andriocelos.ml 332 Artur #angelina :\002This\002 is a \035test\035.\r\n:local.test.andriocelos.ml 333 Artur #angelina Andrio 1470547280\r\n:"..., iLen=445) at /home/andrea/KVIrc/src/kvirc/kernel/KviIrcLink.cpp:263
#11 0x0830dc92 in KviIrcSocket::readData (this=0x89db760) at /home/andrea/KVIrc/src/kvirc/kernel/KviIrcSocket.cpp:1558
#12 0x08345ce7 in KviIrcSocket::qt_static_metacall (_o=0x89db760, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfffeb34) at /home/andrea/KVIrc/build/src/kvirc/moc_KviIrcSocket.cpp:92
#13 0xb41de611 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#14 0xb41deb0d in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#15 0xb4261191 in QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#16 0xb41eac59 in QSocketNotifier::event(QEvent*) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#17 0xb4a9315a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQt5Widgets.so.5
#18 0xb4a9881c in QApplication::notify(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQt5Widgets.so.5
#19 0xb41ae81f in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#20 0xb42070d6 in ?? () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#21 0xb363ce29 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#22 0xb363d0c9 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#23 0xb363d194 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#24 0xb4206af3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#25 0xb026aa81 in ?? () from /usr/lib/i386-linux-gnu/libQt5XcbQpa.so.5
#26 0xb41ab953 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#27 0xb41abdaa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#28 0xb41b4385 in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/sse2/libQt5Core.so.5
#29 0xb44d4931 in QGuiApplication::exec() () from /usr/lib/i386-linux-gnu/sse2/libQt5Gui.so.5
#30 0xb4a8f024 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQt5Widgets.so.5
#31 0x08315b16 in main (argc=1, argv=0xbffff144) at /home/andrea/KVIrc/src/kvirc/kernel/KviMain.cpp:488

The offending log file is attached: channel_#gonintendo.irchighway_2016.08.11.log (The file has been renamed because GitHub didn't allow me to upload it with a .log extension.)

The problem seems to be with line 34.

un1versal commented 8 years ago

2 days or so ago in IRC someone else was talking to staticfox (you and I were involved at some stage) regarding sending some RAW command in response to some RPL(or something) that hung KVIrc (I think he had a crash too)

anywho it turned out the hang was log related

Stanzilla commented 8 years ago

I guess I am in the same boat then, I had the crash from old query logs, could not (ba) to find the right one though.

un1versal commented 8 years ago

could not (ba) to find the right one though.

taunt