Summary: | juk segfaut on every startup | ||
---|---|---|---|
Product: | [Applications] juk | Reporter: | Markus <m4rkusxxl> |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mpyne |
Priority: | NOR | Keywords: | regression |
Version: | 20.04 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kde/juk/commit/e843f457d5656d778396d8045289117443b70975 | Version Fixed In: | 20.04.1 |
Attachments: |
Backtrace from debug build
use back_inserter with fill_n on empty list |
Description
Markus
2020-04-28 18:30:04 UTC
Created attachment 127957 [details]
Backtrace from debug build
Downgrade just juk to 19.12.3 makes it work again. QStringList allColHeaders; allColHeaders.reserve(numColumnsToReserve + standardColHeaders.size()); std::fill_n(allColHeaders.begin(), numColumnsToReserve, i18n("JuK")); Introduced here: https://cgit.kde.org/juk.git/commit/playlist.cpp?id=a800c1b3ffeb1672cf889e707baf2b181d7fc8f1 https://phabricator.kde.org/R344:a800c1b3ffeb1672cf889e707baf2b181d7fc8f1 Created attachment 128055 [details]
use back_inserter with fill_n on empty list
fill_n is more a overwrite than an insert.
Git commit e843f457d5656d778396d8045289117443b70975 by Michael Pyne. Committed on 10/05/2020 at 15:52. Pushed by mpyne into branch 'master'. playlist: Fix crasher with playlists using reserved columns. I introduced this bug in commit a800c1b3ffeb trying to fix a different memory mis-using bug. Sigh. In this case playlists that reserve additional columns would get a valid memory assignment but would be copied into the memory block incorrectly. This needed a back_inserter as well. Thanks to Markus for pointing out the regression, then opening a bug, then leaving a comment to point out both of these, and then drafting a patch that fixes the bug. I can confirm it works in my testing, it also seems to address a bug relating to playback stopping abrupting at the end of a track instead of skipping to the next track, but who knows at this point. FIXED-IN:20.04.1 M +1 -1 playlist.cpp https://invent.kde.org/kde/juk/commit/e843f457d5656d778396d8045289117443b70975 |