iOS Crash due to Memory Pressure?

Get help using Construct 2

Post » Thu Jun 05, 2014 8:35 pm

Hey guys,

My iOS game keeps crashing mid-way while accessing cocoonjs (kinda slow) for in-app purchasing
(bug: "Terminated due to memory pressure" on xcode)

Just wondering how many objects the iOS can handle?
My layout has around 360 objects (including text/sprites) total

Also, are transparent sprites on "additive" bad for performance?

Thanks!!!
B
18
S
6
G
1
Posts: 79
Reputation: 2,447

Post » Tue Oct 14, 2014 1:40 am

Hello @avatar86 ! Did you solve this question?
Thanks!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Tue Oct 14, 2014 12:38 pm

CocoonJS does not support memory management. This is partly why CocoonJS is no longer officially supported.

Export to PhoneGap or Ejecta for lower memory use.
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

Post » Tue Oct 14, 2014 1:03 pm

Hi @Ashley I have this problem using Ejecta. I even tried its latest version. The exported files are making a total of 130MB.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Tue Oct 14, 2014 1:16 pm

Update: it is working on the emulator but not on ipad or iphone (ipad-mini 1st version and iphone 4s).
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Tue Oct 14, 2014 1:54 pm

Here's my profile graphs while using iPad-mini 1st gen. for tests:
memory_test.png


The spike at the end is when a new scene is loaded (physics and collision present) and crashes.

And below is the test using the simulator. The simulator won't crash, but you can see an increase of system load. Notice, the lower gap in the graphs are due to a second scene with just a few resource.

memory_test_simulator.png
You do not have the required permissions to view the files attached to this post.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Tue Oct 14, 2014 3:03 pm

'Physical memory used' is 7 GB? That's clearly a memory leak. Are you sure your project is not creating objects/particles infinitely? Can you reproduce the problem in a minimal new project?
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 7 guests