Project

General

Profile

Bug #789

saving song info results in save error - An error occured: FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL

Added by Bug Reporter almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
plugins/flac
Target version:
Start date:
April 20, 2018
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

Attempting to use the Song Info dialog to save tag info results in a save error. Although the examples provided are only for FLAC files, I have observed the error with other types of files such as MP3. Furthermore, it does not occur with all FLAC files. I have not been able to find a pattern explaining which files are affected by this error. I'm running Arch Linux and Audacious 3.9.

INFO vfs.cc:111 [VFSFile]: <0x55ad726cf410> open (mode r+) file:///Music/Aerosmith/04-JaniesGotAGun.flac
DEBUG metadata.cc:137 [write_tuple]: Update song tuple.
DEBUG vfs.cc:178 [fseek]: <0x55ad726cf410> seek to 0 from beginning
DEBUG vfs.cc:137 [fread]: <0x55ad726cf410> read 4 elements of size 1 = 4
DEBUG vfs.cc:198 [ftell]: <0x55ad726cf410> tell = 4
DEBUG metadata.cc:85 [tell_cb]: Current position: 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 34 elements of size 1 = 34
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 32 elements of size 1 = 32
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 34 elements of size 1 = 34
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 23 elements of size 1 = 23
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 14 elements of size 1 = 14
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 9 elements of size 1 = 9
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 27 elements of size 1 = 27
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 31 elements of size 1 = 31
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 28 elements of size 1 = 28
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 10 elements of size 1 = 10
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 64 elements of size 1 = 64
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8690001970> read 92489 elements of size 1 = 92489
DEBUG vfs.cc:198 [ftell]: <0x7f8690001970> tell = 92879...
DEBUG metadata.cc:85 [tell_cb]: Current position: 92879
ERROR metadata.cc:187 [write_tuple]: An error occured: FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL

Here is another example of the same error with a different song.

DEBUG metadata.cc:329 [read_tag]: FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER found.INFO probe.cc:62 [aud_file_find_decoder]: Probing file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac.
INFO probe.cc:87 [aud_file_find_decoder]: Matched FLAC Decoder by extension.
INFO probe-buffer.cc:31 [ProbeBuffer]: <0x7f8684051fc0> buffering enabled for file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
INFO vfs.cc:111 [VFSFile]: <0x7f8684051fc0> open (mode r) file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
DEBUG metadata.cc:241 [read_tag]: Probe for tuple.
DEBUG vfs.cc:178 [fseek]: <0x7f8684051fc0> seek to 0 from beginning
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:198 [ftell]: <0x7f8684051fc0> tell = 4
DEBUG metadata.cc:85 [tell_cb]: Current position: 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 34 elements of size 1 = 34
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 32 elements of size 1 = 32
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 17 elements of size 1 = 17
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 43 elements of size 1 = 43
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 14 elements of size 1 = 14
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 9 elements of size 1 = 9
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 19 elements of size 1 = 19
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 28 elements of size 1 = 28
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 22 elements of size 1 = 22
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 10 elements of size 1 = 10
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 37 elements of size 1 = 37
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 57903 elements of size 1 = 57903
DEBUG vfs.cc:198 [ftell]: <0x7f8684051fc0> tell = 58252
DEBUG metadata.cc:85 [tell_cb]: Current position: 58252
DEBUG metadata.cc:304 [read_tag]: Stream length: 265000 seconds
DEBUG vfs.cc:259 [fsize]: <0x7f8684051fc0> size = 26993452
DEBUG metadata.cc:271 [read_tag]: Vorbis comment contains 7 fields
DEBUG metadata.cc:272 [read_tag]: Vendor string: reference libFLAC 1.3.2 20170101
DEBUG metadata.cc:202 [parse_comment]: Found key ARTIST <Red Hot Chili Peppers>
DEBUG metadata.cc:202 [parse_comment]: Found key TITLE <Snow "Hey Oh" (Red Hot Chili Peppers)>
DEBUG metadata.cc:202 [parse_comment]: Found key TRACKNUMBER <02>
DEBUG metadata.cc:202 [parse_comment]: Found key DATE <2008>
DEBUG metadata.cc:202 [parse_comment]: Found key ALBUM <Red Hot Chili Peppers>
DEBUG metadata.cc:202 [parse_comment]: Found key COMMENT <FLAC via k3b from CD>
DEBUG metadata.cc:202 [parse_comment]: Found key GENRE <Alternative Rock>
DEBUG metadata.cc:329 [read_tag]: FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER found.INFO probe.cc:62 [aud_file_find_decoder]: Probing file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac.
INFO probe.cc:87 [aud_file_find_decoder]: Matched FLAC Decoder by extension.
INFO probe-buffer.cc:31 [ProbeBuffer]: <0x55ad7245b400> buffering enabled for file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
INFO vfs.cc:111 [VFSFile]: <0x55ad7245b400> open (mode r) file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
INFO probe.cc:62 [aud_file_find_decoder]: Probing file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac.
INFO probe.cc:87 [aud_file_find_decoder]: Matched FLAC Decoder by extension.
INFO probe-buffer.cc:31 [ProbeBuffer]: <0x7f8684051fc0> buffering enabled for file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
INFO vfs.cc:111 [VFSFile]: <0x7f8684051fc0> open (mode r) file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
DEBUG metadata.cc:241 [read_tag]: Probe for tuple.
DEBUG vfs.cc:178 [fseek]: <0x7f8684051fc0> seek to 0 from beginning
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:198 [ftell]: <0x7f8684051fc0> tell = 4
DEBUG metadata.cc:85 [tell_cb]: Current position: 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 34 elements of size 1 = 34
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 32 elements of size 1 = 32
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 17 elements of size 1 = 17
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 43 elements of size 1 = 43
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 14 elements of size 1 = 14
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 9 elements of size 1 = 9
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 19 elements of size 1 = 19
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 28 elements of size 1 = 28
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 22 elements of size 1 = 22
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 10 elements of size 1 = 10
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 37 elements of size 1 = 37
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x7f8684051fc0> read 57903 elements of size 1 = 57903
DEBUG vfs.cc:198 [ftell]: <0x7f8684051fc0> tell = 58252
DEBUG metadata.cc:85 [tell_cb]: Current position: 58252
DEBUG metadata.cc:304 [read_tag]: Stream length: 265000 seconds
DEBUG vfs.cc:259 [fsize]: <0x7f8684051fc0> size = 26993452
DEBUG metadata.cc:271 [read_tag]: Vorbis comment contains 7 fields
DEBUG metadata.cc:272 [read_tag]: Vendor string: reference libFLAC 1.3.2 20170101
DEBUG metadata.cc:202 [parse_comment]: Found key ARTIST <Red Hot Chili Peppers>
DEBUG metadata.cc:202 [parse_comment]: Found key TITLE <Snow "Hey Oh" (Red Hot Chili Peppers)>
DEBUG metadata.cc:202 [parse_comment]: Found key TRACKNUMBER <02>
DEBUG metadata.cc:202 [parse_comment]: Found key DATE <2008>
DEBUG metadata.cc:202 [parse_comment]: Found key ALBUM <Red Hot Chili Peppers>
DEBUG metadata.cc:202 [parse_comment]: Found key COMMENT <FLAC via k3b from CD>
DEBUG metadata.cc:202 [parse_comment]: Found key GENRE <Alternative Rock>
DEBUG metadata.cc:329 [read_tag]: FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER found.INFO vfs.cc:111 [VFSFile]: <0x55ad725cc170> open (mode r+) file:///Music/02-SnowHeyOh_RedHotChiliPeppers.flac
DEBUG metadata.cc:137 [write_tuple]: Update song tuple.
DEBUG vfs.cc:178 [fseek]: <0x55ad725cc170> seek to 0 from beginning
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:198 [ftell]: <0x55ad725cc170> tell = 4
DEBUG metadata.cc:85 [tell_cb]: Current position: 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 34 elements of size 1 = 34
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 32 elements of size 1 = 32
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 17 elements of size 1 = 17
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 43 elements of size 1 = 43
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 14 elements of size 1 = 14
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 9 elements of size 1 = 9
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 19 elements of size 1 = 19
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 28 elements of size 1 = 28
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 22 elements of size 1 = 22
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 10 elements of size 1 = 10
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 37 elements of size 1 = 37
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 4 elements of size 1 = 4
DEBUG vfs.cc:137 [fread]: <0x55ad725cc170> read 57903 elements of size 1 = 57903
DEBUG vfs.cc:198 [ftell]: <0x55ad725cc170> tell = 58252
DEBUG metadata.cc:85 [tell_cb]: Current position: 58252
ERROR metadata.cc:187 [write_tuple]: An error occured: FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL

History

#1 Updated by Bug Reporter almost 6 years ago

Correction: I cannot reproduce this error with MP3 files at the moment. Maybe my memory is incorrect on this affecting MP3 files. As I said, it does not occur with all FLAC files - only about 1 out of every 10 is my estimate. I have not been able to find a pattern explaining which files are affected by this error. I rip all files from CD with k3b and some have this issue, while others don't.

#2 Updated by Michael Schwendt almost 6 years ago

About MP3 files:

Unless I'm mistaken, song info save errors can occur with files that contain both an ID3v1 tag and an ID3v2 tag. Typically, cleaning up your files with a tool like EasyTAG and removing ancient ID3v1 tags will avoid such errors.

///

About FLAC files:

The FLAC API documentation seems to suggest that checking for tempfile requirement is necessary. Perhaps it has not been like that always.

https://xiph.org/flac/api/group__flac__metadata__level2.html#ggafe2a924893b0800b020bea8160fd4531af86670707345e2d02cc84aec059459d0

FLAC__metadata_chain_write_with_callbacks() was called when the chain write requires a tempfile;
use FLAC__metadata_chain_write_with_callbacks_and_tempfile() instead.
Or, FLAC__metadata_chain_write_with_callbacks_and_tempfile() was called when the chain write does not require a tempfile;
use FLAC__metadata_chain_write_with_callbacks() instead. Always check FLAC__metadata_chain_check_if_tempfile_needed() before writing via callbacks.

#3 Updated by Bug Reporter almost 6 years ago

Michael Schwendt wrote:

removing ancient ID3v1 tags will avoid such errors.

I checked that on some of the files that are giving me a save error. They do not have any ID3v1 tags. However, all the files I tested were FLAC files.

Michael Schwendt wrote:

About FLAC files:

All I can say is that some FLAC files cause a save error in Audacious and some do not and I cannot pinpoint a difference between the files. For example, I can rip two CD's with k3b using the exact same settings. They will each have the same type of ID3 tags. (I'm using kid3 to edit tags.) Some of those files produce save errors in Audacious and some don't.

I use one of the standard tag fields to hold a rating of 1-5 for each song. When I listen to a song, I often want to give it a rating of 1-5 in Audacious while it is playing. But these save errors prevent me from being able to do that.

A workaround might be if Audacious provided a feature that would let me rate songs directly. This seems like a useful feature that many people would appreciate. It could be built upon, leading to other new features. For example, the ability to open all files in a directory that are rated 4 or above might be nice.

#4 Updated by Michael Schwendt almost 6 years ago

It seems you've misread the two sections of my post. It makes no sense to mention FLAC files in response to my comment on MP3 files.

#5 Updated by John Lindgren almost 6 years ago

Please upload and provide a link to an example file that produces the error.

#6 Updated by Bug Reporter almost 6 years ago

John Lindgren wrote:

Please upload and provide a link to an example file that produces the error.

Here is a link to a FLAC file which was burned using k3b in Arch Linux.

https://drive.google.com/file/d/1LPvCicXx2nWfZ5TRmJdx_MmYLT62F4rM/view?usp=sharing

With this file (and many others burned from CD), when I try to save information to the Album Artist field (using the Song Info dialog in Audacious) I receive the "save error" described in this bug report.

The file name is 08-Instrumental_Day2_Stereotypes.flac

The current tags include:
Title: Day 2
Album: Stereotypes
Comment: FLAC via k3b from CD
Genre: Violin Hip Hop Original
Track Number: 8

As stated, I cannot save a value to Album Artist through Audacious. I can save tags to this file using other tagging tools (such as Kid3 or Music Brainz).

I'll remove (stop sharing) this file in about a week.

Thanks for your interest in this bug.

I would love to see Audacious add a feature to give tracks a rating (1 to 5 stars) while playing the tracks. That's what I'm trying to use the Song Info dialog for. My idea was to use the Album Artist to hold a value of 1 to 5. But this is very cumbersome (and it will continue to be even after this present issue is resolved).

#7 Updated by John Lindgren almost 6 years ago

  • % Done changed from 0 to 100
  • Target version set to 3.10
  • Status changed from New to Closed
  • Category changed from libaudtag to plugins/flac

At least with the linked file, it seems that it's necessary to use a temporary file when the size of the tag increases by some amount. To keep the code simple, we'll just use a temporary file unconditionally. We do the same thing for ID3 tags.

https://github.com/audacious-media-player/audacious-plugins/commit/f1e84ce7f10d68d5e93d1fa65f9bb03b38b1e002

#8 Updated by Michael Schwendt almost 6 years ago

The comments in the FLAC__metadata_chain_check_if_tempfile_needed() method give some insight:
https://github.com/xiph/flac/blob/master/src/libFLAC/metadata_iterators.c#L1628

#9 Updated by John Lindgren almost 6 years ago

  • % Done changed from 100 to 50
  • Status changed from Closed to In Progress

From the FLAC code, it looks like using a temporary file unconditionally could also lead to FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL.

I'll need to update the fix. Reopening.

#10 Updated by John Lindgren almost 6 years ago

  • % Done changed from 50 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF