• Bug#265757: xosd 2.2.9-pre[23]

    From Philipp Matthias Hahn@1:229/2 to Philipp Matthias Hahn on Fri Aug 20 10:50:13 2004
    From: [email protected]

    Hello Tim!

    On Fri, Aug 20, 2004 at 09:32:53AM +0200, Philipp Matthias Hahn wrote:
    but for some strange reason doesn't seperate the lines properly - in
    xmms the volumne bar appears in the same place as the word 'volumne'.
    This happens with osd_cat and testprog as well.

    Strang, I can't reproduce it here.

    Now I can. 3 chunks from 26_one_line.diff got lost. Please revert to
    2.2.9-pre2 and apply the missing chunks:

    --- src/libxosd/xosd.c.orig 2004-08-05 10:06:48.000000000 +0200
    +++ src/libxosd/xosd.c 2004-08-05 10:36:40.000000000 +0200
    @@ -295,14 +298,14 @@ event_loop(void *osdv)
    DEBUG(Dupdate, "UPD_lines");
    for (line = 0; line < osd->number_lines; line++) {
    int y = osd->line_height * line;
    -#if 0 /* Turn on for debugging */
    +#ifdef DEBUG_XSHAPE
    XSetForeground(osd->display, osd->gc, osd->outline_pixel);
    XFillRectangle(osd->display, osd->line_bitmap, osd->gc, 0,
    - y, osd->screen_width, osd->line_height);
    + 0, osd->screen_width, osd->line_height);
    #endif
    if (osd->update & UPD_mask) {
    XFillRectangle(osd->display, osd->mask_bitmap, osd->mask_gc_back, 0, - y, osd->screen_width, osd->line_height);
    + 0, osd->screen_width, osd->line_height);
    }
    switch (osd->lines[line].type) {
    case LINE_text:
    @@ -314,16 +3
  • From Philipp Matthias Hahn@1:229/2 to Philipp Matthias Hahn on Fri Aug 20 12:00:14 2004
    From: [email protected]

    Hello Tim!

    My boss will kill me for spending so much time on xosd :-)

    On Fri, Aug 20, 2004 at 10:24:49AM +0200, Philipp Matthias Hahn wrote:
    Now I can. 3 chunks from 26_one_line.diff got lost. Please revert to 2.2.9-pre2 and apply the missing chunks:

    You'd better apply 26_one_line_addon.diff on 2.2.9-pre3, or you'll loose
    your XOSD_MAX_PRINTF_BUF_SIZE extraction.

    I also was contacted about another bug related to xosd: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265757

    There is a potential deadlock with synchronous calls like xsod_show(),
    which block until the X11 thread has painted the last changes. After
    display, is uses pthread_broadcast() to signal the "waiting" thread, but nobody sais it's already waiting. If the scheduling is poor, the signal
    would get lost and the thread calling xosd_show() would block until the display is hidden. If the scheduling is even poorer, that signal can
    also get lost and we'll get a deadlock.

    35_synchronous.diff addresses the first concern and greatly improves
    speed, but there's still a potential deadlock.

    Debs are available from http://pint.pmhahn.de/pmhahn/debian/sid/x/xosd/,
    might be from http://incoming.debina.org/ or will be in Debians
    Experimental.

    BYtE
    Philipp
    --
    Philipp Matthias Hahn <[email protected]>
    GPG/PGP: 9A540E39 @ keyrings.debian.org

    #DPATCHLEVEL=0
    # Revert broken upstream changes and apply missing parts from my patch
    --- src/libxosd/xosd.c
    +++ src/libxosd/xosd.c
    @@ -143,9 +143,6 @@

    DEBUG(Dvalue, "percent=%d, nbars=%d, on=%d", l->value, nbars, on);

    - /* adjust the y coordinate based on the line number */
    - p.y += line*osd->line_height;
    -
    /* Outline */
    if (osd->outline_offset) {
    m.x = m.y = -osd->outline_offset;
    @@ -210,9 +207,6 @@
    break;
    }

    - /* adjust the y coordinate based on the line number */
    - y += line*osd->line_height;
    -
    if (osd->shadow_offset) {
    XSetForeground(osd->display, osd->gc, osd->shadow_pixel);
    _draw_text(osd, l->string, x + osd->shadow_offset,
    @@ -309,14 +303,14 @@
    DEBUG(Dupdate, "UPD_lines");
    for (line = 0; line < osd->number_lines; line++) {
    int y = osd->line_height * line;
    -#if 0 /* Turn on for debugging */
    +#ifdef DEBUG_XSHAPE
    XSetForeground(osd->display, osd->gc, osd->outline_pixel);
    XFillRectangle(osd->display, osd->line_bitmap, osd->gc, 0,
    -
  • From Tobias Stefan Richter@1:229/2 to [email protected] on Fri Aug 20 13:50:08 2004
    From: [email protected]

    [email protected] wrote:
    There is a potential deadlock with synchronous calls like xsod_show(), which block until the X11 thread has painted the last changes. After display, is uses pthread_broadcast() to signal the "waiting" thread, but nobody sais it's already waiting. If the scheduling is poor, the signal would get lost and the thread calling xosd_show() would block until the display is hidden. If the scheduling is even poorer, that signal can
    also get lost and we'll get a deadlock.

    35_synchronous.diff addresses the first concern and greatly improves
    speed, but there's still a potential deadlock.

    Debs are available from http://pint.pmhahn.de/pmhahn/debian/sid/x/xosd/, might be from http://incoming.debina.org/ or will be in Debians
    Experimental.

    Ok, downloaded and installed. Works fine. Thanks!

    We'll see whether it helps the infrequent segfault problem, but
    that takes some days of operation to find out for sure.

    Thanks again,
    Tobias


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)