There's no patch, but I'd be glad to consider one that you created... you've
got all the code there in front of you. :)

On 2/16/07, Sakur <[EMAIL PROTECTED]> wrote:



Ben Combee wrote:

On 2/15/07, Sakur <[EMAIL PROTECTED]> wrote:

> Hi,All:
>     Recently,when I tested my directfb application (through some special
> test engine),I encountered a assert fail located in dfb_gfxcard_blit(
> gfxcard.c)-->>>D_ASSERT( rect->x < state->source->width )
>     In my test program,a source rectangle
> (x:INT_MAX,y:INT_MAX,w:INT_MAX,h:INT_MAX) was passed into
> IDirectFBSurface->Blit function,then,the assert error  crashed the
> program.Theoretically, this rectangle should never be intersected with
> any surface area. But it passed the intersect check in IDirectFBSurface_Blit
> ,(function *dfb_rectangle_intersect* return true), therefore caused the
> assert in dfb_gfx_blit. The reason why it could pass is that INT_MAX+INT_MAX
> = -2 (see dfb_rectangle_intersect implementation). Am I missed something
> that this issue is already known or anyone help me confirm this? Thanks
>

This sounds like a valid error... the numbers usually handled in
coordinate spaces in directfb are so small that this hadn't been seen
before.

The problem is that the rectangle is invalid because it can't be converted
into a DFBRegion -- while the top-left corner is in the valid coordinate
space (INT_MAX, INT_MAX), the bottom-right corner is outside that space
(actually, any size rectangle other than 0,0 would be invalid here).



Hi,Ben
    Yeah,actually ,it is a weird case for this test that results a valid
fail!
    However,as I mentioned in the mail ==> dfb_rectangle_intersect return
TRUE,I may expect this would return FALSE,so it couldn't crash the
application at asserting failure. Any patch necessary to avoid this rare
problem (let dfb_rectangle_intersect return FALSE)?

Cheers
Sakur

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

Reply via email to