[Scummvm-tracker] [ScummVM :: Bugs] #13339: GUI: Game Options crashes launcher at small application widths
ScummVM :: Bugs
trac at scummvm.org
Sat Mar 5 21:01:02 UTC 2022
#13339: GUI: Game Options crashes launcher at small application widths
--------------------------------------------------+---------------------
Reporter: antoniou79 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: GUI
Version: | Resolution:
Keywords: crash, assertion fault, width, resize | Game:
--------------------------------------------------+---------------------
Comment (by antoniou79):
Further looking into this, it seems that the culprit (or one of them) is
EditTextWidget::getEditRect() from edittext.cpp and
[https://github.com/scummvm/scummvm/blob/94886c8f6bb8ba947271636d71247af2214d6000/gui/widgets/edittext.cpp#L115
in particular this line]:
{{{
Common::Rect r(2 + _leftPadding, 1, _w - 1 - _rightPadding, _h);
}}}
which, for low widths, attempts to create a Rect for which the right x
coordinate is lower than the left x coordinate -- and this triggers the
assertion fault in the isValidRect() check.
The Game Options "Game" tab has too editable fields, so they are the ones
causing the crash.
In very low widths, maybe these fields should not show up at all (just to
prevent the crash)?
--
Ticket URL: <https://bugs.scummvm.org/ticket/13339#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list