Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques a new test suite
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] a new test suite
fabounet English 18 matttbe [Read]
10 August 2013 à 01:19

fabounet, Tuesday 02 July 2013 à 17:42


Subscription date : 30 November 2007
Messages : 17118
I've made a small test suite for the dock, in cairo-dock-core/tests

mainly to test the new Dbus API, but it proves to be very useful to debug the core

how to run it:

# launch the dock with the default theme
killall cairo-dock
rm -rf ~/test
unset DESKTOP_SESSION
cairo-dock -T -d ~/test&

# run the tests
cd cairo-dock-core/tests
./main.py


you need xdotool

obviously, the goal is to have every results in green

if you have other ideas to test, feel free to propose a script

matttbe, Tuesday 02 July 2013 à 21:32


Subscription date : 24 January 2009
Messages : 12573
This is a good idea!

Here is the result of these tests that I just launched
./main.py
connect
...
-> 
connected to cairo-dock
[Test launcherFailed to add the launcher
4024
[Test launchererror
[Test custom launchersuccess
  Reload Dbus 
(/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/Dbus/Dbus.conf)...
  
Reload showDesktop (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/showDesktop/showDesktop.conf)...
  
Reload Remote-Control (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/Remote-Control/Remote-Control.conf)...
  
Reload Quick Browser (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/quick-browser/quick-browser.conf)...
  
Reload GMenu (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/GMenu/GMenu.conf)...
  
Reload shortcuts (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/shortcuts/shortcuts.conf)...
  
Reload dialog rendering (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/dialog-rendering/dialog-rendering.conf)...
  
Reload dnd2share (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/dnd2share/dnd2share.conf)...
  
Reload gnome integration ()...
  
Reload Scooby-Do (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/Scooby-Do/Scooby-Do.conf)...
  
Reload dock rendering (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/rendering/rendering.conf)...
  
Reload switcher (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/switcher/switcher.conf)...
  
Reload icon effects (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/icon-effect/icon-effect.conf)...
  
Reload drop indicator (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/drop_indicator/drop_indicator.conf)...
  
Reload musicPlayer (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/musicPlayer/musicPlayer.conf)...
  
Reload desklet rendering ()...
  
Reload Animated icons (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/Animated-icons/Animated-icons.conf)...
  
Reload illusion (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/illusion/illusion.conf)...
  
Reload Recent-Events (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/Recent-Events/Recent-Events.conf)...
  
Reload logout (/opt/cairo-dock_bzr/cairo-dock-core/tests/test/current_theme/plug-ins/logout/logout.conf)...
[
Test modulessuccess
grep
: : Aucun fichier ou dossier de ce type
[Test stack iconFailed to move the sub-icons to the new sub-dock
grep
: : Aucun fichier ou dossier de ce type
[Test stack iconFailed to move the sub-icons to the new sub-dock 2
[Test stack iconerror
[Test separator iconsuccess
[Test root dockFailed to add a launcher inside the new dock
dock name
=_MainDock_
[Test root dockerror
[Test root dock 2Failed to add a launcher inside the new dock
[Test root dock 2error

** (gnome-calculator:4052): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-w0jgSyXCBU: Connexion refusée

** (gnome-calculator:4056): WARNING **: Couldn'
t connect to accessibility busFailed to connect to socket /tmp/dbus-w0jgSyXCBUConnexion refusée
[Test taskbarsuccess

** (gnome-calculator:4071): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-w0jgSyXCBU: Connexion refusée

** (gnome-calculator:4075): WARNING **: Couldn'
t connect to accessibility busFailed to connect to socket /tmp/dbus-w0jgSyXCBUConnexion refusée
[Test taskbar2success
[Test Dockssuccess
[Test Iconssuccess
(there are a few errors but I didn't check why.

fabounet, Thursday 04 July 2013 à 17:25


Subscription date : 30 November 2007
Messages : 17118
if you have some time, maybe you found a few bugs
(maybe you just need to increase some delays (sleep) or modify the program names in the config.py)

matttbe, Wednesday 17 July 2013 à 22:20


Subscription date : 24 January 2009
Messages : 12573
I just wanted to retry the test but when starting the dock with "-T -d test" options, this is what I had:
The program 'cairo-dock' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
  (
Detailsserial 796 error_code 5 request_code 19 minor_code 0)
  (
Note to programmersnormallyX errors are reported asynchronously;
   
that isyou will receive the error a while after causing it.
   
To debug your programrun it with the GDK_SYNCHRONIZE environment
   variable to change this behavior
You can then get a meaningful
   backtrace from your debugger 
if you break on the gdk_x_error() function.)

Program received signal SIGTRAPTrace/breakpoint trap.
0x00007ffff7490179 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdbbt full
#0  0x00007ffff7490179 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#1  0x00007ffff74902c2 in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2  0x00007ffff67b7920 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
No symbol table info available.
#3  0x00007ffff67c22d1 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
No symbol table info available.
#4  0x00007ffff445ab9b in _XError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#5  0x00007ffff4457c07 in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#6  0x00007ffff4457cb5 in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#7  0x00007ffff4458bb0 in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#8  0x00007ffff44546ed in XSync () from /usr/lib/x86_64-linux-gnu/libX11.so.6
No symbol table info available.
#9  0x00007ffff679406c in gdk_flush ()
   
from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
No symbol table info available
.
#10 0x00007ffff651e2ca in do_grab_key (binding=0xf4f330)
    
at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-keybinder.c:146
        keymap 
0x6ba150
        rootwin 
0x696000
        virtual_mods 
EGG_VIRTUAL_SUPER_MASK
        keysym 
108
        __PRETTY_FUNCTION__ 
"do_grab_key"
#11 0x00007ffff651ebfe in init_object (obj=0xf4f330, attr=0x7fffffffd510)
    
at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-keybinder.c:413
        pShortkey 
0xf4f330
        sattr 
0x7fffffffd510
        __PRETTY_FUNCTION__ 
"init_object"
#12 0x00007ffff64aa0e8 in gldi_object_init (obj=0xf4f330, 
    
pMgr=0x6363e0 <myShortkeyObjectMgr>, attr=0x7fffffffd510)
    
at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-object.c:51
        m 
0x714f20
#13 0x00007ffff64aa205 in gldi_object_new (
    
pMgr=0x6363e0 <myShortkeyObjectMgr>, attr=0x7fffffffd510)
    
at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-object.c:60
        obj 
0xf4f330
#14 0x00007ffff651e659 in gldi_shortkey_new (keystring=0x122af50 "<Super>L", 
    
cDemander=0x7fffe4208d1d "Se déconnecter"
    
cDescription=0x7fffe4208d08 "Verrouiller l'écran"
    
cIconFilePath=0x7fffce8fb720 "/usr/share/cairo-dock/plug-ins/logout/icon.svg",
And of course, no error when starting it with:
env GDK_SYNCHRONIZE=1 cairo-dock -T -d test


Any idea? A problem with X11 (I upgraded to version 1.14 last week) or GDX?

fabounet, Friday 19 July 2013 à 23:34


Subscription date : 30 November 2007
Messages : 17118
can you check if you get this with some previous revision ?
maybe it's because we now use the display provided by gdk (before we used the display opened for the taskbar, and this one catches X errors, and maybe gdk doesn't catch them by default)

matttbe, Saturday 20 July 2013 à 19:39


Subscription date : 24 January 2009
Messages : 12573
When reverting to rev 1556 (core) and 2868 (plugins), I no longer have this crash.

I guess it's due to the rev 1560.

fabounet, Tuesday 30 July 2013 à 14:45


Subscription date : 30 November 2007
Messages : 17118
that's helpful
nothing with gdb ?

matttbe, Tuesday 30 July 2013 à 18:29


Subscription date : 24 January 2009
Messages : 12573
nothing with gdb ?
There is a backtrace here above but now I'm not able to reproduce this bug

fabounet, Wednesday 31 July 2013 à 16:35


Subscription date : 30 November 2007
Messages : 17118
nice, an auto-fixed bug

did it break into gdk_x_error() ? it seems so, but gdk-devel is not installed

because the only difference that I can see is that before we used the Display of the Taskbar, and now we use the Display from GDK (the one that we use for drawing too).
and the Display of the Taskbar has an XError callback that doesn't interrupts the program (it just prints a warning), but I'm not sure about the Display from GDK.

so if it happens again, a workaround would be to overwrite the XError callback from GDK.

Edit: after a few searches, I'm 99% that it broke in gdk_x_error and that this functions aborts in any case
so we'll have to overwrite it

matttbe, Wednesday 31 July 2013 à 17:31


Subscription date : 24 January 2009
Messages : 12573
Edit: after a few searches, I'm 99% that it broke in gdk_x_error and that this functions aborts in any case
so we'll have to overwrite it
I guess you know how to do that!?

fabounet, Thursday 01 August 2013 à 15:41


Subscription date : 30 November 2007
Messages : 17118
yep, I'm on it

Edit: tu n'aurais pas une version instable de gtk par hasard ?

matttbe, Thursday 01 August 2013 à 18:19


Subscription date : 24 January 2009
Messages : 12573
Edit: tu n'aurais pas une version instable de gtk par hasard ?
Il y a des versions stables Je suis sur la 3.8.2 mais le crash a aussi été vu là: bg_topic.php?t=7088

fabounet, Friday 02 August 2013 à 11:30


Subscription date : 30 November 2007
Messages : 17118
j'ai investigué
dans gdk ils ont un mécanisme d'interception des erreurs X, et malheureusement il écrase le notre (gdk_error_trap_push/gdk_error_trap_pop appelé en interne)

le problème de Roran apparait apres un XTranslateCoordinates appelé par gdk via la main loop, et là on n'y peut rien

le tien apparait après un XGrabKey et là c'est nous qui appelons gdk_error_trap_push/pop
donc on pourrait ne pas l'appeler, mais vu que gdk le fait déjà en interne souvent, ça ne règle pas vraiment le problème (d'autant plus que ce problème semble un peu aléatoire)

(error_code 5, request_code 19) = (BadAtom, X_DeleteProperty) d'après X.h et Xproto.h chez moi, ça n'a pas l'air d'avoir de rapport avec le XGrabKey (XGrabKey() can generate BadAccess , BadValue , and BadWindow errors.)
donc vraisemblablement une erreur précédente en attente qui remonte à ce moment-là.
Reste à savoir d'où.

Mais comme gdk ignore les erreurs sur les displays qu'il ne possède pas (donc celui ouvert par le X-manager, qu'on utilisait avant), ça confirme ce que je disais plus haut, et tu as probablement raison sur la rev 1560)

Edit: c'est sûrement l'appel à set_on_widget_layer, s_aCompizWidget n'est pas défini au début ...

matttbe, Friday 02 August 2013 à 11:42


Subscription date : 24 January 2009
Messages : 12573
Héhé, encore un bug tout simple à régler
Pas mal l'analyse et merci pour ces détails!

Donc la solution est que le dock doit ouvrir lui-même le display et d'utiliser une fonction pour récupérer celui-là ailleurs? Ou c'est possible de fixer/contourner l'erreur responsable de ce crash?

EDIT: je n'utilise pas la couche de widget de Compiz.

fabounet, Sunday 04 August 2013 à 09:26


Subscription date : 30 November 2007
Messages : 17118
c'est corrigé normalement, on utilise le display du X-manager pour éviter tout risque désormais (il reste showDesktop et Xgamma il me semble)

PS: set_on_widget_layer était appelée pour chaque desklet, j'ai amélioré ça aussi

PPS: c'est l'heure des vacances pour moi, à dans quelques jours !

matttbe, Sunday 04 August 2013 à 10:10


Subscription date : 24 January 2009
Messages : 12573
Merci et profite bien de tes vacances

fabounet, Friday 09 August 2013 à 16:07


Subscription date : 30 November 2007
Messages : 17118
déjà finies

est-ce qu'au moins le bug est corrigé ?

matttbe, Friday 09 August 2013 à 19:27


Subscription date : 24 January 2009
Messages : 12573
Profite bien du week-end du coup

Je n'arrivais déjà plus à reproduire le bug donc je suppose que c'est bon! Mais je reteste dès que je suis sur mon ordi

matttbe, Saturday 10 August 2013 à 01:19


Subscription date : 24 January 2009
Messages : 12573
En effet, ça semble ok, merci

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] a new test suite
fabounet English 18 matttbe [Read]
10 August 2013 à 01:19


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques a new test suite Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.