Page 1 of 1

App crashes on certain devices.

Posted: Mon Mar 10, 2014 10:33 am
by paulsr
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:

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
I call RunClock from openCard

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   
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

Re: App crashes on certain devices.

Posted: Mon Mar 10, 2014 11:03 am
by LCNeil
Hi Paul,

You are using a DP version of 6.6, so there could be some underlying bugs causing the crashing issue that you are experiencing. LiveCode 6.6. RC1 has been released, so I would recommend trying your stack with this version to see if the issue persists.

If it does so, please try reverting to the most recent stable version of LiveCode (6.5.2) and try testing your application again.

If all of these tests result in a crash, it could be that you have uncovered a potential new bug. If this is the case, please file a report with our Quality Control team who should be able to investigate the issue further.

http://quality.runrev.com

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——

Re: App crashes on certain devices.

Posted: Mon Mar 10, 2014 12:35 pm
by paulsr
Thanks Neil,

I have tried with LC 6.6rc1 and 6.5.2. The same thing happens.

(BTW: On my Mac, runrevinstaller keeps opening, "checking for updates" and then freezes. I've now downloaded 6.6rc1 from the website. On my PC it downloaded and installed fine.)

I'll cut the app back to just that code, rather than that code plus a lot more that is not being executed, and see what happens. If it still crashes I'll submit it as you suggested.

--paul