Kdevelop background parser crashes

Bug #474509 reported by Dirk Kraft
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kdevelop (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Karmic by Ajat

Bug Description

Binary package hint: kdevelop

Kdevelop crashes while parsing C++ files in the background.

I was able to bisect a large codebase down to one file and then one include statement that causes the crash. But most likely there are other code situations that trigger this crash. The actual crash happens while the background code parser is analysing the file. That means the file is already opened and only when a certain part is reached the application really crashes.

ubuntu release: Ubuntu 9.10
package: kdevelop 4:3.9.95-0ubuntu3

The console output is:
kraft@XXX:~$ kdevelop Test/Test.hpp
WARNING: deleting stale lockfile /home/kraft/.kdevduchain/0/lock
<unknown program name>(2390)/ KDevelop::allocateRepository: picked duchain directory "/home/kraft/.kdevduchain/0"
QObject::connect: Cannot connect (null)::sessionAdded(KDevelop::IDebugSession*) to KDevelop::VariableCollection::updateAutoUpdate(KDevelop::IDebugSession*)
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Cpp::CodeCompletionModel(0x8fdb1d8), parent's thread is QThread(0x8552468), current thread is QThread(0x9036978)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Cpp::MissingIncludeCompletionModel(0x9055230), parent's thread is QThread(0x8552468), current thread is QThread(0x902beb8)
Calling appendChild() on a null node does nothing.
<unknown>: Fatal IO error 9 (Bad file descriptor) on X server :0.0.
SpecialTemplateDeclarationData::m_specializations There were items left on destruction: 25
TopDUContextData::m_usedDeclarationIds There were items left on destruction: 1
DUContextData::m_uses There were items left on destruction: 1
DUContextData::m_localDeclarations There were items left on destruction: 66
DUContextData::m_childContexts There were items left on destruction: 60
DUContextData::m_importers There were items left on destruction: 178
DUContextData::m_importedContexts There were items left on destruction: 155
pp_macro::formals There were items left on destruction: 3320
pp_macro::definition There were items left on destruction: 5361

** (<unknown>:2390): WARNING **: Serious fd usage error 15

** (<unknown>:2390): WARNING **: Serious fd usage error 13
KCrash: Application 'kdevelop' crashing...
sock_file=/home/kraft/.kde/socket-COVIL--tek-4205/kdeinit4__0
kraft@XXX:~$

How to reproduce:
- Make sure libboost1.38-dev is installed
- Create a file called Test.hpp containing one line:
#include <boost/assign/ptr_list_inserter.hpp>
- Start kdevelop
- Open the Test.hpp file

Revision history for this message
Dirk Kraft (dirk-kraft) wrote :
Dirk Kraft (dirk-kraft)
summary: - Kdevelop background parses crashes
+ Kdevelop background parser crashes
Revision history for this message
Dirk Kraft (dirk-kraft) wrote :

I do not see the massive memory usage reported in Bug #459655 . I therefore doubt these bugs are duplicates.

Revision history for this message
Dirk Kraft (dirk-kraft) wrote :

I could track the "guilty" file inclusion further back to #include <boost/assign/list_inserter.hpp>

Revision history for this message
Dirk Kraft (dirk-kraft) wrote :

Upstream has a lot of these C++ parsing bugs (some of them triggered by other parts of boost). Most of them seem to be resolved. Unfortunately without giving specific commit revisions.

I therefore tried to use the newest version from svn but this leads to dependency problems (new cmake version, ...) therefore I gave up there.

I instead tried to use the packages for lucid and after installing the following packages the problem disappeared.
kdevelop_3.9.96-0ubuntu1
kdevelop-data_3.9.96-0ubuntu1_all.deb
kdevplatform1-libs_0.9.96-0ubuntu3
libqt4-dbus_4.6.0~beta1-1ubuntu1
libqt4-designer_4.6.0~beta1-1ubuntu1
libqt4-network_4.6.0~beta1-1ubuntu1
libqt4-qt3support_4.6.0~beta1-1ubuntu1
libqt4-script_4.6.0~beta1-1ubuntu1
libqt4-sql_4.6.0~beta1-1ubuntu1
libqt4-xml_4.6.0~beta1-1ubuntu1
libqtcore4_4.6.0~beta1-1ubuntu1
libqtgui4_4.6.0~beta1-1ubuntu1
libsublime1_0.9.96-0ubuntu3

Is there any change to get the kdevelop_3.9.96-0ubuntu1 package (or one which depends against the qt from karmic) into karmic?

Revision history for this message
Ofni Chadesch (ulawe) wrote :

The same bug here. After KDevelop opens, it analyses some previously opened files and then crashes.
Here is the output when started in console:
WARNING: deleting stale lockfile /HOME$/.kdevduchain/0/lock
<unknown program name>(1804)/ KDevelop::allocateRepository: picked duchain directory "/HOME$/.kdevduchain/0"
QObject::connect: Cannot connect (null)::sessionAdded(KDevelop::IDebugSession*) to KDevelop::VariableCollection::updateAutoUpdate(KDevelop::IDebugSession*)
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Cpp::CodeCompletionModel(0x3e3de00), parent's thread is QThread(0x18abe80), current thread is QThread(0x3e2dd60)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Cpp::MissingIncludeCompletionModel(0x3e2ce30), parent's thread is QThread(0x18abe80), current thread is QThread(0x3e405f0)
Calling appendChild() on a null node does nothing.
Segmentation fault

I suspect is from an include file directive, but I don't know which one.

Revision history for this message
Ofni Chadesch (ulawe) wrote :

I used Daniele E. Domenichelli's ppa and backports, and I thus installed KDevelop 3.9.97
Everything is fine now.

Revision history for this message
phymonus (bucur-marius-ovidiu) wrote :

The same problem here.
Kdevelop 3.9.95 + boost c++ + background parser (Segfault)

I have fixed it by doing the following:

1). upgrade karmic to lucid

sudo sed -i 's/karmic/lucid/g' /etc/apt/sources.list && sudo aptitude update && sudo aptitude dist-upgrade

2). add the E. Domenichelli's ppa (System->Software sources->Add and type ppa:daniele.domenichelli/kdevelop )

Finally, a good old sudo apt-get install kdevelop and you're done.

Dirk Kraft (dirk-kraft)
Changed in kdevelop (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.