#12 unable to mount audioCD.nrg image

None
closed
Rok Mandeljc
libmirage
default
2014-08-22
2012-10-26
janukowycz
No

Trying to mount audio cd image file.nrg gives:

ERROR: Failed to load image: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

dmesg output:

Oct 26 22:42:33 (none) kernel: [ 3209.395631] scsi 6:0:0:0: CD-ROM CDEmu Virt. CD/DVD-ROM 1.10 PQ: 0 ANSI: 0
Oct 26 22:42:33 (none) kernel: [ 3209.401473] sr1: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
Oct 26 22:42:33 (none) kernel: [ 3209.402785] sr 6:0:0:0: Attached scsi generic sg5 type 5
Oct 26 22:42:33 (none) kernel: [ 3209.403906] scsi 6:0:1:0: CD-ROM CDEmu Virt. CD/DVD-ROM 1.10 PQ: 0 ANSI: 0
Oct 26 22:42:33 (none) kernel: [ 3209.406151] sr2: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
Oct 26 22:42:33 (none) kernel: [ 3209.406571] sr 6:0:1:0: Attached scsi generic sg6 type 5
Oct 26 22:42:33 (none) kernel: [ 3209.473877] cdemud[4130]: segfault at f ip b748b876 sp bf927ed0 error 4 in libmirage.so.6.0.0[b7479000+1e000]
Oct 26 22:42:33 (none) kernel: [ 3209.484667] sr 6:0:0:0: device released with command 878
Oct 26 22:42:33 (none) kernel: [ 3209.489296] sr 6:0:1:0: device released with command 885

nrg images other than audio cd mount without error and are usable.

helpful information:

uname -a
Linux localhost_mt 3.2.0-3-486 #1 Thu Jun 28 08:08:24 UTC 2012 i686 GNU/Linux

LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:core-4.1-ia32:core-4.1-noarch:security-4.0-ia32:security-4.0-noarch:security-4.1-ia32:security-4.1-noarch
Distributor ID: LinuxMint
Description: Linux Mint Debian Edition
Release: 1
Codename: debian

cdemu version
Library version: 1.5.0
Daemon version: 1.5.0

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2)

pkg-config --modversion glib-2.0
2.32.3

lsmod | grep -i vhba
vhba 13015 2
scsi_mod 135629 5 libata,sd_mod,sr_mod,vhba,sg

ps -C cdemud
PID TTY TIME CMD
4230 ? 00:00:00 cdemud

cat ~/.cdemu-daemojn.log
Starting CDEmu daemon with following parameters:
- num devices: 2
- ctl device: /dev/vhba_ctl
- audio driver: pulse
- bus type: session

attachment: mychunk.bin as a result of tail --bytes=100K myimage.nrg > mychunk.bin

Any help greatly appreciated.

1 Attachments

Discussion

  • janukowycz
    janukowycz
    2012-10-27

    Audio images in nrg format made by linux version of Nero (Nero Linux) mount fine and function properly. Problem persist with these made with Windows version of Nero.

     
  • Rok Mandeljc
    Rok Mandeljc
    2012-10-27

    Hey,

    please try applying the attached patch to libMirage 1.5.0.

    This issue should have been fixed in git for a while now (although the current git version seems to have a regression with CDTEXT parsing in NRG images, which I will look into).

    Regards,
    Rok

     
    Attachments
  • Yes, there seem to be a problem in the CD-Text parsing, however at least on the git version that doesn't cause a segfault.

    If I should make a guess too, I think the issue was the subchannel-bug that was fixed last month, seeing as that would probably cause a segfault on an image such as this.

    Patch attached.

    Edit: Due to API changes in libmirage that last patch won't work unless it has been changed slightly. Attaching a corrected patch.

     
    Last edit: Henrik Stokseth 2012-10-27
  • janukowycz
    janukowycz
    2012-10-27

    Thx for quick reply.

    I don't know if I've patched correctly. I did the following steps:

    1. downloaded tarball for libmirage-1.5.0 and unpacked it.
    2. copied patches mirage-nrg-subchan-fix.diff and mirage-nrg-subchan-fix2.diff to /libmirage-1.5.0/src/parsers/image-nrg folder (I assume the file that should be patched is image-nrg-parser.c ?)
    3. ran command patch -p0 < mirage-nrg-subchan-fix.diff
    4. ran command patch -p0 < mirage-nrg-subchan-fix2.diff
    5. compiled (after make clean and configure) and ran sudo make install
    6. rebooted

    Unfortunately error still persist.
    Have I done smomething incorrectly? Should I also apply patch.diff attatched by Rok?

     
  • Rok Mandeljc
    Rok Mandeljc
    2012-10-27

    Yes, please try applying my patch first, as it fixes segfault caused by uninitialized variable when setting CD-TEXT data during parsing (which should happen before any issues with subchannel).

     
  • Don't apply mirage-nrg-subchan-fix.diff.

    mirage-nrg-subchan-fix2.diff is the one that I fixed to work with libmirage 1.5.0. If you apply it, it will have to be done manually by hand since the line numbers are off. Sorry...

     
  • janukowycz
    janukowycz
    2012-10-27

    @Henrik So I should manually by hand change the code in image-parser-nrg.c according to changes in mirage-nrg-subchan-fix2.diff ?

    Tried to patch with patch < mirage-nrg-subchan-fix2.diff
    but it gave me the output:

    File to patch: image-nrg-parser.c
    patching file image-nrg-parser.c
    Hunk #1 FAILED at 618.
    Hunk #2 FAILED at 641.
    Hunk #3 FAILED at 673.
    Hunk #4 FAILED at 696.
    Hunk #5 FAILED at 874.
    Hunk #6 FAILED at 897.
    6 out of 6 hunks FAILED -- saving rejects to file image-nrg-parser.c.rej

    I'm trying to patch for the first time (I've never done this before) so I ask these basic questions.

     
  • Rok Mandeljc
    Rok Mandeljc
    2012-10-27

    Try applying patch.diff first, and see if that fixes the crash.

     
  • janukowycz
    janukowycz
    2012-10-27

    @Rok Yes! It did the thing! - now it's working fine.

    @Rok; @Henrik Thank You both for your help.

    best regards

     
    • labels: audioCD.nrg; DBus.Error, libmirage.so.6 --> l, i, b, m, i, r, a, g, e
    • status: open --> closed
    • assigned_to: Rok Mandeljc
    • milestone: -->