3

Very odd issue we have hit with some Windows PCs. We have a video application and one part uses WritePixels to update a WriteableBitmap and display the frames to screen.

Code is:

_currentframe.WritePixels(new Int32Rect(0, 0, data.Width, data.Height),
                          data.Bytes, data.Stride, 0);

NotifyPropertyChanged("CurrentFrame");

(Where 'data' is a wrapper class for our pixel data)

It works fine on 99% of computers. On at least one Windows 8.1 Laptop, the images don't refresh. I don't know why, and everything else works.

I don't understand what would make this fail on some PCs - any suggestions are welcome. Some details of the problem system: Win8.1 (Spanish), net 4.5.50709 (but software uses 4.0).

Graphics Drivers are Intel HD Graphics 4000

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
Sugrue
  • 3,629
  • 5
  • 35
  • 53

2 Answers2

3

We actually have a reproduction of this bug that occurs on some computers in our software to draw high-performance charts. It appears to be an issue with some Intel Graphics drivers and WriteableBitmap / .NET4/4.5.

See http://www.scichart.com/questions/question/zoom-not-working-properly-on-one-single-computer

What we believe is happening is the WriteableBitmap once locked/unlocked once is not allowing any further updates. The same code works perfectly well on many other machines and the only other workaround is to disable hardware rendering for the WPF process on systems that exhibit this problem.

Another workaround is to update the graphics drivers on the target PC with Intel HD Graphics.

Dr. Andrew Burnett-Thompson
  • 20,980
  • 8
  • 88
  • 178
  • Thanks for your reply. It does sound like the same issue. – Sugrue Nov 06 '15 at 14:04
  • 1
    We use WriteableBitmap very heavily and this issue can be quite easily worked around. It does affect only Intel HD Graphics. My advice to you is in your app put a config parameter bool useHardwareAcceleration so users can disable this easily. Then also advise with the distribution of your product to ensure graphic drivers are up to date. Good luck! – Dr. Andrew Burnett-Thompson Nov 06 '15 at 17:42
2

This can be caused by a known bug in Intel's driver. According to this issue report and this report from Intel, the bug is fixed in Intel drivers 30.0.100.9667 and newer.

Simon
  • 1,814
  • 20
  • 37
  • I recently saw this happen on a PC that had been updated to Windows 11. Some issue with the graphics driver I imagine. – Sugrue Nov 01 '21 at 09:45