libid3tag crash on Ubuntu 8.04 AMD64
#1
I know AMD64 is not officially supported yet, but I'm reporting this crash regardless:
Code:
(gdb) info stack
#0  0x000000000000001d in ?? ()
#1  0x00000000008c8e50 in DllLibID3Tag::id3_file_open (this=0x435656b8, p1=0x7fc86816d328 "/mnt/music/Air/Moon Safari/10 Le Voyage de Penelope.mp3", p2=ID3_FILE_MODE_READONLY) at DllLibid3tag.h:130
#2  0x00000000008c8b27 in MUSIC_INFO::CID3Tag::Read (this=0x43565600, strFile=@0x7fc8681c4018) at Id3Tag.cpp:78
#3  0x0000000000914626 in MUSIC_INFO::CMusicInfoTagLoaderMP3::Load (this=0x1ed7160, strFileName=@0x7fc8681c4018, tag=@0x1e390e0) at MusicInfoTagLoaderMP3.cpp:84
#4  0x0000000000901db1 in MUSIC_INFO::CMusicInfoLoader::LoadItem (this=0x1f33a50, pItem=0x7fc8681c3f90) at MusicInfoLoader.cpp:161
#5  0x000000000077e39c in CBackgroundInfoLoader::Run (this=0x1f33a50) at BackgroundInfoLoader.cpp:92
#6  0x0000000000c5fa93 in CThread::Process (this=0x7fc86819c9c0) at Thread.cpp:380
#7  0x0000000000c60139 in CThread::staticThread (data=0x7fc86819c9c0) at Thread.cpp:206
#8  0x0000000000badca6 in InternalThreadFunc (data=0x7fc8681d6a70) at XThreadUtils.cpp:126
#9  0x00007fc887564877 in ?? () from /usr/lib/libSDL-1.2.so.0
#10 0x00007fc8875a7af9 in ?? () from /usr/lib/libSDL-1.2.so.0
#11 0x00007fc8850603f7 in start_thread () from /lib/libpthread.so.0
#12 0x00007fc885a76b2d in clone () from /lib/libc.so.6
#13 0x0000000000000000 in ?? ()

Repro steps:
- Ubuntu 8.04 AMD64, XBMC branches/linuxport r13213
- Start XBMC and navigate to Music
- Select a directory with MP3 files
- crash

It seems that libid3tag-i486-linux.so is built 32-bit:
Code:
$ objdump -f BUILD/system/libid3tag-i486-linux.so

BUILD/system/libid3tag-i486-linux.so:     file format elf32-i386
architecture: i386, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00005970

$ objdump -f /usr/lib/libid3tag.so.0

/usr/lib/libid3tag.so.0:     file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x0000000000006c60

Are there instructions anywhere on configuring the build to build 64-bit versions of libraries?

Thanks.
Reply
#2
I just checked out branches/linuxport/sources and built libid3tag, then copied the libid3tag.0.3.0.so to XBMC/BUILD/system/libid3tag-x86_64-linux.so, then changed DllLibid3tag.h to load that instead, and that crash is no longer present.

However, when I try to play an MP3, I get a similar crash:
Code:
(gdb) info stack
#0  0x0000000000000000 in ?? ()
#1  0x0000000000b88e5e in DllMadCodec::CreateAudioDecoder (this=0x7faf98072360, p1=32, p2=0x0) at DllMadCodec.h:43
#2  0x0000000000b87dd4 in MP3Codec::Init (this=0x7faf980721f0, strFile=@0x7faf981b7468, filecache=262144) at MP3codec.cpp:99
#3  0x0000000000b7d46e in CAudioDecoder::Create (this=0x7faf9823f260, file=@0x7faf981b73e0, seekOffset=0, nBufferSize=0) at AudioDecoder.cpp:86
#4  0x0000000000b987e9 in PAPlayer::OpenFile (this=0x7faf9823f1b0, file=@0x7faf981b73e0, options=@0x7fffc258a450) at paplayer_linux.cpp:153
#5  0x000000000075e0b5 in CApplication::PlayFile (this=0x13c00a0, item=@0x7faf981b73e0, bRestart=false) at Application.cpp:4897
#6  0x000000000093374e in PLAYLIST::CPlayListPlayer::Play (this=0x13ba7a0, iSong=0, bAutoPlay=false, bPlayPrevious=false) at PlayListPlayer.cpp:214
#7  0x000000000080f266 in CGUIMediaWindow::OnClick (this=0x2029270, iItem=1) at GUIMediaWindow.cpp:732
#8  0x0000000000810ea2 in CGUIMediaWindow::OnMessage (this=0x2029270, message=@0x7fffc258b1e0) at GUIMediaWindow.cpp:197
#9  0x000000000085d7ce in CGUIWindowMusicBase::OnMessage (this=0x2029270, message=@0x7fffc258b1e0) at GUIWindowMusicBase.cpp:242
#10 0x00000000008747a7 in CGUIWindowMusicSongs::OnMessage (this=0x2029270, message=@0x7fffc258b1e0) at GUIWindowMusicSongs.cpp:214
#11 0x0000000000a192ee in CGUIControl::SendWindowMessage (this=0x7faf9811e950, message=@0x7fffc258b1e0) at GUIControl.cpp:245
#12 0x0000000000a0607f in CGUIBaseContainer::OnClick (this=0x7faf9811e950, actionID=7) at GUIBaseContainer.cpp:395
#13 0x0000000000a06d76 in CGUIBaseContainer::OnAction (this=0x7faf9811e950, action=@0x7fffc258b700) at GUIBaseContainer.cpp:125
#14 0x0000000000a3b78c in CGUIListContainer::OnAction (this=0x7faf9811e950, action=@0x7fffc258b700) at GUIListContainer.cpp:195
#15 0x0000000000a75a56 in CGUIWindow::OnAction (this=0x2029270, action=@0x7fffc258b700) at GUIWindow.cpp:496
#16 0x00000000008118aa in CGUIMediaWindow::OnAction (this=0x2029270, action=@0x7fffc258b700) at GUIMediaWindow.cpp:134
#17 0x000000000085d8ca in CGUIWindowMusicBase::OnAction (this=0x2029270, action=@0x7fffc258b700) at GUIWindowMusicBase.cpp:102
#18 0x0000000000a7c524 in CGUIWindowManager::OnAction (this=0x13c20a0, action=@0x7fffc258b700) at GUIWindowManager.cpp:431
#19 0x00000000007610f9 in CApplication::OnAction (this=0x13c00a0, action=@0x7fffc258b700) at Application.cpp:3281
#20 0x00000000007625d8 in CApplication::OnKey (this=0x13c00a0, key=@0x7fffc258b770) at Application.cpp:3248
#21 0x0000000000762f5e in CApplication::ProcessRemote (this=0x13c00a0, frameTime=0.0130000003) at Application.cpp:3969
#22 0x000000000076305d in CApplication::FrameMove (this=0x13c00a0) at Application.cpp:3614
#23 0x00000000009ea017 in CXBApplicationEx::Run (this=0x13c00a0) at XBApplicationEx.cpp:231
#24 0x00000000009edcc3 in main (argc=2, argv=0x7fffc258bce8) at XboxMediaCenter.cpp:93

I tried building MADCodec, but it doesn't want to build:

Code:
g++ -o MADCodec/MadMp3Decoder.o -c MADCodec/MadMp3Decoder.cpp -Ilibmad-0.15.1b -D_LINUX
gcc -shared -o MADCodec-i486-linux.so  MADCodec/MadMp3Decoder.o libmad-0.15.1b/.libs/libmad.a `cat ../../../XBMC/xbmc/cores/DllLoader/exports/wrapper.def` ../../../XBMC/xbmc/cores/DllLoader/exports/wrapper.o
/usr/bin/ld: libmad-0.15.1b/.libs/libmad.a(timer.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
libmad-0.15.1b/.libs/libmad.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [MADCodec-i486-linux.so] Error 1
Reply
#3
I got MADCodec to build by adding -fPIC to CFLAGS in libmad-0.15's Makefile.

I'd be interested in doing these changes up right and submitting patches if someone could fill me in on the 64-bit status and procedures for building libraries in 64-bit.

Thanks.
Reply
#4
I'll look into this.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
If you could submit a patch for your fix for libid3tags that would be great. Otherwise I'm going to have to repeat your work.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Here's a patch for both libid3tag and MADCodec, along with the .so's. I tried uploading it to the Sourceforge tracker three times and it kept dropping the connection.

http://www.megaupload.com/?d=UJIUN6OE
Reply
#7
Thumbs Up 
Thanks jlongstreet
http://wiki.xbmc.org/?title=Appendix_D:_...ment_Notes
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch

jlongstreet Wrote:I tried uploading it to the Sourceforge tracker three times and it kept dropping the connection.
Internet Explorer or Firefox, ...in either care know that SourceForge.net have troubles sometimes and in those cases you just have to wait to try again later.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
Gamester17 Wrote:Thanks jlongstreet
http://wiki.xbmc.org/?title=Appendix_D:_...ment_Notes
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch

Internet Explorer or Firefox, ...in either care know that SourceForge.net have troubles sometimes and in those cases you just have to wait to try again later.

Ok, I got it to work after a few more tries:
http://sourceforge.net/tracker/index.php...tid=581840

The changes I have to make AACCodec and libfaad under dvdplayer work are a little more complicated, though. I'll try to put together a tarball that extracts into /branches/linuxport/sources for the new files and diffs for the modified source, although with directories being added/removed/renamed the SVN merging might be a little problematic.
Reply
#9
Just added to svn in revision 13267. Could you confirm that this is now working?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
I'm pretty sure it's not working. Can you give me the exact commands you issued to build libid3tag-x86_64-linux.so?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#11
Okay, working now.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
libid3tag crash on Ubuntu 8.04 AMD640