[Scummvm-tracker] [ScummVM] #9598: SDL: write access violation with OSD when updating screen

Thierry Crozat trac at scummvm.org
Mon Oct 3 02:05:00 CEST 2016


#9598: SDL: write access violation with OSD when updating screen
----------------------+-----------------------
  Reporter:  criezy   |      Owner:
      Type:  defect   |     Status:  new
  Priority:  blocker  |  Component:  --Other--
Resolution:           |   Keywords:
      Game:           |
----------------------+-----------------------

Comment (by criezy):

 Some notes, as I am confused by the code and not sure what it is supposed
 to do:
  - SurfaceSdlGraphicsManager::internUpdateScreen() actually assumes dirty
 rects are either in virtual coordinates or in real coordinates depending
 if _overlayVisible is true.
  - addDirtyRect() takes a bool to indicate if the coordinates are real
 ones. The default is false and before the recent change the only place
 where it was called with true was from drawMouse() where the mouse
 coordinate actually again depend on whether _overlayVisible is true or
 not.
  - internUpdateScreen() calls SDL_UpdateRects() with the scaled surface
 (post-scaling, thus in real coordinates) and the dirty rect list. This is
 a bit strange to be missing real and virtual coordinate like that.
 SDL_UpdateRects() doesn't use the dirty rects though, so it doesn't
 matter.

 From this it appears that the easier change might be to change the
 recently added dirty rects for OSD to check _overlayVisible and either
 pass virtual or real coordinates to addDirtyRect(). I am confused however
 in what the 'realCoordinates' flag is supposed to mean in the call to
 addDirtyRect().

 Also I would suggest to remove the dirty rect list from the call to
 SDL_UpdateRects() since it is both unused and confusing (there is a risk
 we might decide to use it assuming it is in screen coordinates when it
 might actually be in virtual coordinates).

--
Ticket URL: <https://bugs.scummvm.org/ticket/9598#comment:1>
ScummVM <https://bugs.scummvm.org>
ScummVM



More information about the Scummvm-tracker mailing list