| Summary: | Collection scan failure for tracks with "inf dB" in REPLAYGAIN_TRACK_GAIN tag field | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | EP <bertyfogs+kdebugs> |
| Component: | Collections/Local | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ralf-engels, tuomas |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | kf5 | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/multimedia/amarok/-/commit/8cd6f9cd018d13ba1b3800a8db3cddc4c70ed649 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | A track with such tag value | ||
Thank you for report and sample file! I'll try reproducing and fixing this soonish, not sure if before or after 3.0.0 though A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/97 Git commit 8cd6f9cd018d13ba1b3800a8db3cddc4c70ed649 by Tuomas Nurmi. Committed on 17/05/2024 at 20:27. Pushed by nurmi into branch 'master'. Ignore any infinite values when reading replaygain tags Apparently QString::toFloat converts them happily to qreals with infinite value. We don't really want them in database, however. Also edit TestMetaTrack::testReplayGain to check that inf gain is ignored. M +1 -0 ChangeLog M +3 -3 shared/MetaReplayGain.cpp M +5 -0 tests/core/meta/TestMetaTrack.cpp M +- -- tests/data/audio/album/Track03.ogg https://invent.kde.org/multimedia/amarok/-/commit/8cd6f9cd018d13ba1b3800a8db3cddc4c70ed649 |
Created attachment 168877 [details] A track with such tag value SUMMARY Some misbehaving software wrote `inf dB` into the `REPLAYGAIN_TRACK_GAIN` tag field for "silence" tracks which feature on some albums for padding I guess. Amarok's collection scanner doesn't account for that and tries to insert it into the database as is: ``` amarok: [ERROR__] [MySqlStorage] "MySQLe query failed! (1054) Unknown column 'inf' in 'field list' on INSERT INTO tracks (url,artist,album,genre,composer,year,title,comment,tracknumber,discnumber,bitrate,length,samplerate,filesize,filetype,bpm,createdate,modifydate,albumgain,albumpeakgain,trackgain,trackpeakgain) VALUES (118410,6375,8775,835,5187,159,'Pause Track','',19,2,1,6467,44100,5614,3,NULL,0,1658593849,-2.63,1.62999,inf,-1);" amarok: [WARNING] [SqlRegistryP] Insert failed. ``` STEPS TO REPRODUCE 1. Create/add the test file to the collection 2. Scan the collection OBSERVED RESULT The scan fails on the test track. EXPECTED RESULT I think it should fall back to 0 for out-of-range values to keep the query valid. SOFTWARE/OS VERSIONS OS: Manjaro amarok-git: 2.9.82.r53.g4b4a4fc-1 ADDITIONAL INFORMATION n/a