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]; //global variable
bool ok; //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,")");
//* 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!)
//*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/