Just a guess, but since temp_txt is local, and you say you can only get it
to happen after a certain series of events, perhaps you're munging your
stack somewhere before this call? If Gremlins can produce it, I'd run the
app in the debugger, then start Gremlins loose, then when it crahses, verify
that temp_txt is valid.

Michal Seliga <[EMAIL PROTECTED]> wrote in message
news:36917@palm-dev-forum...
>
> Yes it's me who started previous thread about this theme...
>
> CodeWarrior r6, Handspring Visor with PalmOS3.1, Visor's ROM used in
emulator. It is not interesting if it happens on 3.5 or not, our customer
has Visors only)
>
> Now I use this code
>
>    #define SYNCHROFAIL "Something crashed :-(  (SQL error message: "
>    char temp_txt[256]; file://global variable
>    bool ok;  file://local variable
>
>    some ultralite stuff (synchronization).
>    returns with ok set to true/false (true if synchronisation went well)
>
>     if(ok==false)
>     {
>       StrCopy(temp_txt,SYNCHROFAIL);
>       StrIToA(temp_txt+StrLen(SYNCHROFAIL),sql_code);
>       StrCat(temp_txt,")");
>       file://* breakpoint
>       // now debugger shows that temp_txt is filled well, the string
contains valid chars and is zero-terminated.
>       // It is too long to fit one line, but that doesn't matter, shorter
text would not help (tested)
>       FrmCustomAlert(UniversalAlert,temp_txt," "," ");   // note, there
are " ", no "" (space inside!)
>      file://*breakpoint - but I will not get here
>    }
>
>
> UniversalAlert is defined using Constructor, it contains text ^1 (and
nothing more)
>
> It CRASH badly. Not everytime, but Gremlins can produce this error quite
often and I found this happens when I press buttons very fast...
> Emulator reports each run different error (illegal operation, reading from
0, reading from bad adress....) and when I press debug it throws me to the
part of
> code which is surely somewhere else (sometimes), or reports next error
about trying to set the program counter to invalid adress (nearly everytime)
>
> When I comment out FrmCustomAlerts everything works just fine.
> Same bug happens on other places of code too (but it is much harder to
invoke)
>
> Looks to me like stack crash. Any ideas how to solve it? (I don't like the
idea of writing my own FrmCustomAlert clone and change it in all my
code...(~1MB of
> sources not including Ultralite stuff).
>
> help if possible... thanks.
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to