Add second start script for getting crash backtraces with gdb

parent 38a5d276
......@@ -22,9 +22,9 @@ To execute this script, you will need:
`libnotify`, `git`, `checkinstall` and all dependencies for building the main program (find an always up-to-date list
[here](https://gitlab.com/inkscape/inkscape-ci-docker/blob/master/Dockerfile)), and `cmake`.
As of 2018-07-29, this means that you need to execute this installation command on the command line (tested for Ubuntu 16.04, Ubuntu 17.10 and Ubuntu 18.04):
As of 2018-09-27, this means that you need to execute this installation command on the command line (tested for Ubuntu 16.04, Ubuntu 17.10 and Ubuntu 18.04):
`sudo apt-get install git libnotify-bin checkinstall intltool pkg-config python-dev libtool ccache libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev libgtkspell3-3-dev libjemalloc-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libsoup2.4-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev cmake libgtkmm-2.4-dev`
`sudo apt-get install git libnotify-bin checkinstall intltool pkg-config python-dev libtool ccache libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev libgtkspell3-3-dev libjemalloc-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libsoup2.4-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev cmake libgtkmm-2.4-dev gdb adwaita-icon-theme-full`
### Step 2: Get the source code:
......@@ -51,7 +51,7 @@ Default parameters will work okay, too, if you followed the instructions above.
The only really important thing is the location of the git clone you made in step 2. If you did not use your documents directory for it,
then you need to write the correct path at ~ line 13, by replacing the text inside the quotations of "$DOCUMENTS_DIR/inkscape".
### Step 4: Run the script:
### Step 4: Build Inkscape with the script:
Execute
......@@ -79,14 +79,23 @@ Near the end of the process, it will ask you to enter your password once, to be
### Step 5: Start your fresh Inkscape version:
The script will place a new file in your desktop directory, that you **must** use to start the new Inkscape version (if you don't,
you risk messing up preferences and also testing the wrong version).
The script will place two new files in your desktop directory. You **must** use one of them to start the new Inkscape version (if you don't,
you risk messing up preferences and extensions and also testing the wrong version).
If your desktop environment allows files in your Desktop directory to appear on the desktop (on Unity, this does not seem to work,
but on Xfce, it does) just double-click the file on your desktop to execute. Else navigate to the folder and double-click the file, or
run it via terminal.
but on Xfce, it does), just double-click one of the two new files on your desktop to execute. Else navigate to the folder and double-click the file, or run it via terminal.
You can verify the Inkscape version in the Help > About submenu.
#### Step 5a: Start Inkscape for using / general testing
If you just want to play around or judge performance, use the one that does not have 'debug' in its name. Debugging slows Inkscape down, so this one has a better performance.
#### Step 5b: Start Inkscape to gather crash information
One of the two desktop files has got its name starting with 'Db' (for 'debug'). Use this starter if you want to get a gdb traceback for sharing with developers. Running Inkscape will be slower with the debug start script than with the one without 'Db' in its name. You can find the debug output file in your /tmp directory, as `/tmp/inkscape_debug_trace_<Date>.txt`. Attach this file to bug reports for developers to investigate the crash.
### Go!
You can verify the Inkscape version in the 'Help > About' submenu.
And now: have fun playing around with the other versions :) (and please report your findings to the developers).
......
......@@ -144,18 +144,58 @@ sudo dpkg -i $PACKAGE_DIR/inkscape-*.deb
INK_PROG="$INSTALL_DIR/bin/inkscape"
INK_DIR="$INSTALL_DIR/bin"
STARTER_FILE=$STARTER_FILE_PATH/Run_Ink_$BRANCH
STARTER_FILE_DEBUG=$STARTER_FILE_PATH/Db_Ink_$BRANCH
# Create start script
# 1. Create start script (no debug)
echo "#!/bin/bash
export INKSCAPE_PROFILE_DIR="$PROFILE_DIR";PATH=$INK_DIR:\$PATH;$INK_PROG" > $STARTER_FILE
# Make start script executable
# 2. Create start script (debug)
echo "#!/bin/bash
# functions for gdb debugging
log() {
echo \"\${*}\" 1>&2
}
die() {
usage
log 'error:' \${*}'.'
exit 1
}
DATE=\$(date +%Y.%m.%d.%H.%M.%S)
export INKSCAPE_PROFILE_DIR="$PROFILE_DIR";PATH=$INK_DIR:\$PATH
LOG=\"/tmp/inkscape_debug_trace_\${DATE}.txt\"
log \"outputting trace to '\${LOG}'\"
exec gdb -batch-silent \\
-ex 'set logging overwrite on' \\
-ex \"set logging file \${LOG}\" \\
-ex 'set logging on' \\
-ex 'handle SIG33 pass nostop noprint' \\
-ex 'set pagination 0' \\
-ex 'run' \\
-ex 'backtrace full' \\
-ex 'info registers' \\
-ex 'x/16i \$pc' \\
-ex 'thread apply all backtrace' \\
-ex 'quit' \\
--args $INK_PROG \\
< /dev/null
" > $STARTER_FILE_DEBUG
# Make start scripts executable
chmod +x $STARTER_FILE
chmod +x $STARTER_FILE_DEBUG
echo "Start your Inkscape installation by executing
$STARTER_FILE
$STARTER_FILE (or $STARTER_FILE_DEBUG)
The .deb package that has been built is available in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment