App crashes on certain devices.
Posted: Mon Mar 10, 2014 10:33 am
Greetings:
I'm really hoping someone can help me debug a piece of code which only fails when run on certain devices.
I've commented out chunks of the app which are not relevant, leaving just a display of a digital clock, showing hh:mm:ss
The code is as follows:
I call RunClock from openCard
Not sure if this is relevant, but in preOpenStack I have:
This code works fine(*) on iPhone 4S & 5S, all iPad and iPhone simulators, all Android simulators, and my MacMini with Mavericks.
But it crashes(**) on real iPads - retina, non-retina, and retina iPad Mini; and on my PC with 'doze XP.
(*) "works fine" means it will run for hours. Some tests have been more than 24 hours.
(**) "crashes" means the app just disappears. I have an errorDialog routine in the stack script, but it doesn't report anything. The length of time the app will run is dependent on the number of milliseconds in the send "RunClock" to me statement. If 100ms, as above, the app runs abt 6 mins. If 250ms, it runs about 10 mins. On my PC it crashes after only a few seconds.
I'm using LC 6.6(dp.1) on Mac.
I'm out of ideas. Can anyone help/advise please...
--paul
I'm really hoping someone can help me debug a piece of code which only fails when run on certain devices.
I've commented out chunks of the app which are not relevant, leaving just a display of a digital clock, showing hh:mm:ss
The code is as follows:
Code: Select all
command RunClock
lock screen
put the long time into tTime
convert tTime to seconds
add gTimeAdj to tTime
convert tTime to long time
replace ":" with " " in tTime
put character 1 of word 1 of tTime into fld "LblCLKd5"
put character 2 of word 1 of tTime into fld "LblCLKd4"
put character 1 of word 2 of tTime into fld "LblCLKd3"
put character 2 of word 2 of tTime into fld "LblCLKd2"
put character 1 of word 3 of tTime into fld "LblCLKd1"
put character 2 of word 3 of tTime into fld "LblCLKd0"
unlock screen
if "RunClock" is not in the pendingmessages then
send "RunClock" to me in 100 milliseconds
put the result into the_clock_message_id
end if
end RunClock
Not sure if this is relevant, but in preOpenStack I have:
Code: Select all
set the acceleratedRendering of this stack to true
if the environment is "mobile" then
set the fullscreenmode of this stack to "letterbox"
if the platform is iphone then
iphoneSetRedrawInterval 1
iphoneUseDeviceResolution true, true
end if
end if
But it crashes(**) on real iPads - retina, non-retina, and retina iPad Mini; and on my PC with 'doze XP.
(*) "works fine" means it will run for hours. Some tests have been more than 24 hours.
(**) "crashes" means the app just disappears. I have an errorDialog routine in the stack script, but it doesn't report anything. The length of time the app will run is dependent on the number of milliseconds in the send "RunClock" to me statement. If 100ms, as above, the app runs abt 6 mins. If 250ms, it runs about 10 mins. On my PC it crashes after only a few seconds.
I'm using LC 6.6(dp.1) on Mac.
I'm out of ideas. Can anyone help/advise please...
--paul