Bug 360797

Summary: Kate crashing opening binary file
Product: [Applications] kate Reporter: Davide Gianforte <davide>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: egorov
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The file that crashes Kate

Description Davide Gianforte 2016-03-20 21:25:03 UTC
Application: kate (15.12.3)
 (Compiled from sources)
Qt Version: 5.5.1
Operating System: Linux 4.5.0-rc6+ x86_64
Distribution (Platform): Slackware Packages

-- Information about the crash:
- What I was doing when the application crashed:

When I try to open this file, Kate crashes. Same with katepart editor (katepart viewer shows file correctly).

- Custom settings of the application:

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f83ab8a37c0 (LWP 6510))]

Thread 2 (Thread 0x7f83992b0700 (LWP 6512)):
#0  0x00007f83a4f082dd in poll () at /lib64/libc.so.6
#1  0x00007f83a1f8f112 in  () at /usr/lib64/libxcb.so.1
#2  0x00007f83a1f90ca7 in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007f839b0bfa59 in  () at /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f83a5b0a51f in  () at /usr/lib64/libQt5Core.so.5
#5  0x00007f83a31a3624 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f83a4f13f6d in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f83ab8a37c0 (LWP 6510)):
[KCrash Handler]
#6  0x00007f83a89b22eb in kencodingprober::UnicodeGroupProber::HandleData(char const*, unsigned int) (this=0x1c4fe50, aBuf=0x1ca7510 "\341\001\201P\212u\236\273@\242\346\203\001\254U\203\002\310*\203\003\254F\210\004\210\005\230\004\234\006\201\a\202a\274\362\266J\300\326o\326\210\b\377\023\210\t\377\023\203\025\214\356V\211\021\234\022\210\023\303sesensiti1", aLen=63) at /tmp/kde-build/frameworks/kcodecs-5.20.0/src/probers/UnicodeGroupProber.cpp:89
#7  0x00007f83a89b3f6a in kencodingprober::nsMBCSGroupProber::HandleData(char const*, unsigned int) (this=0x1ca5f40, aBuf=<optimized out>, aLen=<optimized out>) at /tmp/kde-build/frameworks/kcodecs-5.20.0/src/probers/nsMBCSGroupProber.cpp:119
#8  0x00007f83a89b5230 in kencodingprober::nsUniversalDetector::HandleData(char const*, unsigned int) (this=0x1ca5fc0, aBuf=0x1cf1568 "\341\001", aLen=120) at /tmp/kde-build/frameworks/kcodecs-5.20.0/src/probers/nsUniversalDetector.cpp:149
#9  0x00007f83a89abccc in KEncodingProber::feed(char const*, int) (this=this@entry=0x7ffec07f8f00, data=<optimized out>, len=len@entry=120) at /tmp/kde-build/frameworks/kcodecs-5.20.0/src/kencodingprober.cpp:181
#10 0x00007f83ab11b967 in Kate::TextBuffer::load(QString const&, bool&, bool&, int&, bool) (length=<optimized out>, offset=<optimized out>, this=<optimized out>) at /tmp/kde-build/frameworks/ktexteditor-5.20.0/src/buffer/katetextloader.h:266
#11 0x00007f83ab11b967 in Kate::TextBuffer::load(QString const&, bool&, bool&, int&, bool) (this=0x1c506a0, filename=..., encodingErrors=@0x1c50768: false, tooLongLinesWrapped=@0x1c50769: false, longestLineLoaded=@0x1c5076c: 0, enforceTextCodec=false) at /tmp/kde-build/frameworks/ktexteditor-5.20.0/src/buffer/katetextbuffer.cpp:621
#12 0x00007f83ab18b6db in KateBuffer::openFile(QString const&, bool) (this=0x1c506a0, m_file=..., enforceTextCodec=enforceTextCodec@entry=false) at /tmp/kde-build/frameworks/ktexteditor-5.20.0/src/document/katebuffer.cpp:195
#13 0x00007f83ab184451 in KTextEditor::DocumentPrivate::openFile() (this=0x1c4ff60) at /tmp/kde-build/frameworks/ktexteditor-5.20.0/src/document/katedocument.cpp:2252
#14 0x00007f83aae345fd in KParts::ReadOnlyPartPrivate::openLocalFile() (this=this@entry=0x1c50180) at /tmp/kde-build/frameworks/kparts-5.20.0/src/readonlypart.cpp:187
#15 0x00007f83aae3536b in KParts::ReadOnlyPart::openUrl(QUrl const&) (this=this@entry=0x1c4ff60, url=...) at /tmp/kde-build/frameworks/kparts-5.20.0/src/readonlypart.cpp:150
#16 0x00007f83ab16f4de in KTextEditor::DocumentPrivate::openUrl(QUrl const&) (this=0x1c4ff60, url=...) at /tmp/kde-build/frameworks/ktexteditor-5.20.0/src/document/katedocument.cpp:2596
#17 0x000000000044c6de in KateDocManager::openUrl(QUrl const&, QString const&, bool, KateDocumentInfo const&) ()
#18 0x000000000045e106 in KateViewManager::openUrl(QUrl const&, QString const&, bool, bool, KateDocumentInfo const&) ()
#19 0x0000000000445729 in KateApp::openDocUrl(QUrl const&, QString const&, bool) ()
#20 0x0000000000446694 in KateApp::startupKate() ()
#21 0x0000000000447b4d in KateApp::init() ()
#22 0x00000000004427fe in main ()

Possible duplicates by query: bug 357341.

Reported using DrKonqi
Comment 1 Davide Gianforte 2016-03-20 21:26:23 UTC
Created attachment 97995 [details]
The file that crashes Kate
Comment 2 Boris Egorov 2016-03-23 10:46:38 UTC
I can reproduce it. Looks like a problem in kcodecs.
Comment 3 Dominik Haumann 2016-03-24 19:56:27 UTC
Confirmed, closing as duplicate of bug #357341, though. seems to be same backtrace, and probably not a kate issue.

*** This bug has been marked as a duplicate of bug 357341 ***