Javascript error about physics

Report Construct 2 bugs here.

Post » Tue Jan 17, 2017 10:03 am

Problem Description
After some time playing in some layouts, like level 36, the game simply crashes, always giving the same error

Attach a Capx
I can't upload a .capx since my game is on Steam, but i can send it via e-mail for Ashley if he agrees

Description of Capx
The .capx is a completed game called Pinkman

Steps to Reproduce Bug
  • Start the game
  • Select a level
  • Wait some minutes until the game crashes
  • It doesn't happen in all layouts, it's seems like it happen more often in layouts with more physics objects, like level 36

Observed Result
The game crashes giving an error about physics

Expected Result
Nothing, i just want the game to not crash

Affected Browsers
I only use NWJS, my game is a desktop game, so there's no other option

Operating System and Service Pack
Windows 10 64 bit

Construct 2 Version ID
Construct 2 Beta release r241

Error screenshot
http://i.imgur.com/sGnGa3r.png

And before anyone asks, my NWJS is updated, my Construct 2 is updated and my graphics card driver is updated.

Ps: sorry if i said something wrong, it's not my main language.
Image
B
40
S
14
G
2
Posts: 132
Reputation: 3,527

Post » Thu Apr 06, 2017 8:29 pm

I have the exact same issue, did you fix it?
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Thu Apr 06, 2017 9:24 pm

No, i had to remove every physics object from my game, since Ashley didn't even tried to look at the capx. :/
Image
B
40
S
14
G
2
Posts: 132
Reputation: 3,527

Post » Thu Apr 06, 2017 9:43 pm

Did you scale a sprite with Physics attached in some way ? Using sine perhaps ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Apr 06, 2017 9:48 pm

99Instances2Go wrote:Did you scale a sprite with Physics attached in some way ? Using sine perhaps ?


Yep!
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Fri Apr 07, 2017 9:22 am

That is a known issue. Updating the collission polygones means for the Physics engine a totaly new object every tick. Hence it runs out of memory. I saw in C3 that the error is knda solved, but that Physics dont work on a object with a scale sine attached.

You can use this exellent engine.
behavior-chipmunk-physics_t110815

R0J0hound posted somewhere a workarround, i think it was something like dissable physics, then scale, then enable physcis. But i cant find it no more.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Sep 25, 2017 12:58 pm

99Instances2Go wrote:That is a known issue. Updating the collission polygones means for the Physics engine a totaly new object every tick. Hence it runs out of memory. I saw in C3 that the error is knda solved, but that Physics dont work on a object with a scale sine attached.

You can use this exellent engine.
behavior-chipmunk-physics_t110815

R0J0hound posted somewhere a workarround, i think it was something like dissable physics, then scale, then enable physcis. But i cant find it no more.


I found R0J0hound's workaround in this post (viewtopic.php?f=152&t=163513&p=989989&hilit=physics+javascript+error+physics+behavior#p989989). Is this error fixed in Chipmunk Physics behavior?
B
64
S
14
G
5
Posts: 265
Reputation: 6,103


Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests