Yep its a freed or trashed surface.
I saw this bug while I was developing.
And it seems I fixed it for me but not for anyone else.

I'll keep trying to replicate but until I can get it you will have to trace.

Google for the watch command for gdb.
And maybe try efence or something to see who is trashing it.

Whats your bit depth ?

Damn

Mike


On 7/15/06, Attilio Fiandrotti <[EMAIL PROTECTED]> wrote:
> Hi
>
> this is a debug of the 5 topmost frames of the stack
>
> (!) [Main Thread       0.000] ( 5168) *** Assertion
> [((IAny*)thiz)->magic == D_MAGIC("DirectInterface")] failed ***
> [idirectfbsurface.c:1007 in IDirectFBSurface_SetDrawingFlags()]
>
> #0  0xa77b4bf1 in kill () from /lib/tls/libc.so.6
> #1  0xa77b483a in killpg () from /lib/tls/libc.so.6
> #2  0xa76b2cba in direct_assertion (exp=0xa776408c "((IAny*)thiz)->magic
> == D_MAGIC(\"DirectInterface\")",
>      func=0xa7764ea0 "IDirectFBSurface_SetDrawingFlags", file=0xa776478c
> "idirectfbsurface.c", line=1007) at debug.c:357
> #3  0xa76f8ab3 in IDirectFBSurface_SetDrawingFlags (thiz=0xa32bcf30,
> flags=DSDRAW_BLEND) at idirectfbsurface.c:1007
> #4  0xa79c6626 in _cairo_directfb_surface_fill_rectangles
> (abstract_surface=0xa32caf2c, op=CAIRO_OPERATOR_OVER,
>      color=0xaf889610, rects=0xa32d4ff8, n_rects=1) at
> cairo-directfb-surface.c:927
> #5  0xa79ac627 in _cairo_surface_fill_rectangles (surface=0xa32caf2c,
> op=CAIRO_OPERATOR_OVER, color=0xaf889610,
>      rects=0xa32d4ff8, num_rects=1) at cairo-surface.c:1161
>
>
>
> (gdb) f 2
> #2  0xa76b2cba in direct_assertion (exp=0xa776408c "((IAny*)thiz)->magic
> == D_MAGIC(\"DirectInterface\")",
>      func=0xa7764ea0 "IDirectFBSurface_SetDrawingFlags", file=0xa776478c
> "idirectfbsurface.c", line=1007) at debug.c:357
> 357               killpg( getpgrp(), SIGTRAP );
>
>
> (gdb) f 3
> #3  0xa76f8ab3 in IDirectFBSurface_SetDrawingFlags (thiz=0xa32bcf30,
> flags=DSDRAW_BLEND) at idirectfbsurface.c:1007
> 1007         DIRECT_INTERFACE_GET_DATA(IDirectFBSurface)
> (gdb) p thiz
> $4 = (IDirectFBSurface *) 0xa32bcf30
> (gdb) p *thiz
> $5 = {priv = 0x0, magic = 0, AddRef = 0xa76f99f0 <IDirectFBSurface_AddRef>,
>    Release = 0xa76ff220 <IDirectFBSurface_Release>, GetCapabilities =
> 0xa76f9530 <IDirectFBSurface_GetCapabilities>,
>    GetPosition = 0xa76f9810 <IDirectFBSurface_GetPosition>, GetSize =
> 0xa76f9720 <IDirectFBSurface_GetSize>,
>    GetVisibleRectangle = 0xa76f9620 <IDirectFBSurface_GetVisibleRectangle>,
>    GetPixelFormat = 0xa76f9900 <IDirectFBSurface_GetPixelFormat>,
>    GetAccelerationMask = 0xa76fed40 <IDirectFBSurface_GetAccelerationMask>,
>    GetPalette = 0xa76feb50 <IDirectFBSurface_GetPalette>, SetPalette =
> 0xa76fea40 <IDirectFBSurface_SetPalette>,
>    SetAlphaRamp = 0xa76fe920 <IDirectFBSurface_SetAlphaRamp>, Lock =
> 0xa76fe780 <IDirectFBSurface_Lock>,
>    Unlock = 0xa76fe680 <IDirectFBSurface_Unlock>, Flip = 0xa76fe430
> <IDirectFBSurface_Flip>,
>    SetField = 0xa76fe330 <IDirectFBSurface_SetField>, Clear = 0xa76fdf70
> <IDirectFBSurface_Clear>,
>    SetClip = 0xa76fddd0 <IDirectFBSurface_SetClip>, GetClip = 0xa76f9400
> <IDirectFBSurface_GetClip>,
>    SetColor = 0xa76fd850 <IDirectFBSurface_SetColor>, SetColorIndex =
> 0xa76f9c10 <IDirectFBSurface_SetColorIndex>,
>    SetSrcBlendFunction = 0xa76f92d0 <IDirectFBSurface_SetSrcBlendFunction>,
>    SetDstBlendFunction = 0xa76f91a0 <IDirectFBSurface_SetDstBlendFunction>,
>    SetPorterDuff = 0xa76f8f40 <IDirectFBSurface_SetPorterDuff>,
>    SetSrcColorKey = 0xa76fdc40 <IDirectFBSurface_SetSrcColorKey>,
>    SetSrcColorKeyIndex = 0xa76f8e00 <IDirectFBSurface_SetSrcColorKeyIndex>,
>    SetDstColorKey = 0xa76fda50 <IDirectFBSurface_SetDstColorKey>,
>    SetDstColorKeyIndex = 0xa76f8c50 <IDirectFBSurface_SetDstColorKeyIndex>,
>    SetBlittingFlags = 0xa76f8930 <IDirectFBSurface_SetBlittingFlags>,
> Blit = 0xa76fd590 <IDirectFBSurface_Blit>,
>    TileBlit = 0xa76fd280 <IDirectFBSurface_TileBlit>, BatchBlit =
> 0xa76fcf90 <IDirectFBSurface_BatchBlit>,
>    StretchBlit = 0xa76fcbf0 <IDirectFBSurface_StretchBlit>,
>    TextureTriangles = 0xa76fc7a0 <IDirectFBSurface_TextureTriangles>,
>    SetDrawingFlags = 0xa76f8a40 <IDirectFBSurface_SetDrawingFlags>,
>    FillRectangle = 0xa76fbe90 <IDirectFBSurface_FillRectangle>,
> DrawRectangle = 0xa76fc350 <IDirectFBSurface_DrawRectangle>,
>    DrawLine = 0xa76fc660 <IDirectFBSurface_DrawLine>, DrawLines =
> 0xa76fc490 <IDirectFBSurface_DrawLines>,
>    FillTriangle = 0x1, FillRectangles = 0, FillSpans = 0xa32c0fb4,
> SetFont = 0xa32c0fb4, GetFont = 0xa32c4df4,
>    DrawString = 0xa32c4df4, DrawGlyph = 0, SetEncoding = 0,
> GetSubSurface = 0, GetGL = 0, Dump = 0x1,
>    DisableAcceleration = 0xa32beebc}
> (gdb) p thiz->magic
>
>
> (gdb) f 4
> #4  0xa79c6626 in _cairo_directfb_surface_fill_rectangles
> (abstract_surface=0xa32caf2c, op=CAIRO_OPERATOR_OVER,
>      color=0xaf889610, rects=0xa32d4ff8, n_rects=1) at
> cairo-directfb-surface.c:927
> 927         dst->dfbsurface->SetDrawingFlags (dst->dfbsurface, flags);
> (gdb) p *(cairo_rectangle_int16_t *) rects
> $19 = {x = 0, y = 0, width = 400, height = 300}
> (gdb) p *(IDirectFBSurface *) abstract_surface
> $20 = {priv = 0xa79f27a0, magic = 9, AddRef = 0x3000, Release = 0x3,
> GetCapabilities = 0, GetPosition = 0, GetSize = 0x1,
>    GetVisibleRectangle = 0x1, GetPixelFormat = 0xc, GetAccelerationMask
> = 0xa32ccffc, GetPalette = 0, SetPalette = 0,
>    SetAlphaRamp = 0x3ff00000, Lock = 0, Unlock = 0, Flip = 0, SetField =
> 0, Clear = 0, SetClip = 0x3ff00000, GetClip = 0,
>    SetColor = 0, SetColorIndex = 0, SetSrcBlendFunction = 0,
> SetDstBlendFunction = 0, SetPorterDuff = 0x3ff00000,
>    SetSrcColorKey = 0, SetSrcColorKeyIndex = 0, SetDstColorKey = 0,
> SetDstColorKeyIndex = 0, SetBlittingFlags = 0,
>    Blit = 0x3ff00000, TileBlit = 0, BatchBlit = 0x80000000, StretchBlit
> = 0, TextureTriangles = 0x80000000,
>    SetDrawingFlags = 0, FillRectangle = 0x4072c000, DrawRectangle = 0,
> DrawLine = 0x4072c000, DrawLines = 0xa32bef40,
>    FillTriangle = 0x1, FillRectangles = 0x1, FillSpans = 0, SetFont = 0,
> GetFont = 0xa6e53f88, DrawString = 0,
>    DrawGlyph = 0xa32bcf30, SetEncoding = 0, GetSubSurface = 0xa32c8ff0,
> GetGL = 0x1, Dump = 0, DisableAcceleration = 0x190}
>
>
> (gdb) f 5
> #5  0xa79ac627 in _cairo_surface_fill_rectangles (surface=0xa32caf2c,
> op=CAIRO_OPERATOR_OVER, color=0xaf889610,
>      rects=0xa32d4ff8, num_rects=1) at cairo-surface.c:1161
> 1161            status = surface->backend->fill_rectangles (surface, op,
> color,
> (gdb) p *(IDirectFBSurface *) surface
> $21 = {priv = 0xa79f27a0, magic = 9, AddRef = 0x3000, Release = 0x3,
> GetCapabilities = 0, GetPosition = 0, GetSize = 0x1,
>    GetVisibleRectangle = 0x1, GetPixelFormat = 0xc, GetAccelerationMask
> = 0xa32ccffc, GetPalette = 0, SetPalette = 0,
>    SetAlphaRamp = 0x3ff00000, Lock = 0, Unlock = 0, Flip = 0, SetField =
> 0, Clear = 0, SetClip = 0x3ff00000, GetClip = 0,
>    SetColor = 0, SetColorIndex = 0, SetSrcBlendFunction = 0,
> SetDstBlendFunction = 0, SetPorterDuff = 0x3ff00000,
>    SetSrcColorKey = 0, SetSrcColorKeyIndex = 0, SetDstColorKey = 0,
> SetDstColorKeyIndex = 0, SetBlittingFlags = 0,
>    Blit = 0x3ff00000, TileBlit = 0, BatchBlit = 0x80000000, StretchBlit
> = 0, TextureTriangles = 0x80000000,
>    SetDrawingFlags = 0, FillRectangle = 0x4072c000, DrawRectangle = 0,
> DrawLine = 0x4072c000, DrawLines = 0xa32bef40,
>    FillTriangle = 0x1, FillRectangles = 0x1, FillSpans = 0, SetFont = 0,
> GetFont = 0xa6e53f88, DrawString = 0,
>    DrawGlyph = 0xa32bcf30, SetEncoding = 0, GetSubSurface = 0xa32c8ff0,
> GetGL = 0x1, Dump = 0, DisableAcceleration = 0x190}
>
> Mike Emmel wrote:
> > I fixed the debug message and pushed it.
> >
> > I don't crash but I've crashed here before because the surface was garbage
> > probably because it was freed.
> >
> > Can you run under gdb and see if the dfbsruface looks like its trash.
> >
> > I don't crash.
> >
> > Mike
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to