Physics error and crash

Bugs will be moved here once resolved.

Post » Fri Jul 17, 2015 11:32 am

Problem Description
Physics behavior bug / crash when creating objects on the fly. Possible memory extension fix in beta r209 did not fix the problem, and does not help to support more objects.

Attach a Capx

Description of Capx
Simple layout with physic objects. Left mouse click to spawn coins high rate.

Steps to Reproduce Bug
Just spawn some objects with left mouse click, (hundreds of them, it's fast) and the crash will happen.
Same capx from previous bug report.

Observed Result
App crash with physics behavior related debug data.

Expected Result
Being able to support more objects. The problem also shows with tilemap with physics behavior.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 7 SP1

Construct 2 Version ID
Beta r209
Posts: 140
Reputation: 1,502

Post » Fri Jul 17, 2015 1:49 pm

Still have the same Problem Windows 8.1 latest chrome canary

Interseting part is, it seems not to be related to the number of objects spawned.
if i spawn 1/second it crashes after round about 170 objects:
if i spawn 10/second it crashes after 535 objects

Kind regards
Last edited by j0schi on Sun Jul 19, 2015 12:29 pm, edited 1 time in total.
Posts: 225
Reputation: 2,757

Post » Sun Jul 19, 2015 7:43 am

I think I'm getting the same issue but mine only randomly happens after running for about 20 or 30 minutes. I have removed all objects with physics behaviors and only have <10 objects in scene and it still happens. It even happened when I created a simple app with a Bullet object bouncing around four solids (see attached capx). I ran it for about 10 minutes at 10x speed for it to crash but it also happens at 1x.

capx ... .capx?dl=0

Tested in: Chrome
Version 206 Stable
Posts: 5
Reputation: 210

Post » Thu Aug 06, 2015 12:20 pm

I'm not sure there's much to be done about this - it appears to be a limitation in how asm.js works. IIRC this is the same .capx you submitted last time, and I can create about twice as many objects than before given the recent memory increase. But AFAIK the only solution is to increase memory even further, which starts to add a lot of memory overhead to physics games, and still does not entirely solve the problem (you just get to go longer before it crashes).

If it's a really serious problem you could go back to box2dweb physics, but that's a lot slower and no longer maintained.
Scirra Founder
Posts: 25,205
Reputation: 200,351

Post » Thu Aug 06, 2015 12:35 pm

Ooh... So why do we encounter the problem when there's only few objects in game ? I really don't think it comes from the memory limitation, but rather a memory leak.
Posts: 140
Reputation: 1,502

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests