Sasha Vasko <[EMAIL PROTECTED]> writes:

> Frank Schmitt wrote:
>> Marc Lehmann <[EMAIL PROTECTED]> writes:
>>
>>>> So I think this really looks like some AfterImage bug.
>>> Yeah, there have been similar issues in the past, but multi-display mode
>>> isn't exercised much, and the codepaths used by rxvt-unicde have probably
>>> been fixed.
>>
>> Yes, I think I found the bug in libAfterImage (at some point dpy instead
>> of asv->dpy is accessed, where asv is the asvisual struct and dpy the
>> global variable)
>>
>>> Now that 9.06 is released with that patch, could you maybe notify the
>>> fedora maintainer of this issue?
>>
>> Yes, I'll do. I also reported the bug to the libAfterImage maintainer
>> yesterday, if he agrees that I indeed found the bug, the patch is a
>> trivial two liner.
>>
>
> Frank,
>
> I did not get anything from you. Where was that bug that you found?
>
> I was not able to reproduce the crash with the current CVS of libAfterImage.

I send the following mail to [EMAIL PROTECTED] and the logs of my
mail server say that it went out correctly. I also didn't get a bounce.

Maybe you don't have "HAVE_GLX" set?

==============================================================================

From: Frank Schmitt <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Crash in destroy_asvisual
Bcc: [EMAIL PROTECTED]
Organization: Hamme net, kren mer och nimmi
Date: Sun, 09 Nov 2008 21:42:06 +0100
Message-ID: <[EMAIL PROTECTED]>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 81
Xref: glasgow.frank-schmitt.net Send-Mail:5389

Hello

I've got a problem with libAfterImage, where some simple code which I
think should work crashes.

The following crashes
===========================================================================
#include <afterbase.h>
#include <afterimage.h>
int
main (int argc, const char *const *argv){
     Display* dpy=XOpenDisplay(":0.0");
     XSynchronize (dpy, True);
     int screen = DefaultScreen(dpy);
     int depth = DefaultDepth( dpy, screen );
     ASVisual* asv =  create_asvisual( dpy, screen, depth, NULL );
     destroy_asvisual( asv, 0 );
     return 0;
}
============================================================================
while the following (only change: declaration of dpy removed) doesn't crash
============================================================================
#include <afterbase.h>
#include <afterimage.h>
int
main (int argc, const char *const *argv){
     dpy=XOpenDisplay(":0.0");
     XSynchronize (dpy, True);
     int screen = DefaultScreen(dpy);
     int depth = DefaultDepth( dpy, screen );
     ASVisual* asv =  create_asvisual( dpy, screen, depth, NULL );
     destroy_asvisual( asv, 0 );
     return 0;
}
============================================================================
both compiled like this:
g++ -g -O3 -I/usr/include/libAfterImage -lAfterImage -lfreetype -ltiff
-lX11 -L/usr/lib -lSM -lICE -lGL -lXext -ljpeg -lpng -lz -lm -lX11 -o
foo rxvt2.C
============================================================================
The backtrace is

#0  XQueryExtension (dpy=<value optimized out>, name=<value optimized out>, 
major_opcode=<value optimized out>, first_event=<value optimized out>, 
    first_error=<value optimized out>) at QuExt.c:46
#1  0x008fc2f1 in XInitExtension (dpy=<value optimized out>, name=<value 
optimized out>) at InitExt.c:49
#2  0x005572f2 in XextAddDisplay (extinfo=<value optimized out>, dpy=<value 
optimized out>, ext_name=<value optimized out>, hooks=<value optimized out>, 
    nevents=<value optimized out>, data=<value optimized out>) at extutil.c:108
#3  0x071780ea in __glXInitialize (dpy=<value optimized out>) at glxext.c:138
#4  0x07178714 in __glXSetupForCommand (dpy=<value optimized out>) at 
glxext.c:767
#5  0x071762a6 in DestroyContext (dpy=<value optimized out>, gc=<value 
optimized out>) at glxcmds.c:504
#6  0x001de2a8 in destroy_asvisual (asv=<value optimized out>, reusable=<value 
optimized out>) at asvisual.c:407
#7  0x080486ee in main () at rxvt2.C:12
============================================================================
I use libAfterImage-1.18, dynamically linked, unchanged Fedora 9 packages.

The corresponding lines in asvisual.c reads

#ifdef HAVE_GLX
                if( asv->glx_scratch_gc_direct )
                        glXDestroyContext(dpy, asv->glx_scratch_gc_direct );
                if( asv->glx_scratch_gc_indirect )
                        glXDestroyContext(dpy, asv->glx_scratch_gc_indirect );
#endif

and I guess this should really be

#ifdef HAVE_GLX
                if( asv->glx_scratch_gc_direct )
                        glXDestroyContext(asv->dpy, asv->glx_scratch_gc_direct 
);
                if( asv->glx_scratch_gc_indirect )
                        glXDestroyContext(asv->dpy, 
asv->glx_scratch_gc_indirect );
#endif

Yours,
Frank

-- 
Have you ever considered how much text can fit in eighty columns?  Given that a
signature typically contains up to four lines of text, this space allows you to
attach a tremendous amount of valuable information to your messages.  Seize the
opportunity and don't waste your signature on bullshit that nobody cares about.

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to