ts-7000
[Top] [All Lists]

[ts-7000] Application crash after reapplying power to LCD with TS-7260 -

To:
Subject: [ts-7000] Application crash after reapplying power to LCD with TS-7260 - FINALLY SOLVED
From: "geoffveale" <>
Date: Tue, 26 Jun 2007 23:44:05 -0000
Well, the bug is finally dead!!  :)

It seems that I have been over much of my code chasing this bug and
have found a few others along the way, but the bad one kept lurking
until last night until finally exposed. It turned out to be a
character array  that I was using to send strings to the routine that
sends the data to the standard lcd for the TS-7260. I had used much of
the example lcd code provided by Technologic. This code in the
writechar subroutine passes the character to the lcd by indexing a
char pointer.
*padr = *p_buf++;
My BIG mistake was that I had changed the original subroutine so that
it used a pointer to my global char pointer p_buf instead of a pointer
local to the subroutine. This was done so that I could be lazy and not
bother to explicitly name the string I wanted to send to the lcd
because it was the same one every time. This turned very BAD because
every time the writechar routine was called it kept indexing my global
char pointer until it reached the end of the allocated space (took
about 20min of writing to the lcd) then CRASH. 

Well, looking on the bright side this did make me look very hard at my
code and I found some other bugs along the way. It also shows the
potential danger of indexing pointers.

Thanks to all who have provided comments to help find this bug.

Geoff Veale  



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU