Rockbox

Tasklist

FS#9745 - Selecting a .m4a crashes with "Undefined instruction at 40000184 (0)"

Attached to Project: Rockbox
Opened by Alex Bennee (ajb) - Friday, 02 January 2009, 12:32 GMT
Last edited by Björn Stenberg (zagor) - Wednesday, 07 January 2009, 19:56 GMT
Task Type Bugs
Category Codecs
Status Closed
Assigned To No-one
Operating System iPod 5G
Severity Low
Priority Normal
Reported Version Version 3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

While selecting a m4a for playing it crashes. Works on ipod sim build.
This task depends upon

Closed by  Björn Stenberg (zagor)
Wednesday, 07 January 2009, 19:56 GMT
Reason for closing:  Not a Bug
Additional comments about closing:  Mystery solved.
Comment by Alex Bennee (ajb) - Friday, 02 January 2009, 12:46 GMT
Tested and failed on clean Subversion Build: r19641
Comment by Alex Bennee (ajb) - Friday, 02 January 2009, 13:17 GMT
Tested with files from: http://www.rjamorim.com/test/tests/Multiformat128.zip

Sample01/Bartok_strings2_4.m4a: hangs player in WPS
Sample02/Big Yellow2.m4a: crash with Undefined instruction
Comment by Alex Bennee (ajb) - Friday, 02 January 2009, 13:22 GMT
Disabled Cross Fade and get a different crash:

Sample02/Big Yellow4.m4a : Undefined instruction at 40017f24
Comment by Alex Bennee (ajb) - Friday, 02 January 2009, 13:36 GMT
From: http://www.rjamorim.com/test/tests/
This file fails on my actual Rockbox. Slightly different failure mechanism depending on Crossfade settings
Comment by Gareth (Mystic_kitsune) - Friday, 02 January 2009, 14:08 GMT
e250 dosent freeze, it just slows down, and the audio gets choppy
Comment by Seheon Ryu (cpu98) - Saturday, 03 January 2009, 00:10 GMT
Did you build using GCC 4.3.0?
Comment by Alex Bennee (ajb) - Saturday, 03 January 2009, 11:05 GMT
11:04 alex@danny/x86_64 [ipod.build] >~/tools/arm-elf/bin/arm-elf-gcc-4.0.3 --version
arm-elf-gcc-4.0.3 (GCC) 4.0.3
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

IIRC it was built with the rockboxdev build script. Is this a known issue?
Comment by Seheon Ryu (cpu98) - Saturday, 03 January 2009, 16:45 GMT
I'm having similiar problems(Undef instr...) on mpa codec with GCC 4.3.0 after r19612.
Codecs built before that works for me.
Official build works of course.
You may test 19611 and 19612.
rockbox.map may help?
Comment by Alex Bennee (ajb) - Saturday, 03 January 2009, 18:46 GMT
r19611: Crash: Unidentified Instruction at 400164848 (0)
Map attached.
Comment by Alex Bennee (ajb) - Saturday, 03 January 2009, 19:03 GMT
r19661: Crash "Prefetch abort at 41CBCD98 (0)"
Comment by Seheon Ryu (cpu98) - Sunday, 04 January 2009, 07:38 GMT
Oh, sorry that seems not related to my issue.
Mine plays that file without problems.
Comment by Seheon Ryu (cpu98) - Sunday, 04 January 2009, 08:27 GMT
For mpa mapping was ./apps/codecs/mpa.map
for m4a it would be ./apps/codecs/alac.map
I can't interpret that file much.
Comment by Seheon Ryu (cpu98) - Sunday, 04 January 2009, 08:49 GMT
Sorry I though that file was apple lossless.
Codec would be ./apps/codecs/aac.codec
You may replace that file for workaround.
Mapping would be ./apps/codecs/aac.map
I'm not sure how map could help,
but that might let you know where the problem is...
Comment by Magnus Holmgren (learman) - Sunday, 04 January 2009, 12:31 GMT
BigYellow_4.m4a works fine with r19667 (edit: er, I mean r19605 of course ;) on my Sansa e200... Tried with default settings?
I'll check a few more from the test archive, just in case.
Comment by Alex Bennee (ajb) - Wednesday, 07 January 2009, 12:44 GMT
Damn seems to be a compiler toolchain issue. Works with official binaries: r19705
Comment by Alex Bennee (ajb) - Wednesday, 07 January 2009, 16:57 GMT
Comparing my aac.codec with the official build there are only a few bytes difference:

03e806d4 <codec_start>:
3e806d4: e92d4010 push {r4, lr}
3e806d8: e1a04000 mov r4, r0
3e806dc: e59f3068 ldr r3, [pc, #104] ; 3e8074c <codec_start+0x78>
3e806e0: e1a00003 mov r0, r3
3e806e4: e59f1064 ldr r1, [pc, #100] ; 3e80750 <codec_start+0x7c>
3e806e8: e59f2064 ldr r2, [pc, #100] ; 3e80754 <codec_start+0x80>
3e806ec: e0632002 rsb r2, r3, r2
3e806f0: e1a0e00f mov lr, pc
3e806f4: e594f094 ldr pc, [r4, #148]
3e806f8: e59f3058 ldr r3, [pc, #88] ; 3e80758 <codec_start+0x84>
3e806fc: e1a00003 mov r0, r3
3e80700: e3a01000 mov r1, #0 ; 0x0
3e80704: e59f2050 ldr r2, [pc, #80] ; 3e8075c <codec_start+0x88>
3e80708: e0632002 rsb r2, r3, r2
3e8070c: e1a0e00f mov lr, pc
3e80710: e594f090 ldr pc, [r4, #144]
3e80714: e59f3044 ldr r3, [pc, #68] ; 3e80760 <codec_start+0x8c>
3e80718: e1a00003 mov r0, r3
3e8071c: e3a01000 mov r1, #0 ; 0x0
3e80720: e59f203c ldr r2, [pc, #60] ; 3e80764 <codec_start+0x90>
3e80724: e0632002 rsb r2, r3, r2
3e80728: e1a0e00f mov lr, pc
3e8072c: e594f090 ldr pc, [r4, #144]
3e80730: e59f3030 ldr r3, [pc, #48] ; 3e80768 <codec_start+0x94>
3e80734: e5834000 str r4, [r3]
3e80738: ebffffd7 bl 3e8069c <flush_icache>
3e8073c: e59f3028 ldr r3, [pc, #40] ; 3e8076c <codec_start+0x98>
3e80740: e1a0e00f mov lr, pc
3e80744: e12fff13 bx r3
3e80748: e8bd8010 pop {r4, pc}
3e8074c: 4000c000 andmi ip, r0, r0
3e80750: f3ea5ec0 undefined instruction 0xf3ea5ec0
3e80754: 40011818 andmi r1, r1, r8, lsl r8
3e80758: 40011818 andmi r1, r1, r8, lsl r8
3e8075c: 40016818 andmi r6, r1, r8, lsl r8
3e80760: 03ea5ec0 mvneq r5, #3072 ; 0xc00
3e80764: 03ec5f70 mvneq r5, #448 ; 0x1c0
3e80768: 03eadf94 mvneq sp, #592 ; 0x250
3e8076c: 03e800c4 mvneq r0, #196 ; 0xc4
3e80770: e92d4030 push {r4, r5, lr}
3e80774: e1a0c000 mov ip, r0

With the undefined instruction in codec_start.

This leads to two questions:

1. How is this address related to what was actually reported
2. Why does my compiler hate me?
Comment by Alex Bennee (ajb) - Wednesday, 07 January 2009, 19:42 GMT
Mystery solved. I had a Gentoo cross-dev 2.18 binutils in my path which took precedence and b0rked the build
Comment by Alex Bennee (ajb) - Wednesday, 07 January 2009, 19:47 GMT
Testing with binutils 2.19 and it seems to generate a correct codec file with the right constant for plugin_bss_start

Loading...