Flash/Mozilla/Composite bug details?

Kevin E Martin kem at freedesktop.org
Fri Aug 13 13:18:57 PDT 2004


Keith, could you also put this comment into bug 991 (and the other
comments about what the Xlib changes involve) so that we can point other
people to it? Thanks!

On Fri, Aug 13, 2004 at 01:07:31PM -0700, Keith Packard wrote:
> 
> Around 10 o'clock on Aug 13, Alan Coopersmith wrote:
> 
> > Can someone send an explanation between now and Monday of what the
> > bug in Flash is and what they need to do with the way they handle
> > visuals to fix it?   (Perhaps even a simple test case - is it just
> > build the CVS head, turn on composite and try to run Flash?)
> 
> The test case is simple -- run mozilla against an X server with the ARGB 
> visual to a site using flash ( http://www.kimpossible.com is my daughter's 
> favorite at the moment)
> 
> The sympotom is an attempt by Flash to use PutImage with a depth 32 image
> to a 16 bit window.
> 
> Here's a bit of an xscope trace:
> 
>          ............REQUEST: PutImage
>              sequence number: 0000009e
>                       format: ZPixmap
>               request length: ff56
>                     drawable: DWB 02800001
>                           gc: GXC 0280001a
>                             function: Copy
>                           plane-mask: ffffffff
>                           foreground: 00000000
>                           background: 00000001
>                        width: 02f8
>                       height: 0056
>                        dst-x: 0
>                        dst-y: 0
>                     left-pad: 00
>                        depth: 20
>          ............REQUEST: GetInputFocus
>              sequence number: 0000009f
>               request length: 0001
> 388.21:                                           64 bytes <-- X11 Server 7
>                                          ..............ERROR: Match
>                                              sequence number: 009e
>                                                 minor opcode: 0000
>                                                 major opcode: 48
> 
> And here's a stack trace from mozilla:
> 
> #41 0x404ffd11 in gdk_x_error (display=0x0, error=0x40965edc)
>     at gdkmain-x11.c:530
> #42 0x40692d64 in _XError (dpy=0x8838cf0, rep=0xbfffb2b0) at XlibInt.c:2909
> #43 0x406912e3 in _XReply (dpy=0x8838cf0, rep=0xbfffb2b0, extra=0, discard=1)
>     at XlibInt.c:1839
> #44 0x4068c3b4 in XSync (dpy=0x8838cf0, discard=0) at Sync.c:45
> #45 0x4068c475 in _XSyncFunction (dpy=0x0) at Synchro.c:34
> #46 0x406853a5 in XPutImage (dpy=0x8838cf0, d=41943041, gc=0x868b6e8,
>     image=0x868b760, req_xoffset=0, req_yoffset=0, x=0, y=0, req_width=760,
>     req_height=86) at PutImage.c:1037
> #47 0x4614f085 in PlatformBitBuffer::BltToScreen ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #48 0x4611eabd in CorePlayer::DrawScreen ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #49 0x461973cb in PlatformPlayer::NsSetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #50 0x4619b34e in NPP_SetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #51 0x46199580 in Private_SetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #52 0x42149127 in ns4xPluginInstance::InitializePlugin ()
>    from /usr/lib/mozilla-firefox/components/libgkplugin.so
> 
> And here's where that image is created:
> 
> #0  XCreateImage (dpy=0x8850658, visual=0x86a7868, depth=32, format=2,
>     offset=0, data=0x1f <Address 0x1f out of bounds>, width=728, height=31,
>     xpad=32, image_bytes_per_line=0) at ImUtil.c:328
> #1  0x44f8090c in PlatformBitBuffer::CreateXImage ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #2  0x44f80d2d in PlatformBitBuffer::CreateScreenBits ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #3  0x44f80622 in PlatformBitBuffer::PlatformBitBuffer ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #4  0x44f5134e in CorePlayer::UpdateBuffer ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #5  0x44f50a43 in CorePlayer::DrawScreen ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #6  0x44fc93cb in PlatformPlayer::NsSetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #7  0x44fcd34e in NPP_SetWindow ()
> 
> The specified visual is the ARGB visual and was selected by the flash 
> player which appears to have a fixed list of formats to try and doesn't 
> appear to know which visual is associated with the output window.
> 
> Here's where the visual was selected:
> 
> #0  XMatchVisualInfo (dpy=0x8873268, screen=0, depth=32, class=4,
>     visual_info=0xbfffb430) at VisUtil.c:202
> #1  0x4633aa80 in UnixCommonPlayer::ChoosePixmapFormat ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #2  0x4637d373 in PlatformPlayer::NsSetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #3  0x4638134e in NPP_SetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #4  0x4637f580 in Private_SetWindow ()
>    from /usr/lib/flashplugin-nonfree/libflashplayer.so
> #5  0x42149127 in ns4xPluginInstance::InitializePlugin ()
>    from /usr/lib/mozilla-firefox/components/libgkplugin.so
> 
> As we can see, it's looking for a depth 32 TrueColor visual, which does 
> not match the visual for the window into which this image will be put.
> 
> I suspect what they should be doing is using GetWindowAttributes to 
> discover the visual for their window and using that instead of attempting 
> to get at it via this round-about route.
> 
> -keith
> 
> 



> _______________________________________________
> release-wranglers mailing list
> release-wranglers at freedesktop.org
> http://freedesktop.org/mailman/listinfo/release-wranglers



More information about the release-wranglers mailing list