Bus error loading a prx

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
punto
Posts: 7
Joined: Thu Oct 29, 2009 7:47 pm

Bus error loading a prx

Post by punto »

Hi.. I'm getting an "Bus error" when I try to load a prx using psplinkusb, but it looks like it's happening before anything is loaded.. Even running "debug binary.prx" on the shell gives me this, before the server can start

Code: Select all

Exception - Bus error (data)
Thread ID - 0x0091911B
Th Name   - SceKernelModmgrWorker
Module ID - 0x0029D945
Mod Name  - sceLoaderCore
EPC       - 0x880173F8
Cause     - 0x1000001C
BadVAddr  - 0x58642408
Status    - 0x00088603
zr:0x00000000 at:0x88020000 v0:0x00000000 v1:0x00000001
a0:0x882003DC a1:0x0072FEB4 a2:0x0072FF68 a3:0x6F880FD0
t0:0x80020000 t1:0x00000001 t2:0x00000000 t3:0x00300000
t4:0x00000000 t5:0x00000001 t6:0x88300000 t7:0x00300000
s0:0x00000000 s1:0x00000000 s2:0x882FA660 s3:0xDEADBEEF
s4:0x882003DC s5:0xDEADBEEF s6:0x008E0D70 s7:0x00000000
t8:0x00000000 t9:0x88300000 k0:0x00000000 k1:0x00000000
gp:0x8806C120 sp:0x882FA330 fp:0x00000001 ra:0x880617AC
0x880173F8: 0x94A2000A '....' - lhu        $v0, 10($a1)
how do I debug it? the psplink manual lists a bunch of commands I can use, but the shell is completely dead after I get this, so I can't do anything.

thanks
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

Do you have some plugins running in the background.
Sometimes a plugin can interfere with psplink.

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
punto
Posts: 7
Joined: Thu Oct 29, 2009 7:47 pm

Post by punto »

I don't think so.. I'm just running psplink from the normal psp menu, there's nothing else running as far as I know..
psPea
Posts: 60
Joined: Sat Sep 01, 2007 12:51 pm

Post by psPea »

>but the shell is completely dead after I get this

yeah that happens when an exception occurs in your module_start

lhu $v0, 10($a1)
a1:0x0072FEB4-not a valid memory address
punto
Posts: 7
Joined: Thu Oct 29, 2009 7:47 pm

Post by punto »

psPea wrote:your module_start
what does that mean? I only have a main(), I don't define module_start.. isn't that what calls my main()? how did I manage to crash that?
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

It can happen when you do some weird allocation or something with ram. I got something similar when i completely messed up my pointers and ram.

You are new here. Are you a beginner or are you more experienced.

(I know how to solve some problems but not when it's about kernel mode or coding hacking tools. just user mode)

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
punto
Posts: 7
Joined: Thu Oct 29, 2009 7:47 pm

Post by punto »

ok, I found out the problem, I was using psp-strip on my .elf before psp-fixup-imports and psp-prxgen, apparently it doesn't like that.
Post Reply