Bug 361537

Summary: libgit2 v0.23: Kate crashes on startup
Product: [Applications] kate Reporter: Łukasz Żarnowiecki <lukasz>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: christoph, nick, simonandric5
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: stacktrace
stacktrace
test log
stacktrace while opening file on local disk

Description Łukasz Żarnowiecki 2016-04-09 00:27:07 UTC
I am using kdeconnect plugin for accessing content on my mobile device, when I try to open  a file there it crashes.

But then it starts crashes every time I open any file, not only through kdeconnect.

Reproducible: Always

Steps to Reproduce:
1. Access file on through kdeconnect.
2. Observe how it crashes.
3. Now open any file on your computer and see it how crashes again.

Actual Results:  
Crash

Expected Results:  
Open files correctly.

I removed the following:
.local/share/kate
.config/katemetainfos
.config/katerc

no luck
Comment 1 Łukasz Żarnowiecki 2016-04-09 00:27:59 UTC
Created attachment 98300 [details]
stacktrace
Comment 2 Dominik Haumann 2016-04-09 20:41:15 UTC
Could you provide a usable backtrace into libgit2 by installing the libgit2 debug infos?
Comment 3 Łukasz Żarnowiecki 2016-04-10 21:33:21 UTC
Created attachment 98324 [details]
stacktrace
Comment 4 Łukasz Żarnowiecki 2016-04-10 21:35:34 UTC
Created attachment 98325 [details]
test log

Also during the compilation I ran tests and they failed.
Comment 5 Christoph Cullmann 2016-05-28 15:13:20 UTC
Hmm, sorry, if already the libgit2 unit tests fail, I think you need to report this issue to libgit2.
Comment 6 Łukasz Żarnowiecki 2016-05-31 22:27:25 UTC
> Hmm, sorry, if already the libgit2 unit tests fail, I think you need to report this issue to libgit2.

In version 0.24.1 tests are passing, but the crash still happens.
Comment 7 Łukasz Żarnowiecki 2016-06-01 16:28:34 UTC
I opened issue upstream https://github.com/libgit2/libgit2/issues/3806
@ethomson encourage a cooperation with solving that bug.
Comment 8 Łukasz Żarnowiecki 2017-01-29 10:48:00 UTC
Created attachment 103694 [details]
stacktrace while opening file on local disk

It started to happening again, but this time not only on file opened in kdeconnect, but on my local disk (/home).

1. Open any file in kate
2. After two seconds kate crashes.

libgit2 0.24.6
kate 16.12.1
Comment 9 Christoph Cullmann 2017-07-23 10:27:09 UTC
Git commit f3d9558b69adee563590255c23e3fa689fb12703 by Christoph Cullmann.
Committed on 23/07/2017 at 10:24.
Pushed by cullmann into branch 'master'.

remove libgit2 usage and always use the alternative fallback that uses git command line client

reason: we had plentoria of crashs with threading vs. libgit2, even the init/shutdown per thread did crash in some versions

on the other side the fallback code is safe as out-of-process, even if git crashs, no kate crash

as the ls-files is anyways done in a worker thread, the slowdown isn't that important, better be safe than sorry

M  +0    -9    addons/project/CMakeLists.txt
M  +0    -174  addons/project/kateprojectworker.cpp

https://commits.kde.org/kate/f3d9558b69adee563590255c23e3fa689fb12703
Comment 10 Christoph Cullmann 2017-07-23 10:31:51 UTC
*** Bug 369590 has been marked as a duplicate of this bug. ***