[Scummvm-tracker] [ScummVM :: Bugs] #13413: COMMON: Systematic crash after adding any new game in 2.6.0git

ScummVM :: Bugs trac at scummvm.org
Sun Apr 10 16:31:56 UTC 2022


#13413: COMMON: Systematic crash after adding any new game in 2.6.0git
---------------------+---------------------
Reporter:  dwatteau  |       Owner:  (none)
    Type:  defect    |      Status:  new
Priority:  blocker   |   Component:  Common
 Version:            |  Resolution:
Keywords:            |        Game:
---------------------+---------------------
Comment (by criezy):

 Thank you for the bug report.
 This is actually a bug I also found two weeks ago, and it only happens
 when grouping games in the launcher list mode.

 The crash occurs because the list of games (`_dataList`) and the list of
 attributes (`_attributeValues`) are out of sync when
 `GroupedListWidget::groupByAttribute` is called after adding a game. The
 former has already been updated with the new game, but the later is not
 yet updated and has one less item.

 The issue is in `LauncherSimple::updateListing()`. It first calls
 `GroupedListWidget::setList` which only updates the `_dataList` and then
 calls `groupEntries()` which calls
 `GroupedListWidget::setAttributeValues`, which updates the
 `_attributeValues`. But before we get there `GroupedListWidget::setList`
 called `groupByAttribute()` after `_dataList` has been updated, but before
 we get the new attributes list.

 I started thinking how to reorganise the code to avoid this issue, but I
 found other issues with the way the `GroupedListWidget` is implemented
 while doing so. So it may take a bit longer to fix. And because of this
 it's good to have a bug to track the issue :-)
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/13413#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list