Hi there,
After compiling the Snes9x GX source with the latest libfreetype the application throws an error when started.
The compilation itself seems to go well without any error.
A really old libfreetype from 2010 is used to prevent the error and let the application start, which is just a workaround.
Because this is a long standing issue and we want to use the lastest tools and the issue resolved, there is a need of advice how to approach this error. I saw another post on this forum to add -lbz2, and the -lbz2 was added after libfreetype:
Old:
LIBS := -ldi -liso9660 -lpng -lmxml `freetype-config --libs` \
-lfat -lwiiuse -lz -lbte -lasnd -logc -lvorbisidec -logg -ltinysmb
New:
LIBS := -ldi -liso9660 -lpng -lmxml `freetype-config --libs` \
-lbz2 -lfat -lwiiuse -lz -lbte -lasnd -logc -lvorbisidec -logg -ltinysmb
Error:
Exception (DSI) occurred!
GPR00 808E50E0 GPR08 00006C30 GPR16 9015C368 GPR24 00000010
GPR01 807A52D0 GPR09 00000000 GPR17 9014E700 GPR25 00000030
GPR02 804B8FC0 GPR10 808B6360 GPR18 00000004 GPR26 807A5320
GPR03 807AC754 GPR11 808B6350 GPR19 00000002 GPR27 80762D5C
GPR04 00000000 GPR12 00000019 GPR20 00000001 GPR28 00000000
GPR05 000D12C6 GPR13 805354A0 GPR21 0000000D GPR29 80762D4C
GPR06 808B6338 GPR14 80730030 GPR22 0000000E GPR30 808B6348
GPR07 00000076 GPR15 80530000 GPR23 00000000 GPR31 808D5810
LR 8023AD40 SRR0 8024b984 SRR1 00001032 MSR 00001000
DAR 00006C3C DSISR 06000000
STACK DUMP:
8024b984 --> 8023ad40 --> 8023f7a0 --> 802456e4 -->
80005118 --> 802470d0 --> 8026106c --> 8025bcc8 -->
8000469c
CODE DUMP:
8024b984: 9148000C 810B0008 910A00008 48000090
8024b984: 39400000 2C090000 41820010 7D4000A6
8024b984: 614A8000 7D400124 38600000 4E800020
Reloading in 8 seconds
Reload
Thanks in advance.
Need some advice compiling with libfreetype
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Need some advice compiling with libfreetype
Adding -lbz2 is a bit pointless when you're already using freetype-config and probably not that relevant.
Using an old library without the corresponding headers isn't the best of ideas either. I guess you've been fortunate with this in that it works.
In the error screen SRR0 holds the address where the DSI exception happened. LR is usually the previous function aand the stack dump section is a list of function addresses from the stack frames - the equivalent of gdb's backtrace.
You can find out what all of these are using addr2line
Which should give you a hint as to where to start looking for the issue. Given that the fault address (SRR0) and the address in the first stack frame (0x8024b984) are both the same my first instinct would be that it's a stack overrun. Find out what it's failing on first though.
Code: Select all
$ /opt/devkitpro/portlibs/ppc/bin/freetype-config --libs
-L/opt/devkitpro/portlibs/ppc/lib -lfreetype -lbz2 -lpng16 -lz -lm -lz
$
In the error screen SRR0 holds the address where the DSI exception happened. LR is usually the previous function aand the stack dump section is a list of function addresses from the stack frames - the equivalent of gdb's backtrace.
You can find out what all of these are using addr2line
Code: Select all
powerpc-eabi-addr2line -e <your elf file> 0x<address>
Re: Need some advice compiling with libfreetype
Thank you for pointing me in the right direction.
I will try as suggested and let you know when I have some more information.
I will try as suggested and let you know when I have some more information.
Re: Need some advice compiling with libfreetype
Sorry, I didn't find the time to look into it further, but I did.
I attached the results of the LR, SRR0 and Stack Dump.
The problem seems to be there when the Wiimote is connected so I think a function to define the Wiimote is not used correctly in the Snes9x GX code, but I'm not sure.
I attached the results of the LR, SRR0 and Stack Dump.
The problem seems to be there when the Wiimote is connected so I think a function to define the Wiimote is not used correctly in the Snes9x GX code, but I'm not sure.
- Attachments
-
- Stack_Dump.txt
- Stack Dump
- (1.81 KiB) Downloaded 452 times
Re: Need some advice compiling with libfreetype
This has been a long-standing issue ever since the latest portlib build of libfreetype was posted. With your freetype build, this issue happens. I never tracked it down, other than that if I use an older freetype or my own compile of freetype, everything works fine. If i use the portlib one, I get this crash in wiiuse consistently as soon as the wiimote is connected.
Another user suggested compiling without png and bz2 support might help.
Here's the thread where this was recently discussed:
https://github.com/dborth/snes9xgx/pull/929
Another user suggested compiling without png and bz2 support might help.
Here's the thread where this was recently discussed:
https://github.com/dborth/snes9xgx/pull/929
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Need some advice compiling with libfreetype
Thanks for stopping by Tantric, much appreciated.
Could you possibly chuck me the config.log from your own freetype build? It is the same version, right?
Could you possibly chuck me the config.log from your own freetype build? It is the same version, right?
Re: Need some advice compiling with libfreetype
I haven't compiled this thing in eons. I dusted off my cross-compiling environment and compiled 2.9.1, and linked against that, and found the exact same wiiuse crash as soon as you connect the wiimote.
So...there's something about 2.9 that doesn't work for us.
So...there's something about 2.9 that doesn't work for us.
Who is online
Users browsing this forum: No registered users and 1 guest