[r173] physics javascript failure

Bugs will be moved here once resolved.

Post » Fri Jun 20, 2014 2:54 pm

Problem Description
One physics object, no other objects, layout does not run and shows javascript error. This is reduced from a project I am working on. The object in this capx was the one I last added to my game and caused it to then crash on run - the error happens with both box2d and asm.js although asm.js was selected when the object was added.

Attach a Capx
physics javascript error.capx


Description of Capx
Project has one object only and a family that gives the object the physics behavior. Run the layout.

Steps to Reproduce Bug
  • Run the layout


    Observed Result

    In browser:


    and in Node Webkit:
    Code: Select all
    {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
    {\colortbl ;\red0\green0\blue255;}
    {\*\generator Riched20 6.3.9600}\viewkind4\uc1
    \pard\sa200\sl276\slmult1\f0\fs22\lang9 Assertion failed: 3 <= count && count <= 8, at: Box2D_v2.2.1/Box2D/Collision/Shapes/b2PolygonShape.cpp,122,void b2PolygonShape::Set(const b2Vec2 *, int32) at Error\par
        at Error (native)\par
        at x.___assert_func ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:233:28 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:233:28\ul0\cf0}}}}\f0\fs22 )\par
        at dc ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:213:73440 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:213:73440\ul0\cf0}}}}\f0\fs22 )\par
        at nQ ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:214:142833 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:214:142833\ul0\cf0}}}}\f0\fs22 )\par
        at Q.Set ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:482:367 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:482:367\ul0\cf0}}}}\f0\fs22 )\par
        at createPolygonShape ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:568:11 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:568:11\ul0\cf0}}}}\f0\fs22 )\par
        at behinstProto.createBody ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:1469:24 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:1469:24\ul0\cf0}}}}\f0\fs22 )\par
        at behinstProto.postCreate ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/Physics_behavior.js:1083:8 }}{\fldrslt{http://localhost:50000/Physics_behavior.js:1083:8\ul0\cf0}}}}\f0\fs22 )\par
        at Runtime.createInstanceFromInit ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/preview.js:2803:28 }}{\fldrslt{http://localhost:50000/preview.js:2803:28\ul0\cf0}}}}\f0\fs22 )\par
        at Layer.createInitialInstances ({{\field{\*\fldinst{HYPERLINK http://localhost:50000/layout.js:1316:25 }}{\fldrslt{http://localhost:50000/layout.js:1316:25\ul0\cf0}}}}\f0\fs22 )\par
    }




    Expected Result
    No error on run.

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

Operating System and Service Pack
W8.1 x64

Construct 2 Version ID
r173

Edited to change the title to what it should have been!
You do not have the required permissions to view the files attached to this post.
Last edited by Colludium on Sat Jun 21, 2014 2:02 am, edited 1 time in total.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,183

Post » Fri Jun 20, 2014 3:04 pm

This is simply because the asm.js version of box2d currently only supports collision polygons with a maximum of 8 points. I'm afraid you have to either use fewer points in your poly or switch back to box2dweb mode. Closing as won't fix.
Scirra Founder
B
387
S
229
G
87
Posts: 24,245
Reputation: 192,160

Post » Fri Jun 20, 2014 3:30 pm

OK @Ashley, thanks.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,183

Post » Fri Jun 20, 2014 3:35 pm

@Ashley, I couldn't find that info in the manual - might be worth adding if my searching isn't at fault, thanks.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,183


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest