Physics_behavior.js App Crash

Bugs will be moved here once resolved.

Post » Fri Jun 12, 2015 12:37 am

Problem Description
Physics objects causes App to crash.
http://gyazo.com/e3af86bab86c769915076d29c04626bd
Ive removed everything from this rather big project exept for the part that crashes the app. It seems that the ammount of physics object spawn is not the cause (i highered the spawnrate for testing) but that also 9 physics objects (coin) will cause this crash, it just takes a little longer. Just run the attached *.capx and wait for it.


Attach a Capx
https://drive.kyberon.net/index.php/s/yEYfDYcsSMRc9sE Password: demo

Description of Capx
Spawn a object every 10 to 20 Seconds which (when reaches another object) spawns some physics objects. The phisic objecs have an on created apply impulse condition. After some minutes the app crahes

Steps to Reproduce Bug
  • Start the Browser Preview
  • Wait up to 10 minutes
  • Watch error message

Observed Result
Javascript Error Uncought abort() at Error

Expected Result
App runs fine

Affected Browsers
  • Chrome: Yes
  • FireFox: Yes
  • Internet Explorer: Yes

Operating System and Service Pack
Windows 8.1 Latest

Construct 2 Version ID
Release 207
B
19
S
7
G
1
Posts: 222
Reputation: 2,551

Post » Fri Jun 12, 2015 2:55 am

If you change line 4 in Event Sheet 1 to Every 3 seconds then the crash happens within 1 minute (r206). I received the following in the JS console:

Code: Select all
Uncaught abort() at Error
    at Error (native)
    at fb (http://localhost:50001/Physics_behavior.js:31:26)
    at ua (http://localhost:50001/Physics_behavior.js:417:61)
    at Function.h.o [as W] (http://localhost:50001/Physics_behavior.js:17:91)
    at nc (http://localhost:50001/Physics_behavior.js:167:483)
    at NB (http://localhost:50001/Physics_behavior.js:196:40914)
    at _f (http://localhost:50001/Physics_behavior.js:184:24253)
    at j.Fx [as g] (http://localhost:50001/Physics_behavior.js:654:22)
    at behinstProto.createBody (http://localhost:50001/Physics_behavior.js:1551:16)
    at behinstProto.tick (http://localhost:50001/Physics_behavior.js:1883:9)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.c @ Physics_behavior.js:7ua @ Physics_behavior.js:417h.o @ Physics_behavior.js:17nc @ Physics_behavior.js:167NB @ Physics_behavior.js:196_f @ Physics_behavior.js:184Fx @ Physics_behavior.js:654behinstProto.createBody @ Physics_behavior.js:1551behinstProto.tick @ Physics_behavior.js:1883Runtime.logic @ preview.js:2315Runtime.tick @ preview.js:2064tickFunc @ preview.js:629
Physics_behavior.js:10 Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.




I suspect it could be caused by the impulse given by the On Created in line 36, but the message above sort of implies a memory leak / problem.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,255
Reputation: 46,484

Post » Fri Jun 19, 2015 1:56 pm

It is incredibly difficult to debug anything other than trivial .capx files. This project has 58 events, most of which are probably irrelevant to the problem. Please see the bug report requirements for information about submitting a minimal .capx and then file a new report. Closing.
Scirra Founder
B
399
S
236
G
89
Posts: 24,543
Reputation: 195,430

Post » Fri Jun 19, 2015 4:24 pm

Hello everyone,

I encountered these kind of bugs many times when creating objects on the fly without being able to find the bug or present here a clear capx for debugging. However I'm interested in further investigations about the same subject, probably like other persons as I saw many physics behavior related bugs simply closed because of too few information or no good capx.

So if the devs can spend some time on it, even if nobody can provide good capx, it would be great.

I opened a new topic with a clear version of your capx, that reproduces the bug in one event, by just creating objects in chain.
https://www.scirra.com/forum/viewtopic.php?f=151&t=148526
B
14
S
4
Posts: 112
Reputation: 1,287


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests