Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [IMPORTANT] BUG in the AGK 108.21

Author
Message
xGEKKOx
AGK Master
16
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Mar 2014 15:10 Edited at: 5th Mar 2014 15:14
Assertion failed: (3 <= count && count <= 12), function Set, file /Users/paulj/Documents/SVN/AGK108/common/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 122.

This is the bug i have when i use the Shape 3 for polygon.
Please fix it or i can't publish the game.

I think is for the polygons points < 3 and it crash.

Long life to Steve!
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th Mar 2014 15:12
You wanted to take the project over. Why don't you fix it?

-- Jim - When is there going to be a release?
xGEKKOx
AGK Master
16
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Mar 2014 15:13
What?

Long life to Steve!
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th Mar 2014 15:43
GEKKO - You said you wanted to buy the source and improve it. So why not look at the .cpp file and suggest a fix?

-- Jim - When is there going to be a release?
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Mar 2014 15:47
hmm, if u need min. 4 points, did you try set point 3 and 4 at the same place?
this box2d is open source, maybe download newer version of it
and look if there are some changes at this position.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 5th Mar 2014 15:49
Is this with the automatic shape? - I'm guessing here, but if the problem is in the calculation of the 2D outline, well you could manually add polygons, and probably do a better job than the automatic outline.

I'd try adding a simple polygon instead of letting it outline - if that works, then at least it's a route around the problem.

I am the one who knocks...
IronGiant
AGK Bronze Backer
13
Years of Service
User Offline
Joined: 27th Feb 2012
Location: the great state of madness
Posted: 5th Mar 2014 15:50 Edited at: 5th Mar 2014 15:51
Ok, lets all not start being douchebags towards each other.

Dont make me bend anyone over my knee. been a while since I had to paddle bad kids.

And its ok to report Bugs and not fix them even if you've stated you could fix the system yourself.

Look, we're all on edge waiting for AppGameKit 2 to be complete.

myself, I have so much to do with winter slamming me here in the country that my back, from shoveling snow now looks like the Hulks.

So I've been too busy to care whether or not AppGameKit 2 is done yet.

Paul and Lee are surely busy as hell, and writing a language that works on more than one system cant be easy.

So lets give them a slight break and stop goin at each other while were at it ok?

Dont force me to make you both stand in a corner.

Now I'm off to program that game thats gonna make me a millionaire.

so....Peace out!

I fight for the users!

It's Bird! , It's Plane!, No its a rocket powered Squirrel holding some acorns and a smile!
xGEKKOx
AGK Master
16
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Mar 2014 17:11 Edited at: 5th Mar 2014 17:15
Lol Jim you are a FOX!!!
You have the power to look in the cpp in the LIB file!!!
Come on boys!!!

All that Paul need to do is add an assert to the < 3 poligons return nothing in shape and all is ok.
The important is to not crash especially if you use TILES like in this case.

Ah, for the chronicle, i don't want V2 completed, i'm still waiting V1 is complete.

EDIT : Reading Jim answers.... Jim i don't have any source, the bug is in the AGKLib.a

Long life to Steve!
The Daddy
16
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 5th Mar 2014 20:29
IronGiant....I have been a very naughty boy! LOL could not resist!

xGEKKOx be careful...



Quote: "All that Paul need to do is add an assert to the < 3 poligons return nothing in shape and all is ok."


You will have people following with

"All that Paul needs to do is provide a button that I can click to create my game, complete with media and deploy to platform Z"...

www.bitmanip.com
All the juicy you could ever dream of!
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Mar 2014 23:04 Edited at: 5th Mar 2014 23:10
version 2.2.1 from here:
http://code.google.com/p/box2d/downloads/list
maybe ask the developers there if it was a mistake or make any sense.

maybe its possible if you overload this function with your one in tier2 (<- i think u use).



there is also a newer version for compare but i do not want install 7 zip.
Box2D_v2.3.0.7z

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 6th Mar 2014 01:28
Quote: "AGKLib.a"


is this not compiled with the hardcodedscript batch file? I may be off from that but I do know that somethings getting compiled from Cygwin and its most likely code...lol

@GEKKO im not even close to as good of a coder as you are...but maybe dig a bit more into the compiling of the libraries as I believe all the source files I think are in there....they are just spread out in random directories.

I know the core files are found in the ide/apps/ [platform] but in order for me to compile anything I also needed to link the other files from common/include

I see the source files for box 2d in the common/collision folder so you must be able to re compile those libraries no?

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Mar 2014 01:33
Quote: "Assertion failed: (3 <= count && count <= 12)"


This is an assertion inside Box2D that makes sure polygons have at least 3 points, I assume this is because Box2D breaks if they don't. It could also mean your shape has more than 12 but AppGameKit has limits in place that mean it should never create a shape with more than 12 points by itself. Perhaps the sprite's image has all transparent pixels meaning AppGameKit can't find a shape on the image?
xGEKKOx
AGK Master
16
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 6th Mar 2014 21:09
Yes Paul. To avoid the problem i added 1 pixel to the image.
There is a way to fix this thing?

Long life to Steve!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Mar 2014 21:31
The polygon shape uses the opaque pixels to draw a convex hull around the image. If there are no opaque pixels then this will fail and you'll have to fall back on circle, rectangle, or a manually created polygon.
xGEKKOx
AGK Master
16
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 6th Mar 2014 22:43
Ok Paul, so there isn't a way to add an IF to the cpp Box2D file to avoid this inconvenience?

Long life to Steve!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 7th Mar 2014 03:29
Yes, it makes sense that it should automatically fall back to a box shape instead of producing and error message. I'll collect any small bug fixes like this into a new 108 build and when I get enough I'll do an update.
xGEKKOx
AGK Master
16
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 7th Mar 2014 16:21
Much thx Paul!

Long life to Steve!
Ancient Lady
Valued Member
21
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Mar 2014 02:18
Yes, thank you very much (in advance) for v108 bug fixes.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2025-05-24 18:54:54
Your offset time is: 2025-05-24 18:54:54