xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Changes between Version 3 and Version 4 of Debugging

01/07/13 09:08:33 (8 years ago)
Antoine Martin



  • Debugging

    v3 v4  
    99Some modules do not log by default, either to reduce the amount of logging or to avoid the overhead of logging in critical paths. Logging can generally be enabled using environment variables, you can find the list of such runtime configuration options with:
    11 grep -re "XPRA_.*DEBUG" src/xpra | grep 'os.environ'
    12 grep -re "XPRA_.*DEBUG" src/wimpiggy | grep 'os.environ'
     11egrep -re "XPRA_.*DEBUG|XPRA_.*LOG" src/xpra | grep 'os.environ'
     12egrep -re "XPRA_.*DEBUG|XPRA_.*LOG" src/wimpiggy | grep 'os.environ'
    1414At time of writing this shows the following options, which should all be self explanatory:
    1717* {{{XPRA_DEBUG_SOUND}}}
    1818* {{{XPRA_X11_DEBUG}}}
     19* {{{XPRA_X11_LOG}}}
    3031* sound test (use fake sound source on/off): {{{XPRA_SOUND_TEST}}}
    3132* opengl (on/off): {{{XPRA_OPENGL}}}
     33* use cython maths (on/off): {{{XPRA_CYTHON_MATH}}}
     34* dump latency debug information to log file (on/off): {{{XPRA_DEBUG_LATENCY}}}
     35* try to schedule other threads in network and damage loops (on/off - see #181): {{{XPRA_YIELD}}}
     36* check that we obey our network call threading rules (on/off): {{{XPRA_CHECK_THREAD}}}
     37* use PIL for parsing png and jpeg packets (on/off): {{{XPRA_USE_PIL}}}
    3238Please refer to the actual code for details.
    5561And get a backtrace from there when gdb hits it.
    57 Unfortunately, because of the asynchronous nature of X11 calls, the error may generate this crash after the event that caused it.
     63Another useful environment variable is {{{XPRA_X11_DEBUG_EVENTS}}}, it allows you to specify a CSV list of X11 events to log specifically, ie:
     65XPRA_X11_DEBUG_EVENTS="PropertyNotify,MotionNotify" xpra ...
     67The full list of event names can be obtained by using an invalid value, which will trigger a warning message, or by looking at the source.
     69Unfortunately, because of the asynchronous nature of X11 calls, the error may generate this crash some time after the event that caused it.
    5870In this case, we may want to force all X11 calls to be synchronized (which will hurt performance and may even hide the bugs - beware of heisenbugs!), trace all X11 calls, etc.
    5971[/trac/attachment/wiki/Debugging/error.py this modified error.py] allows you to do just that (see the constants at the top).