Freezes on collision?

ChunkyMonkey

  • Posts: 430
    Hello,  I've been working on this game, but about 5% of the time this actor collides with this other actor (circled in red below) the game freezes. It shows this error which I can tell is a problem with box2d
Code: [Select]
[object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2Body/SetTransform()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2Body.as:150]
at Box2DAS.Dynamics::b2Body/SetAngle()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2Body.as:140]
at stencyl.api.engine.actor::Actor/rotate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/actor/Actor.as:1806]
at scripts::Design_5_5_SpinSpearLogic/update()[C:\Users\Alex\Downloads\preview\scripts\Design_5_5_SpinSpearLogic.as:41]
at stencyl.api.engine.behavior::Behavior/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/behavior/Behavior.as:203]
at stencyl.api.engine.behavior::BehaviorManager/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/behavior/BehaviorManager.as:123]
at stencyl.api.engine.actor::Actor/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/actor/Actor.as:743]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1494]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1395]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1377]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:400]
    I'd call it "inefficient" because it doesn't always happen, but it does often enough to bug me about how this game will be online (Get it? Bug me? ;)). Screenshot of frozen game below. The silver actor's collision is 1 rectangle and 2 circles (1 on each side) and the blue actor's collision is the square it started out with.

1MrPaul1

  • *
  • Posts: 1268
If actor collides with tiles while another actor push this actor from other side, game always freeze. If actor in "sandwich" have enabled continuos collision detection, game show "alchemy exit" error, but if this actor do not have enabled continuos collision detection on self, in this situation game anyway freezing but after few minutes you can see in consol next message
Physics Error!
ERROR: null object
Jon, please help to solve this problem, using of any platforms or level traps or enemy pushes it's very hard now, in all this cases we have the same errors. Or may be somebody can make behaviour that will detect this situation and make some action with actor, kill it or move to other position.

ChunkyMonkey

  • Posts: 430
Thanks for your help, and yeah, it'll be hard for me to make this game (and other users of course) with that error in the way. Please help someone on the stencyl team.

« Last Edit: December 31, 2011, 08:30:15 am by ChunkyMonkey »


docskull

  • Posts: 65
Hello friend, I had the same problem, a slight variation, but it also crashes when actors are "sandwiched". As far as it seems it's an unsolvable box2d problem, check my forum post:

http://community.stencyl.com/index.php/topic,5995.0.html

ChunkyMonkey

  • Posts: 430
Hello friend, I had the same problem, a slight variation, but it also crashes when actors are "sandwiched". As far as it seems it's an unsolvable box2d problem, check my forum post:

http://community.stencyl.com/index.php/topic,5995.0.html
Thank you!

Jon

  • *
  • Posts: 17526
I need a test game to go off of for any of us to look further into it and see if it can be worked around.

docskull

  • Posts: 65
I have found a way around, for my game at least:

My bug was being caused when the "bullets" overlapped a collision area, as in the screenshot in the post I linked above. I have rebuilt my "missile fire" to fire missiles based on "tweens" so aprt of the physics for the bullets was disabled.

The bullets now work a different way, I am rebuiliding their logic, but the game never had the same crash in various tests so far.

(This might not solve the problem for everyone, but it is a way around for some people)

ChunkyMonkey

  • Posts: 430
On forge and kept "Private" under the name Blue Box 3

docskull

  • Posts: 65
Correction, just had the same bug again...

When I pushed an enemy against a scenario prop (the castle) and shot it at the same time, the game crashed as described above.

My game is named dragona and is on my private stencylforge resources, needs me to make it public for you to check the bug?

Jon

  • *
  • Posts: 17526
Alexin is looking into this a bit further to see if we can do anything about it. Fingers crossed.

Alexin

  • *
  • Posts: 3130
Can you reproduce the error consistently? I can't do it on my end and I need a way to reproduce it.
"Find the fun"
alexin@stencyl.com

docskull

  • Posts: 65
Me or Chunky?

I can't really after I changed my bullet behavior the error happened only once under no particular stressful situtation for the game. I have tested it extensively so I think it might have been more of a local problem.  So I'm carrying on, and considering it as fixed since Im now using tweens for the bullets. (Though I would rather use physics based bullets)

But I can easily and consistently reproduce the error if I change back the missiles (bullets) to a physics based behavior. If you want I can create a copy of the game with this change, then the error will be pretty easy to reproduce. Just let me know.

As for Chunky, I have no idea how his error is going :P


Alexin

  • *
  • Posts: 3130
I asked both just in case. ;)

I would like to have a copy of your game, yes. Upload it to Forge and keep it private if privacy is a concern.
"Find the fun"
alexin@stencyl.com

ChunkyMonkey

  • Posts: 430
I fixed my game so nothing gets sandwiched anymore. I currently don't have access to my laptop but that error should be a simple thing to set up, right?