Bug 29254 - Windows media player and VLC crash on Windows Xp guest
Summary: Windows media player and VLC crash on Windows Xp guest
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: win32 qxl xddm (show other bugs)
Version: unspecified
Hardware: Other All
: high critical
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29053
  Show dependency treegraph
 
Reported: 2010-07-25 23:35 UTC by Yonit Halperin
Modified: 2010-08-24 01:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Yonit Halperin 2010-07-25 23:35:31 UTC
The above players crash when attempting to play movie on windows xp guest when the
Qxl is installed. 
When disabling the driver, there is no such problem.
Also, media player classic does not crash.
Comment 1 Yonit Halperin 2010-07-28 06:46:04 UTC
The crashes occur since the off-screen surfaces patch landed.
The problem lays in the "phony" DirectDraw support we supply.
The driver claims to support DrvGetDirectDrawInfo, DrvEnableDirectDraw and DrvDisableDirectDraw, in order to exploit the heap management of the off-screen surfaces DirectDraw supplies. In DrvEnableDirectDraw, the driver publishes its DirectDraw capabilities, and uses stubs for the "must implement" callbacks (though in a buggy manner).
When 1) setting the driver's capabilities flags correctly, 2) adding DDHAL_CB32_CREATESURFACE to the capabilities 3) setting ddRVal in the callbacks to DDERR_UNSUPPORTED ==> windows media player runs without crashing. However VLC still crashes.

When adding DDHAL_CB32_MAPMEMORY to the capabilities, VLC doesn't crash, but it displays blank screen instead of the movie being played. The VLC log file reports on "vout_directx warning: could not blit surface (error -2147467259)".
I looked at the VLC source files, and it doesn't support a return value other than DD_OK for IDirectDrawSurface2_Flip and IDirectDrawSurface2_Blt.
A bypass to this problem is to change the video output setting of VLC to use other method than DirectX.

However, I worry, that other applications that use DirectDraw (when the driver announce it has support for it), don't manage well unsupported capabilities.

It seems that until we implement real DirectDraw support, we will need to manage the off-screen surfaces memory by ourselves.

Note: VLC log file is broken in the latest versions of VLC, in order to produce VLC logs I used VLC version 0.9.2
Comment 2 Alexander Larsson 2010-08-24 01:34:30 UTC
We dropped the direct-draw allocator, so this should be fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.