In diagnosing an issue w/ Sound Juicer (audio/sound-juicer) crashing on startup on FreeBSD-11.0-CURRENT (https://bugzilla.gnome.org/show_bug.cgi?id=742019), research ultimately showed that the crash was thanks to libmusicbrainz5 depending on undefined behaviour of the std::string constructor which happens to work on Linux. (it is passing NULL to the std::string constructor, instead of "")
I have opened a GitHub PR w/ the libmusicbrainz5 project: https://github.com/metabrainz/libmusicbrainz/pull/6
But so far have gotten no response. With the change in that pull request, Sound Juicer starts and runs as expected on my system.
I'm a relative newbie to FreeBSD, is the above change something that would normally get included in the FreeBSD port until upstream fixes and puts out a new release?
Thanks in advance.
Auto-assigned to maintainer jhale@FreeBSD.org
It is absolutely normal to include local patches while upstream gets them merged.
If you can include an svn diff against the latest version of the port and attach it here that would be great.
Nice submission Peter, good work on the upstreaming too :)
Created attachment 151943 [details]
Patch to audio/libmusicbrainz5 port
Lord my svn fu is rusty, this is a svn diff of just the port directory.
If some other format is required, please let me know.
Normally the svn diff is done from /usr/ports for more changes covering multiple ports/paths, or from /usr/ports/category/port for individual ports, the version you attached is fine though, thank you :)
Well, this is from one of the libmusicbrainz developers on the GH PR:
"I'm happy to merge this, but can't see me releasing a new version simply to fix this.
To be honest, I think it's quite clear that the C interface is expecting a null terminated string here, so ultimately the calling application should be responsible for passing correct data. I'd suggest an update to sound-juicer to ensure that it passes an empty string (or doesn't call the method at all) if no proxy is required."
I've commented on the original sound-juicer bug, not sure which way this will fall (although ultimately it does sound like the fix attached here is going to go into libmusicbrainz5), not sure how FreeBSD wants to handle this in the meantime. I can just as easily submit a patch for sound-juicer to update it's using of the libmusicbrainz5 API to use null terminated strings instead of NULL.
The GH pull request was merged into libmusicbrainz, so regardless of how the sound-juicer devs decide to handle this, I think this is a good candidate for inclusion in the ports tree until a new libmusicbrainz is released.
A commit references this bug:
Date: Sun Jun 14 17:55:53 UTC 2015
New revision: 389646
- Update audio/libmusicbrainz5 to 5.1.0
- Fix a crash in audio/sound-juicer caused by libmusicbrainz5 (fix added
upstream, but not in this release) 
- Bump PORTREVISION on dependent ports
PR: 196959 
Submitted by: Pete Johanson <email@example.com> 
Committed. Thanks for your work and sorry it took so long!