CocoonJS game crashes????

Get help using Construct 2

Post » Thu Jul 24, 2014 1:45 pm

Hi guys,

I compiled my game with CocoonJS and it seems fine. The problem is that it crashes time from time to time. Sometimes after 7min sometimes after 30min. I have 30 levels and there is not one level that always crashes, it seems to random.

Is CocoonJS my problem or is it something. Help would be great!

results debug mode:
frames 53 to 60 (18 to 21 ms/frame)
Collisions check: 3000 to 21000 ( 223-350 per tick)
Poly Collision: 200 to 1700 (4 to 40 per tick)
cpu about 19%

(first time using debug, so no clue if these are good or not)

Thanks!
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Thu Jul 24, 2014 1:56 pm

ddaan9 wrote:Hi guys,

I compiled my game with CocoonJS and it seems fine. The problem is that it crashes time from time to time. Sometimes after 7min sometimes after 30min. I have 30 levels and there is not one level that always crashes, it seems to random.

Is CocoonJS my problem or is it something. Help would be great!

results debug mode:
frames 53 to 60 (18 to 21 ms/frame)
Collisions check: 3000 to 21000 ( 223-350 per tick)
Poly Collision: 200 to 1700 (4 to 40 per tick)
cpu about 19%

(first time using debug, so no clue if these are good or not)

Thanks!

Please, provide a capx, the debug doesn't make any sense, i think you need to check your events, look for any mismatches. And i hear there were some problems with samsung galaxy tab devices, and galaxy s3, if you use them, read cocoonjs faq to know how to fix the crashes. Or maybe your project just uses a lot of RAM, and it's crashed because of this.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 2:06 pm

Sisyphus wrote:
ddaan9 wrote:Hi guys,

I compiled my game with CocoonJS and it seems fine. The problem is that it crashes time from time to time. Sometimes after 7min sometimes after 30min. I have 30 levels and there is not one level that always crashes, it seems to random.

Is CocoonJS my problem or is it something. Help would be great!

results debug mode:
frames 53 to 60 (18 to 21 ms/frame)
Collisions check: 3000 to 21000 ( 223-350 per tick)
Poly Collision: 200 to 1700 (4 to 40 per tick)
cpu about 19%

(first time using debug, so no clue if these are good or not)

Thanks!

Please, provide a capx, the debug doesn't make any sense, i think you need to check your events, look for any mismatches. And i hear there were some problems with samsung galaxy tab devices, and galaxy s3, if you use them, read cocoonjs faq to know how to fix the crashes. Or maybe your project just uses a lot of RAM, and it's crashed because of this.

thanks for the reply, can't give capx it is on my pc.

I tried it with nexus 5 and galaxy tab 2. Because the nexus 5 has 2gb RAM it is safe to say RAM isn't the problem.
What is weird about the debug? The big difference between values? Because the game spawns enemies so that is why there is a big gap between collision check, etc. At least one enemy and at most 25. Cocoonjs faq didn't give me answer...
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Thu Jul 24, 2014 2:17 pm

ddaan9 wrote:thanks for the reply, can't give capx it is on my pc.

I tried it with nexus 5 and galaxy tab 2. Because the nexus 5 has 2gb RAM it is safe to say RAM isn't the problem.
What is weird about the debug? The big difference between values? Because the game spawns enemies so that is why there is a big gap between collision check, etc. At least one enemy and at most 25. Cocoonjs faq didn't give me answer...

Oh, sorry i didn't seen for first time, you got 21000 collision checks per second!? That's really a lot, maybe this can cause a crash. Can you tell your object count? Too many objects can cause a crash too. But i think checking for 21000 collisions every second is causing the crash, when your device is getting crazy of it :lol:
And yeah, in cjs 2.0.1 and earlier was a sigill bug or something like that, just use 2.0.2 and everything will be ok on you tab 2.
Last edited by Sisyphus on Thu Jul 24, 2014 2:31 pm, edited 1 time in total.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 2:30 pm

Sisyphus wrote:
ddaan9 wrote:thanks for the reply, can't give capx it is on my pc.

I tried it with nexus 5 and galaxy tab 2. Because the nexus 5 has 2gb RAM it is safe to say RAM isn't the problem.
What is weird about the debug? The big difference between values? Because the game spawns enemies so that is why there is a big gap between collision check, etc. At least one enemy and at most 25. Cocoonjs faq didn't give me answer...

The debug is ok, nothing weird in it, i don't see anything strange, but i can't help much if i dont see a capx. Maybe garbage collector is broken and too much spawns/deletes of enemies causing the crash. Or maybe something in your project causing a memory leak, if so you need to show your capx to ashley, in bugs forum.

UPD: Oh, sorry i didn't seen for first time, you got 21000 collision checks per second!? That's really a lot, maybe this can cause a crash.


Ok, but i was searching the forum and a lot of people had way more collision checks than me and still didn't had problems. Maybe it is Cocoonjs and i have to try another one. It's a shame because my fps is like 50% better than with other ones.....

Thanks for your input anyway! If someone else gets the problem, don't hesitate to reply :D
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Thu Jul 24, 2014 2:42 pm

ddaan9 wrote:Ok, but i was searching the forum and a lot of people had way more collision checks than me and still didn't had problems. Maybe it is Cocoonjs and i have to try another one. It's a shame because my fps is like 50% better than with other ones.....

Thanks for your input anyway! If someone else gets the problem, don't hesitate to reply :D

Did you try your game on mobile browser? Default or chrome?
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 2:45 pm

Sisyphus wrote:
ddaan9 wrote:Ok, but i was searching the forum and a lot of people had way more collision checks than me and still didn't had problems. Maybe it is Cocoonjs and i have to try another one. It's a shame because my fps is like 50% better than with other ones.....

Thanks for your input anyway! If someone else gets the problem, don't hesitate to reply :D

Did you try your game on mobile browser? Default or chrome?


Only with Cocoonjs.
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Thu Jul 24, 2014 2:55 pm

ddaan9 wrote:Only with Cocoonjs.

I've made a test project for me with 21000 collision checks, it gives 50 fps(after 4 minutes of play it drops to 20) on my samsung galaxy s3 in cjs launcher. Maybe that's not causing the crash, but the fps is not good, because if i make the sprites with collision move it will lag like hell, this will make your game unplayable. With so much collision checks the project works with 50 fps even on my mbp 13.
Last edited by Sisyphus on Thu Jul 24, 2014 3:04 pm, edited 1 time in total.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 3:03 pm

Sisyphus wrote:
ddaan9 wrote:Only with Cocoonjs.

I've made a test project for me with 21000 collision checks, it it gives 50 fps(after 4 minutes of play it drops to 20) on my samsung galaxy s3 in cjs launcher. Maybe that's not causing the crash, but the fps is not good, because if i make the sprites with collision move it will lag like hell, this will make your game unplayable.


thanks for your help!

But if it is playable on a galaxy s3, than it should definitely be playable on a nexus 5. The strange thing is on my galaxy tab 2 10.1 it runs on about 50fps, no lag, after i played a couple of seconds...in the start it is about 30fps, it is playable with a minor lag. On my nexus 5 i never had a lag...
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Thu Jul 24, 2014 3:06 pm

OH and i played like a level over and over again. After 7 times the game crashed....but that was with only 2 enemies. Before i played with 12 enemies.....
And i know that with every enemy the collision checks goes up significant, so I think the collisions aren't the problem, because the crashes when they are low but when they are high it doesn't......Hate my problem. I will compile with intel xdk now and accept maybe that one doesn't give the problem.

UPDATE: played for 1hour on both tab and nexus, tried everything to make it crash......it didn't....
Last edited by ddaan9 on Thu Jul 24, 2014 3:31 pm, edited 1 time in total.
B
7
S
2
G
1
Posts: 77
Reputation: 727

Next

Return to How do I....?

Who is online

Users browsing this forum: richardfu and 34 guests