How to debug exception
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
How to debug exception
I still have a nasty bug which prevents me from releasing my PMP VLC player. After playing a wifi streamed video for about 10-20 minutes I get this:
host0:/> Exception - Bus error (data)
Thread ID - 0x04CC4F6D
Th Name - Decode thread
Module ID - 0x039B9F33
Mod Name - PMP VLC Player 0.0.7
EPC - 0x08B1631C
Cause - 0x0000001C
BadVAddr - 0x0082828A
Status - 0x60008613
zr:0x00000000 at:0x08E40000 v0:0x00000001 v1:0x00000000
a0:0x00000000 a1:0x00000000 a2:0x00000000 a3:0x00000000
t0:0x000FF1B0 t1:0x00000080 t2:0x08BE9EA0 t3:0x08BEA290
t4:0x08BE9E98 t5:0x00001E04 t6:0x08901694 t7:0x00008600
s0:0x00000000 s1:0x091671B8 s2:0x00001096 s3:0x00000001
s4:0x091660D0 s5:0x00005DB8 s6:0x091660C0 s7:0x00000016
t8:0x00000001 t9:0x089A5CA8 k0:0x088E7F00 k1:0x00000000
gp:0x08BF2540 sp:0x088E7560 fp:0x09167040 ra:0x089A5694
reset
Resetting psplink
I can't do much with it. Does anyone know how to debug it? And does the error report give any clues? (apart from that the error occurs in the decode thread)
host0:/> Exception - Bus error (data)
Thread ID - 0x04CC4F6D
Th Name - Decode thread
Module ID - 0x039B9F33
Mod Name - PMP VLC Player 0.0.7
EPC - 0x08B1631C
Cause - 0x0000001C
BadVAddr - 0x0082828A
Status - 0x60008613
zr:0x00000000 at:0x08E40000 v0:0x00000001 v1:0x00000000
a0:0x00000000 a1:0x00000000 a2:0x00000000 a3:0x00000000
t0:0x000FF1B0 t1:0x00000080 t2:0x08BE9EA0 t3:0x08BEA290
t4:0x08BE9E98 t5:0x00001E04 t6:0x08901694 t7:0x00008600
s0:0x00000000 s1:0x091671B8 s2:0x00001096 s3:0x00000001
s4:0x091660D0 s5:0x00005DB8 s6:0x091660C0 s7:0x00000016
t8:0x00000001 t9:0x089A5CA8 k0:0x088E7F00 k1:0x00000000
gp:0x08BF2540 sp:0x088E7560 fp:0x09167040 ra:0x089A5694
reset
Resetting psplink
I can't do much with it. Does anyone know how to debug it? And does the error report give any clues? (apart from that the error occurs in the decode thread)
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
It's compiled with -g, but I only get
Am I missing something?
PS: JiniCho had a similar problem, see http://forums.ps2dev.org/viewtopic.php? ... =addr2line
Unfortunately I can't apply the solution given there
Code: Select all
$ psp-addr2line -e PMPVLC007.elf 0x0082828A
??:0
PS: JiniCho had a similar problem, see http://forums.ps2dev.org/viewtopic.php? ... =addr2line
Unfortunately I can't apply the solution given there
Maybe the error occurs inside one of the libs (most likely libavcodec, since the thread in question is the Decode thread), but if this lib isn't compiled with the -g switch, line information for the code there won't be available.
Look out for misaligned data accesses like groepaz said, or also for unallocated mem accesses inside the decoding thread. I'm not sure what you changed from the original source, but unless you completely rewrote it, you should be able to find it by searching your additions.
Look out for misaligned data accesses like groepaz said, or also for unallocated mem accesses inside the decoding thread. I'm not sure what you changed from the original source, but unless you completely rewrote it, you should be able to find it by searching your additions.
also try 0x8082828A instead of 0x0082828A. and yes, if the crash is in a lib that has been compiled without -g, you wont get a lot of useful info :)
err that said, isnt 0x0082828A a kernel address ? :=P (so you are passing bad arguments to some kernel routine) try passing the address in RA to addr2line, it will give you a hint from where that bad call was done.
edit: bla, i'm confused. :=D
EPC - 0x08B1631C
thats the address you want to use. and badvaddr=0x0082828A pretty much shows the problem too, i bet you are trying to load a 32bit value from a non 32bit aligned address :=) (0x0082828A is not 32bit aligned)
err that said, isnt 0x0082828A a kernel address ? :=P (so you are passing bad arguments to some kernel routine) try passing the address in RA to addr2line, it will give you a hint from where that bad call was done.
edit: bla, i'm confused. :=D
EPC - 0x08B1631C
thats the address you want to use. and badvaddr=0x0082828A pretty much shows the problem too, i bet you are trying to load a 32bit value from a non 32bit aligned address :=) (0x0082828A is not 32bit aligned)
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
Yep this looks better :)groepaz wrote:EPC - 0x08B1631C
thats the address you want to use. and badvaddr=0x0082828A pretty much shows the problem too, i bet you are trying to load a 32bit value from a non 32bit aligned address :=) (0x0082828A is not 32bit aligned)
Code: Select all
$ psp-addr2line -f -e PMPVLC007_JockyW.elf 0x08B1631C
memset
../../../../../../newlib/libc/machine/mips/memset.c:118
Thx a lot guys!
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
Bingo!groepaz wrote:like i said, the value in RA should lead you to the line where memset was called (the line after that to be exact)
Code: Select all
$ psp-addr2line -f -e PMPVLC007_JockyW.elf 0x089A5694
ogg_read_page
/home/KP/projects/PMPVLC007/libavformat/ogg2.c:293
Cool Groepaz, thanks a lot for your help!!!
Maybe I can now watch a full worldchampionship soccer game on my psp :)
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
- daurnimator
- Posts: 38
- Joined: Sun Dec 11, 2005 8:36 pm
- Location: melbourne, australia
i debug another way
and find in prog.s by addres a mistake....
Code: Select all
psp-objdump -S prog.elf >> prog.s
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm