Difference between revisions of "User:DarioAndres/Basic Guide about Crash Reporting"

Jump to: navigation, search
(Backtraces)
Line 42: Line 42:
 
===Backtraces===
 
===Backtraces===
  
Definition: A backtrace basically '''describes what was happening inside the application when it crashed''', in a way that developers may track down where the mess started. They may look meaningless to you, but they might actually contain a wealth of useful information.  
+
A backtrace basically '''describes what was happening inside the application when it crashed''', in a way that developers may track down where the mess started. They may look meaningless to you, but they might actually contain a wealth of useful information.  
  
 
* Don't attach the backtrace to the bug report. Instead, simply '''paste it'''. This way it is much easier for developers to search for duplicate reports, because attachments can not be searched.
 
* Don't attach the backtrace to the bug report. Instead, simply '''paste it'''. This way it is much easier for developers to search for duplicate reports, because attachments can not be searched.
 
{{note|If you are providing a backtrace in a report which does not belong to you, consider that the report could be unrelated to your crash, even when the symptoms are the same. In such cases, just attach the backtrace as a file, so the bug triagers can check it and say if it is the same crash or not}}
 
{{note|If you are providing a backtrace in a report which does not belong to you, consider that the report could be unrelated to your crash, even when the symptoms are the same. In such cases, just attach the backtrace as a file, so the bug triagers can check it and say if it is the same crash or not}}
 +
 +
====Example====
 +
 +
<code>
 +
Thread 1 (Thread 0x7f3579b39750 (LWP 14011)):
 +
[KCrash Handler]
 +
#5  setCaretInvisibleIfNeeded (part=0x16e2ca0) at
 +
/home/kde-devel/kde/src/KDE/kdelibs/khtml/khtml_part.cpp:2796
 +
#6  0x00007f356a8b92b5 in KHTMLPart::setCaretMode (this=0x16e2ca0,
 +
enable=false) at /home/kde-devel/kde/src/KDE/kdelibs/khtml/khtml_part.cpp:2812
 +
#7  0x00007f356a8c98bd in KHTMLPart::qt_metacall (this=0x16e2ca0,
 +
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff81c7a800)
 +
  at /home/kde-devel/kde/build/KDE/kdelibs/khtml/khtml_part.moc:327
 +
#8  0x00007f3577276ac0 in QMetaObject::activate (sender=0x1884c90,
 +
from_signal_index=<value optimized out>, to_signal_index=6, argv=0x1cb7f00) at
 +
kernel/qobject.cpp:3028
 +
#9  0x00007f3576612a57 in QAction::triggered (this=0x0, _t1=false) at
 +
.moc/debug-shared/moc_qaction.cpp:216
 +
#10 0x00007f3576613204 in QAction::activate (this=0x1884c90, event=<value
 +
optimized out>) at kernel/qaction.cpp:1125
 +
#11 0x00007f3576616862 in QAction::event (this=0x1884c90, e=0x7fff81c7ad90) at
 +
kernel/qaction.cpp:1044
 +
#12 0x00007f3577faa503 in KAction::event (this=0x0, event=0x7fff81c7ad90) at
 +
/home/kde-devel/kde/src/KDE/kdelibs/kdeui/actions/kaction.cpp:88
 +
#13 0x00007f35766180ad in QApplicationPrivate::notify_helper (this=0x10be800,
 +
receiver=0x1884c90, e=0x7fff81c7ad90) at kernel/qapplication.cpp:3803
 +
#14 0x00007f357661f40e in QApplication::notify (this=0x7fff81c7c510,
 +
receiver=0x1884c90, e=0x7fff81c7ad90) at kernel/qapplication.cpp:3768
 +
#15 0x00007f357808155b in KApplication::notify (this=0x7fff81c7c510,
 +
receiver=0x1884c90, event=0x7fff81c7ad90) at
 +
/home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
 +
#16 0x00007f3577261d90 in QCoreApplication::notifyInternal
 +
(this=0x7fff81c7c510, receiver=0x1884c90, event=0x7fff81c7ad90) at
 +
kernel/qcoreapplication.cpp:583
 +
</code>
  
 
====Generating a new backtrace====
 
====Generating a new backtrace====

Revision as of 23:15, 31 December 2009

Contents

Introduction

This document describes how to create useful bug reports for crashes of KDE applications.

How to create useful crash reports

A good crash report consists of two parts: a description of how to reproduce the crash and a backtrace of the crash. With any of those elements missing, it is very hard (if not impossible) for developers to tackle the problem.

Description

A useful description should contain everything that you were doing prior to the crash. It should not just say "it crashed".

Examples: Did you click on a button, did you open a particular website or file which caused problems? These little details, which may look useless to you, may be useful for the developers, so just write them down.

KDE Platform and Application's version

  • The KDE Platform version is an important detail that is often missing in bug reports.

If you do not know what KDE Platform version are you using, you can get it by selecting the "About KDE" option in the Help menu of every KDE application, or by running the command kde4-config --version in Konsole. You will get an output like this:

Qt: 4.6.0
KDE Development Platform: 4.4.0
kde4-config: 1.0
noframe
 
Note
The crash reporting assistant integrated in KDE 4.3 and later automatically includes the KDE version in your report.

A more insightful article on how to write good bug descriptions is available at this link, please read that before reporting bugs.

Application specific details

For several applications it can be useful to have specific details inside the bug reports:

  • Plasma Desktop: Plasmoids you have in your desktop (both official and unofficial), desktop settings (wallpaper plugin, themes), activities and dashboard configuration.
  • KWin (the windows manager): state of compositing(desktop effects): enabled / suspended / disabled, kind of effects enabled, window decoration.
  • Konqueror: Sites you were visiting, number of opened tabs, plugins you have installed, non-default settings.
  • Dolphin: file view mode, grouping and sorting settings, preview settings, directory you were browsing.
  • Kopete: IM protocols you use, plugins you use.
  • KMail: Mail protocols and account-types you use.
  • KWrite/Kate/KOffice: Type of the document you were editing.
  • Juk/Dragon/Amarok (multimedia players): Type of media (extension and format) you were watching and/or listening to.

Backtraces

A backtrace basically describes what was happening inside the application when it crashed, in a way that developers may track down where the mess started. They may look meaningless to you, but they might actually contain a wealth of useful information.

  • Don't attach the backtrace to the bug report. Instead, simply paste it. This way it is much easier for developers to search for duplicate reports, because attachments can not be searched.
noframe
 
Note
If you are providing a backtrace in a report which does not belong to you, consider that the report could be unrelated to your crash, even when the symptoms are the same. In such cases, just attach the backtrace as a file, so the bug triagers can check it and say if it is the same crash or not

Example

Thread 1 (Thread 0x7f3579b39750 (LWP 14011)): [KCrash Handler]

  1. 5 setCaretInvisibleIfNeeded (part=0x16e2ca0) at

/home/kde-devel/kde/src/KDE/kdelibs/khtml/khtml_part.cpp:2796

  1. 6 0x00007f356a8b92b5 in KHTMLPart::setCaretMode (this=0x16e2ca0,

enable=false) at /home/kde-devel/kde/src/KDE/kdelibs/khtml/khtml_part.cpp:2812

  1. 7 0x00007f356a8c98bd in KHTMLPart::qt_metacall (this=0x16e2ca0,

_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff81c7a800)

  at /home/kde-devel/kde/build/KDE/kdelibs/khtml/khtml_part.moc:327
  1. 8 0x00007f3577276ac0 in QMetaObject::activate (sender=0x1884c90,

from_signal_index=<value optimized out>, to_signal_index=6, argv=0x1cb7f00) at kernel/qobject.cpp:3028

  1. 9 0x00007f3576612a57 in QAction::triggered (this=0x0, _t1=false) at

.moc/debug-shared/moc_qaction.cpp:216

  1. 10 0x00007f3576613204 in QAction::activate (this=0x1884c90, event=<value

optimized out>) at kernel/qaction.cpp:1125

  1. 11 0x00007f3576616862 in QAction::event (this=0x1884c90, e=0x7fff81c7ad90) at

kernel/qaction.cpp:1044

  1. 12 0x00007f3577faa503 in KAction::event (this=0x0, event=0x7fff81c7ad90) at

/home/kde-devel/kde/src/KDE/kdelibs/kdeui/actions/kaction.cpp:88

  1. 13 0x00007f35766180ad in QApplicationPrivate::notify_helper (this=0x10be800,

receiver=0x1884c90, e=0x7fff81c7ad90) at kernel/qapplication.cpp:3803

  1. 14 0x00007f357661f40e in QApplication::notify (this=0x7fff81c7c510,

receiver=0x1884c90, e=0x7fff81c7ad90) at kernel/qapplication.cpp:3768

  1. 15 0x00007f357808155b in KApplication::notify (this=0x7fff81c7c510,

receiver=0x1884c90, event=0x7fff81c7ad90) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307

  1. 16 0x00007f3577261d90 in QCoreApplication::notifyInternal

(this=0x7fff81c7c510, receiver=0x1884c90, event=0x7fff81c7ad90) at kernel/qcoreapplication.cpp:583

Generating a new backtrace

To generate a new backtrace you need the application to crash again. This can be achieved repeating the same steps and situation that leaded to the original crash.

  1. If you were told to install a specific debug information package, please do it before repeating the crash. (More information...)
  2. Repeat the situation to reproduce the crash

The application crashes and the KDE Crash Handler dialog appears

  1. Click the "Developer Information" tab to fetch a new backtrace
  2. When finished, copy the backtrace and paste it inside the bug report

Screenshot of the KDE Crash Handler dialog

KDE 4.3+ Crash Handler dialog

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal