Menu

#7 bug in procedure TCustomPaintBox32.Flush

pending-fixed
None
5
2012-08-29
2010-07-23
No

canvas.handle can be temporary set to 0 by vcl in a bloc between canvas.lock and canvas.unlock so it can be temporary invalid if a thread interrupt the code without calling canvas.lock In multl threaded application.. This is what happened in procedure TCustomPaintBox32.Flush (may be otherwhere)
canvas.lock must be placed before testing canvas.handle (if canvas.handle <> 0)...
I have tested the patch in my muultithreaded application and it work

Discussion

  • Pascal Quelen

    Pascal Quelen - 2010-07-23

    TCustomPaintBox32.Flush correction

     
  • Pascal Quelen

    Pascal Quelen - 2010-07-23

    same bug in procedure TCustomPaintBox32.Flush(const SrcRect: TRect);

     
  • Christian-W. Budde

    • assigned_to: nobody --> cwbudde
    • status: open --> pending
     
  • Christian-W. Budde

    • status: pending --> pending-fixed