In case of memory corruptions, ASAN will print a diagnostic in the terminal. Unfortunately the glib library, used widely in tint2, masks some of these problems, so there is a risk they will go undetected.
Obtaining a stack trace in release (i.e. optimized) mode
Versions of tint2 starting from 0.12.4 print a stack trace in ~/.tint2-crash.log and in the terminal from which tint2 was started.
However this must have been enabled during compilation; if you don't see the ~/.tint2-crash.log file it means it was disabled in your distribution's package. In this case you must compile and install tint2 from source and enable stack trace support, simply by changing the cmake step to:
in debug mode, there are no code optimizations so tint2 will be slower (this might prevent the bug from being reproduced);
you have to start tint2 in a debugger (gdb) which is a bit inconvenient;
running tint2 in a debugger makes it slow.
Please install the dependencies and download the tint2 sources as explained in the Install page.
Compile in debug mode
Do not run make install!
cd tint2-<LATEST-RELEASE>mkdir buildcd buildcmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON ..make
Run tint2 in debugger
From the build directory, run:
killall tint2gdb ./tint2run
Obtaining a stack trace
If tint2 receives a signal or crashes, a (gdb) prompt will appear. If there is no prompt but tint2 is hanged, you can press Ctrl+C to interrupt execution manually and cause a prompt to appear.
In the prompt, type bt and press Enter; a stack trace will be displayed. For example:
^CProgram received signal SIGINT, Interrupt.0x00007ffff5178633 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:8282 in ../sysdeps/unix/syscall-template.S(gdb) bt#0 0x00007ffff5178633 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:82#1 0x0000000000414f0b in main ()(gdb)
Copy this text and paste it in your bug report.
Obtaining a core dump
Note: This does not work with -DENABLE_ASAN=ON in the cmake step.
In the (gdb) prompt, run generate-core-file. A core.xxxxx file will be generated in the build directory. Exit gdb with the command q. Then compress the core dump and the tint2 executable like this:
zip core.zip core.*zip core.zip tint2
You can provide us the core.zip file.
Important: the core dump will contain the entire memory contents of tint2, including the titles of the windows shown in the taskbar and possibly a section of the desktop background below tint2. Please make sure no personal or sensitive information is contained before sending the core dump to anyone.
Debugging panel geometry issues
Set the environment variable DEBUG_GEOMETRY when starting tint2:
Consider for instance using the following output to determine how the task icon size is computed:
Panel 0: Box: x = 0, y = 0, w = 864, h = 32, desired size = 864 Border: left = 0, right = 0, top = 0, bottom = 0 Padding: left = right = 2, top = bottom = 2, spacing = 2 Children: Clock: Box: x = 2, y = 2, w = 108, h = 28, desired size = 107 Border: left = 0, right = 0, top = 0, bottom = 0 Padding: left = right = 0, top = bottom = 0, spacing = 0 Text 1: y = -1, text = 19:57 Text 2: y = 14, text = Monday 06 March separator: Box: x = 112, y = 2, w = 5, h = 28, desired size = 5 Border: left = 0, right = 0, top = 0, bottom = 0 Padding: left = right = 1, top = bottom = 0, spacing = 1 Taskbar: Box: x = 119, y = 2, w = 172, h = 28, desired size = 174 Border: left = 0, right = 0, top = 0, bottom = 0 Padding: left = right = 0, top = bottom = 0, spacing = 2 Children: Taskbarname: Box: x = 119, y = 2, w = 22, h = 28, desired size = 22 Border: left = 1, right = 1, top = 1, bottom = 1 Padding: left = right = 6, top = bottom = 3, spacing = 6 Task: Box: x = 143, y = 2, w = 148, h = 28, desired size = 150 Border: left = 1, right = 1, top = 1, bottom = 1 Padding: left = right = 4, top = bottom = 3, spacing = 4 Text: x = 29, y = 7, w = 111, h = 13, align = left, text = DEBUG_GEOMETRY=1 tint2 Icon: x = 5, y = 4, w = h = 20
The panel height is 32 pixels. But it has 2 pixel padding at top and bottom, so the taskbar height is 28 pixels. The taskbar has 0 padding, so so task button height is also 28 pixels. That one has 3 pixels padding and 1 pixel border, so the icon height is 28 - 6 - 2 = 20 pixels.
Debugging panel rendering issues
Set the environment variables DEBUG_FRAMES and DEBUG_FPS when starting tint2:
DEBUG_FPS=1 DEBUG_FRAMES=1 tint2
For each redraw on screen, timing info will be printed to standard error, and a screenshot of the panel will be saved in the current directory. Be careful not to leave it on for a long time, it can fill your hard drive eventually!