Bug 373120 - KDevelop crashes / files not closed on Windows
Summary: KDevelop crashes / files not closed on Windows
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.0.2
Platform: Other Microsoft Windows
: VHI crash
Target Milestone: 5.0.4
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-30 21:55 UTC by Kevin Funk
Modified: 2017-07-07 10:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Funk 2016-11-30 21:55:16 UTC
(Imported from a mail from KDevelop website)

# Issue

The background parser does not properly close header files, so that kdevelop can't save them / git can't checkout them. (I have to kill kdevelop to resolve that issue). It happen as soon as the header is parsed.

# How to reproduce

I used the 5.0.2 installer (updating over the first version of the
installer). 

A project with similar crashes: https://github.com/tim42/hydra/

In the project configuration -> Language support -> includes/imports add the following paths:

C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/winrt
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/atlmfc/include
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include
C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/shared
C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/ucrt
C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/um

Defines:

NOMINMAX=

(The paths may be different on your system, notably the kit version). Obviously you need ms-studio + the windows 10 kit. I have to stop the initial project parsing because it would crash before completing.
Comment 1 Kevin Funk 2016-12-14 16:36:59 UTC
The file-locking issue is libclang bug/misbehavior, also see: https://bugreports.qt.io/browse/QTCREATORBUG-15449
Comment 2 Kevin Funk 2017-03-04 02:05:31 UTC
Note: Please try KDevelop 5.0.4, we've patched Clang slightly.

Please report if that fixed the issue for you!

https://www.kdevelop.org/download
Comment 3 Timothée Feuillet 2017-03-06 14:07:01 UTC
The file-locking issue seems to only appears when the background parser for the current file is running, but once it is ended you can save it back. (even though I had it failing one time, but I didn't reproduced it yet).

I also got a crash (de-referencing a null pointer) when editing a header file when the background parser was running.
(after a quick debug, it looks like the crash is in a thread where only libclang functions are -- thread directly created by the main thread. I have a dump of this crash, but can't attach it there (130 Mo, compressed).
As I don't have any debug symbols, I don't have a readable backtrace).
Then again, that crash seems to be related to libclang.