app crashing

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: app crashing

Post by teacherguy » Fri Jan 17, 2014 12:47 am

Ender,

Already I've discovered that the background image I am using on my results card (which shows after every round) was over 750k! Using the link you provided reduced the file size by 75%.

Thank you.... somehow it never occurred to me that a static image would be an issue...silly I know.

Off to test................

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: app crashing

Post by jacque » Fri Jan 17, 2014 10:37 pm

I agree with Ender that it's probably the images.I had a stack that crashed LC regularly. It was behaving fine in earlier versions but when they introduced image caching it blew up reliably. The new image caching scheme allows images to load really fast, but the flip side is that it stores copies of all the images that have been viewed in RAM. I had hundreds of images stored in a hidden background group which I was using as a resource pool, and even though they weren't visible, the engine was dutifully loading every last one into RAM when the background opened. After only a few minutes, the whole IDE went down in flames. I fixed it by unplacing the group, so that the caching wouldn't happen.

If all your images are visible on the card, which is likely the case, then using an unplaced group won't work. But you can control the size of the image cache by setting the imageCacheLimit (see the dictionary.) On mobile devices the default is 64 megs, but that may be more than your app can accomodate.

I don't think sounds are as big an issue. Those are streamed, and shouldn't use much RAM at any given moment. When not in use they don't use any resources at all.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: app crashing

Post by teacherguy » Sat Jan 18, 2014 12:00 am

Ender, life has been great since I downsized that graphic, thanks again.

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: app crashing

Post by endernafi » Sat Jan 18, 2014 12:09 am

So, your app doesn't crash now, right?
Well, it's excellent news 8)

Cheers,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: app crashing

Post by teacherguy » Sat Jan 18, 2014 1:18 am

Not yet it doesn't! I played it for a long time and gave up, lol.

But really I should settle in and play it for a longer period of time, just to be sure.

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: app crashing

Post by teacherguy » Sun Jan 26, 2014 9:16 pm

ZERO crashes since I reduced that graphic. Thanks again.

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: app crashing

Post by endernafi » Mon Jan 27, 2014 4:43 am

So, it's time to quote myself:
endernafi wrote:Well, it's excellent news 8)
Best,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Post Reply