New GPSapp 0.15 hosed?

Posted by: tfabris

New GPSapp 0.15 hosed? - 27/01/2003 22:02

I copied the file "gpsapp" to the location that was already there using derrick's version of the file, tagged it as executable, and here's what happens when I try to run it:

    gpsapp(11): memory violation at pc=0x400a0ae8, lr=0x00000006 (bad address=0x0000
    0000, code 0)
    pc : [<400a0ae8>] lr : [<00000006>]
    sp : bffffc00 ip : 00000000 fp : bffffc0c
    r10: 00000000 r9 : 0200b090 r8 : 00000000
    r7 : bffffc61 r6 : 0201389c r5 : 00000018 r4 : 020138a4
    r3 : 00000064 r2 : 00000018 r1 : bffffc63 r0 : 00000000
    Flags: nzCv IRQs on FIQs on Mode USER_32 Segment user
    Control: D020517D Table: D020517D DAC: 00000015
    Function entered at [<400a0ac4>] from [<0200aa74>]
    Function entered at [<0200a9a0>] from [<02001918>]
    r10 = 4012C128 r9 = 02001AA4 r8 = 0200AF10 r7 = BFFFFEE4
    r6 = 00000004 r5 = BFFFFC50 r4 = BFFFFC4C
    Function entered at [<020018a0>] from [<02001b00>]
    r6 = 00000000 r5 = 00000001 r4 = BFFFFE00
    Function entered at [<02001aa4>] from [<40064040>]
    r10 = 4012C128 r9 = 02001AA4 r8 = 0200AF10 r7 = 02000C04
    r6 = 4000C2A8 r5 = 00000001 r4 = BFFFFEE4
    Function entered at [<40063ee4>] from [<02001000>]
    r10 = 4001D858 r9 = 00000000 r8 = 00000000 r7 = 00000000
    r6 = 02000FDC r5 = 00000000 r4 = 4001E5EC
    hijack_exec("/drive0/var/gpsapp/gpsapp"), rc=0 (okay)
    hijack_exec("/drive0/var/empacman/empacman"), rc=0 (okay)
    empacman running as pid 13


What have I done wrong?
Posted by: oliver

Re: New GPSapp 0.15 hosed? - 27/01/2003 22:08

The only time i had an issue with a program giving a memory error, genixia told me to...
[Startup]
reservecache=2
so... i guess... give that a try...
Posted by: genixia

Re: New GPSapp 0.15 hosed? - 27/01/2003 22:09


What have I done wrong?


Probably nothing. GPSapp has seg-faulted on you and dumped a stack trace.
It looks like somewhere along the way GPSapp has attempted to access memory that it doesn't own, and has been offically neutralised.
This sort of error is often caused by a bad or uninitialised pointer in the code.
Posted by: jaharkes

Re: New GPSapp 0.15 hosed? - 27/01/2003 22:16

It looks like I misapplied a patch. I checked the addresses against a non-stripped version of gpsapp and it pointed at the following bug.

if (!strcmp(match, "routedir")) {
int sz = (eof-(f+1)); /* reserve \0 */
serport=(char *)malloc(sz);
^^^^^^^
strncpy(routedir, (char *)f+1, sz); /* maybe no \0 */
routedir[sz] = '\0';

Hmm, wonder how I managed to let that bad allocation slip through. New version will be out in about 5 minutes...
Posted by: Daria

Re: New GPSapp 0.15 hosed? - 27/01/2003 22:25

Cool, this time it's not my fault
Posted by: jaharkes

Re: New GPSapp 0.15 hosed? - 27/01/2003 22:34

It took a bit more than 5 minutes, because I managed to hose the anonymous CVS repository when I was rsyncing the updates to my desktop. However everything is back to normal now and the new version is available.
Posted by: tfabris

Re: New GPSapp 0.15 hosed? - 28/01/2003 09:36

You da man!

0.16 works great, thanks!