Bug 265460

Summary: KDevelop crashes when opening sourceformatter settings
Product: [Applications] kdevelop Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 4.2.60   
Target Milestone: 4.2.0   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Eugene Shalygin 2011-02-04 22:05:28 UTC
Application: kdevelop (4.2.60)
KDE Platform Version: 4.6.00 (4.6.0) (Compiled from sources)
Qt Version: 4.7.1
Operating System: Linux 2.6.37-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
On several of my projects when I open the source formatter settings page, KDevelop crashes with the folowing backtrace

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f9a6e0ca760 (LWP 12503))]

Thread 7 (Thread 0x7f9a5534e700 (LWP 12505)):
#0  0x00007f9a6b04c9ab in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f9a6c5c5db1 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f9a68a1e9ba in ?? () from /usr/lib/libkdevplatformlanguage.so.4
#3  0x00007f9a6c5c575e in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f9a6b047d4c in start_thread () from /lib/libpthread.so.0
#5  0x00007f9a6b32fa7d in clone () from /lib/libc.so.6

Thread 6 (Thread 0x7f9a4fc75700 (LWP 12512)):
#0  0x00007f9a6b329203 in select () from /lib/libc.so.6
#1  0x00007f9a6c68e00c in ?? () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f9a6c5c575e in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007f9a6b047d4c in start_thread () from /lib/libpthread.so.0
#4  0x00007f9a6b32fa7d in clone () from /lib/libc.so.6

Thread 5 (Thread 0x7f9a4f251700 (LWP 12514)):
#0  0x00007f9a6b04c9ab in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f9a6c5c5db1 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f9a6c5bbe37 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007f9a6c5c575e in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f9a6b047d4c in start_thread () from /lib/libpthread.so.0
#5  0x00007f9a6b32fa7d in clone () from /lib/libc.so.6

Thread 4 (Thread 0x7f9a49542700 (LWP 12556)):
#0  0x00007f9a6b326ca3 in poll () from /lib/libc.so.6
#1  0x00007f9a65e877a4 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f9a65e87cdd in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f9a6c6d8546 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f9a6c6ac9b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007f9a6c6acbf4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f9a6c5c2f94 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f9a6c68e748 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f9a6c5c575e in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f9a6b047d4c in start_thread () from /lib/libpthread.so.0
#10 0x00007f9a6b32fa7d in clone () from /lib/libc.so.6

Thread 3 (Thread 0x7f9a48d41700 (LWP 12614)):
#0  0x00007f9a6b04c62c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f9a631dd194 in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007f9a6b047d4c in start_thread () from /lib/libpthread.so.0
#3  0x00007f9a6b32fa7d in clone () from /lib/libc.so.6

Thread 2 (Thread 0x7f9a415bf700 (LWP 12664)):
#0  0x00007f9a6b04c62c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f9a55cb8764 in ?? () from /usr/lib64/qt4/libQtScript.so.4
#2  0x00007f9a55cb8799 in ?? () from /usr/lib64/qt4/libQtScript.so.4
#3  0x00007f9a6b047d4c in start_thread () from /lib/libpthread.so.0
#4  0x00007f9a6b32fa7d in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7f9a6e0ca760 (LWP 12503)):
[KCrash Handler]
#6  astyle::ASBeautifier::findHeader (this=0x2e577a0, line=..., i=1, possibleHeaders=0x6500760065006c) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/formatters/astyle/lib/ASBeautifier.cpp:2698
#7  0x00007f9a4378f448 in astyle::ASBeautifier::beautify (this=0x2e577a0, originalLine=<value optimized out>) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/formatters/astyle/lib/ASBeautifier.cpp:1415
#8  0x00007f9a4378d982 in astyle::ASBeautifier::beautify (this=0x261e460, originalLine=...) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/formatters/astyle/lib/ASBeautifier.cpp:917
#9  0x00007f9a4379e602 in astyle::ASFormatter::nextLine (this=0x261e460) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/formatters/astyle/lib/ASFormatter.cpp:1253
#10 0x00007f9a437862dc in AStyleFormatter::formatSource (this=0x261e460, text=..., leftContext=..., rightContext=...) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/formatters/astyle/astyle_formatter.cpp:130
#11 0x00007f9a4377fc14 in AStylePlugin::formatSourceWithStyle (this=0x25dfc30, s=..., text=..., mime=<value optimized out>, leftContext=..., rightContext=...) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/formatters/astyle/astyle_plugin.cpp:95
#12 0x00007f9a3fbe86b0 in ?? () from /usr/lib64/kde4/kcm_kdevsourceformattersettings.so
#13 0x00007f9a3fbeea7e in ?? () from /usr/lib64/kde4/kcm_kdevsourceformattersettings.so
#14 0x00007f9a3fbecb41 in ?? () from /usr/lib64/kde4/kcm_kdevsourceformattersettings.so
#15 0x00007f9a6c6c179a in QObject::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007f9a6baeb73d in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007f9a6ba9a844 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007f9a6ba9f30a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#19 0x00007f9a6cea4ff6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#20 0x00007f9a6c6ad60b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#21 0x00007f9a6c6b0dc4 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007f9a6c6d8353 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007f9a65e87262 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#24 0x00007f9a65e87a40 in ?? () from /usr/lib/libglib-2.0.so.0
#25 0x00007f9a65e87cdd in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#26 0x00007f9a6c6d84ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00007f9a6bb3f2ae in ?? () from /usr/lib64/qt4/libQtGui.so.4
#28 0x00007f9a6c6ac9b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#29 0x00007f9a6c6acbf4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#30 0x00007f9a6bf3289e in QDialog::exec() () from /usr/lib64/qt4/libQtGui.so.4
#31 0x00007f9a6d5832e3 in KDevelop::UiController::showSettingsDialog() () from /usr/lib/libkdevplatformshell.so.4
#32 0x00007f9a6d574ab5 in ?? () from /usr/lib/libkdevplatformshell.so.4
#33 0x00007f9a6c6c1c97 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#34 0x00007f9a6ba941d2 in QAction::triggered(bool) () from /usr/lib64/qt4/libQtGui.so.4
#35 0x00007f9a6ba943ca in QAction::activate(QAction::ActionEvent) () from /usr/lib64/qt4/libQtGui.so.4
#36 0x00007f9a6beb0183 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#37 0x00007f9a6beb614a in ?? () from /usr/lib64/qt4/libQtGui.so.4
#38 0x00007f9a6cf6df0d in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#39 0x00007f9a6baebd8f in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#40 0x00007f9a6beb733b in QMenu::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#41 0x00007f9a6ba9a844 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#42 0x00007f9a6ba9fd70 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#43 0x00007f9a6cea4ff6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#44 0x00007f9a6c6ad60b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#45 0x00007f9a6ba9b845 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#46 0x00007f9a6bb19cd4 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#47 0x00007f9a6bb18149 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#48 0x00007f9a6bb3f602 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#49 0x00007f9a65e87262 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#50 0x00007f9a65e87a40 in ?? () from /usr/lib/libglib-2.0.so.0
#51 0x00007f9a65e87cdd in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#52 0x00007f9a6c6d84ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#53 0x00007f9a6bb3f2ae in ?? () from /usr/lib64/qt4/libQtGui.so.4
#54 0x00007f9a6c6ac9b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#55 0x00007f9a6c6acbf4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#56 0x00007f9a6c6b107b in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#57 0x0000000000409af3 in main (argc=0, argv=0x7fff85c25c78) at /var/data/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/app/main.cpp:456

Reported using DrKonqi
Comment 1 Milian Wolff 2011-02-05 13:32:43 UTC
damn, looks like I introduced that regression - I'll investigate.
Comment 2 Milian Wolff 2011-02-05 13:53:57 UTC
Git commit 3597cb59ca240fdf67e37973067cfb4fde9e6379 by Milian Wolff.
Committed on 05/02/11 at 13:51.
Pushed by mwolff into branch 'master'.

share pseudo-static members

BUG: 265460

M  +9    -0    formatters/astyle/lib/ASBeautifier.cpp     
M  +9    -0    formatters/astyle/tests/astyletest.cpp     
M  +1    -0    formatters/astyle/tests/astyletest.h     

http://commits.kde.org/kdevelop/3597cb59ca240fdf67e37973067cfb4fde9e6379