After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 579093 - Disc number parsing fails sometimes
Disc number parsing fails sometimes
Status: RESOLVED OBSOLETE
Product: sound-juicer
Classification: Applications
Component: metadata
2.24.x
Other All
: Normal normal
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on: 663456
Blocks:
 
 
Reported: 2009-04-15 21:52 UTC by David Hilton
Modified: 2021-05-17 16:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Hilton 2009-04-15 21:52:29 UTC
Please describe the problem:
A fairly lengthy thread about the problem:
http://musicbrainz.org/show/edit/?editid=10382208

Steps to reproduce:
1. Get a CD from a set with a long title
2. Insert CD
3. Observe metadata lookup


Actual results:
Sometimes the disc number is parsed, sometimes not.

Expected results:
consistency

Does this happen every time?
no

Other information:
http://musicbrainz.org/show/edit/?editid=10382208
Comment 1 Ross Burton 2009-04-23 09:59:13 UTC
For ease of future bug reading, the album title is:

Concertos for Harpsichord, Violin, Flute, Oboe d'amore (The English Concert feat. harpsichord: Trevor Pinnock) (disc 5)

I guess this has nothing to do with the length but the extra brackets are confusing the regex.  You say "observe metadata lookup" but unless I have the same album that you do (which I don't) I cannot observe the same problem.

What happens when your SJ parses the disc number of this album?
Comment 2 David Hilton 2009-04-24 03:32:54 UTC
I personally have not reproduced it, as I do not own the CD.  According to the reports on the musicbrainz page, the regex parsing the disc number from "(disc n)" in musicbrain titles fails intermittently.

The details may not be visible unless you are logged into musicbrainz - there is a 20 post long thread about it- just in case you don't see it, I've put it on pastebin - http://pastebin.com/m11fc0df4
Comment 3 Eric Nordenstam 2009-05-18 14:30:47 UTC
This is a bug that annoyed me immensely. As I mention in the musicbrainz thread above, a fix is to replace line 421 in sj-metadata-musicbrainz.c . 

It reads 
album->title = g_strdup (data);
and should read
album->title = g_strndup (data, 512);

Maybe a slightly smaller number than 512 would suffice, but memory is cheap. I have not studied the code enough to understand why the regexp library fails to properly process the string if it has been copied with g_strdup and not g_strndup. 
Comment 4 Christophe Fergeau 2012-08-27 10:18:41 UTC
Is it still happening with the switch to libmusicbrainz4/libmusicbrainz5? We should no longer need magic regexp to detect multiple discs with these releases.
Comment 5 GNOME Infrastructure Team 2021-05-17 16:02:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/sound-juicer/-/issues/115.