Help Debugging Ja2 Straciatella


quartercast

Well-Known Member
Joined
Feb 13, 2007
Messages
1,551
Hi guys,

As mentioned in General I've built a binary of my favourite game using bollocks method on my Pandora (running Stuckie's debian). It works on debian, now I'm trying to create a PND within debian (using genpxml, pnd_make etc).

So far I've generated a bare-bones PXML file and launching script, both edited to include (hopefully) the right data. pnd_make.sh successfully wrapped the exe, libs, and scripts into a PND which I've hosted below.

Dropbox link

Copying this over to Angstrom, its shows up in the menu on XFCE, but appears to quit out after running. Using pnd_run gives the same result.
I then had a look at the unpacked files at /mnt/utmp/ja2strac-qcast/, all the libs and scripts and exe appear to be there. Running the launcher script (bash script/ja2.sh) gives a segfault.

That's where I'm up to so far. I want to debug the exe, maybe add the line "gdb ./ja2" to the launcher script but I'm having trouble editing/chmodding/chowning files in the entire /mnt/utmp/ja2strac-qcast/ dir, it says "Operation Denied" even if I sudo or sudo bash.

Any tips here?

Thanks,
QC
 
Last edited by a moderator:
quartercast said:
Any tips here?
1) activate ssh
2) connect to your pandora,
3) use :
Code:
export DISPLAY=:0
/usr/pandora/scripts/pnd_run.sh -m -b "ja2strac-qcast" -p "/path/to/ja2.pnd" #mount the PND
cd /mnt/utmp/ja2strac-qcast
gdb ./ja2

/usr/pandora/scripts/pnd_run.sh -u -b "ja2strac-qcast" -p "/path/to/ja2.pnd" #umount the PND

On an other note, Do you have copied the data to your appdata directory ? when I checked, the data was over 100M (so not in the PND...)

What does show /tmp/pndrun_ja2strac-qcast.log ?
 
Last edited by a moderator:
Looks like one or more of the debian libs that you've included which override the Pandora's aren't compatible.

Just checked, deleting libdl and libc allows it to run. Also I don't think you need ld_linux, librt & libm (it didn't complain when I deleted them).

However there's no data in .ja2/data/ (it's empty) and .ja2/ja2.ini contains the line: data_dir = /some/place/where/the/data/is

You can't change the permissions or edit the files that are in the PND - they are read-only. You can create new files in that dir - they will actually be written to /media/NameOfSDCard/pandora/appdata/ja2strac-qcast/

Edit:
I can't help much more than that - just checked the website and found it needs the original data and I don't have the game.
 
Thanks for the quick replies sebt3 and paeryn! I have the data (can't be included in the PND for legal reasons), but I haven't been able to generate the ini file pointing to the data yet (due to segfault). I will try testing these solutions when I get home this evening.

@paeryn: does the executable successfully create ./ja2/ja2.ini in the appdata/ja2strac-qcast dir? I think we're cooking with gas here :) :)

Ahh, now I understand more about permissions... to tell you the truth, I even tried rm -rf /mnt/utmp/ja2strac-qcast/ (don't tell anyone I did that!)

@sebt3: thanks for the debug info, I learn so much from you man :)
 
@paeryn: Unfortunately I'm still having the same issue. I've made a pnd file with libc and libdl removed, I still get a segfault. I also get a segfault with the other libs you mentioned removed. Is it because I don't have dev libs installed on angstrom?

@sebt3: This is what's in the log file below. I'll have to learn how to ssh to my pandora from Mac OS X :)

Code:
sudo /usr/pandora/scripts/pnd_run.sh -m -p .///ja2.pnd -e scripts/ja2.sh -b ja2strac-qcast
not mounted on loop yet, doing so
LoopMountedon: 
/dev/loop4
Filetype is Squashfs
Mounting PND (mount -t squashfs) :
/dev/loop4 on /mnt/pnd/ja2strac-qcast type squashfs (ro)
Filesystem is vfat
Mounting the Union FS using /media/DATA/pandora/appdata/ja2strac-qcast as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/DATA/pandora/appdata/ja2strac-qcast=rw+nolwh:/mnt/pnd/ja2strac-qcast=rr none /mnt/utmp/ja2strac-qcast
none on /mnt/utmp/ja2strac-qcast type aufs (rw,si=6c848237,noplink)
none on /mnt/utmp/ja2strac-qcast type aufs (rw,si=6c848237,noplink)
[------------------------------]{ App start }[---------------------------------]
/usr/pandora/scripts/pnd_run.sh: line 24:  6659 Segmentation fault      "./$EXENAME" $ARGUMENTS
[-------------------------------]{ App end }[----------------------------------]
cleanup done

Edit: Oops, I think I made ja2.sh non-executable by mistake... let me try that again...

Edit 2: Ah hah! I have successful ja2.ini creation :) I had to delete every included lib except the libdirects libfusion and libstc++
 
Back
Top