Jump to content

Bug or Feature? Calling any entity methods during a collision callback crashes


helmers
 Share

Recommended Posts

Hi,

 

after spending some time searching for the reason for the crash (the program crashes during UpdateFramework(), a while after the callbacks have been called!), I found the following:

 

 

Naivly I called during the collision callback method the GetEntityKey() method to get the name of the collided objects (for test purposes). This seems to be the reason that the program crashes some time later in the UpdateFramework() method. Without any call to the engine from within the callback the program runs fine. Tried also other engine methods with the same effect.

Seems that reentrency is not an option.

 

The WIKI and also the tutorials say nothing that engine calls are forbidden! But I noticed that the tutorial example also avoids calling any engine methods. Coincidence?

 

So if this is the official rule I would like to now whether this is true for all callbacks. I would then like to make some additions to the WIKI. Otherwise I would raise a bug report.

 

It also seems that the callback is called for all collisions not only for the entity it is registered on! Also a bug or a feature? Description at least is different from reality.

 

by the way I am talking about 2.31

Hardware: Q6700@3.25GHz / GForce 9800GTX / 4 GB / 1.5 TB + 128GB SSD / Wacom Tablet / 3D Mouse /27"HD + 20" Monitor / Win7 Pro 64Bit

2D Software: PhotoShopPro X2, Texture Maker, Genetica 3.5

3D Software: Cinema 4D V11 + Advanced Renderer, Vue 7 Infinite, 3D Coat V3, Quidam 3, Grome 2, Tree Magic, Plant Life

Development: VS 2008/2010, XNA 3, OpenProj, Leadwerk Engine V2, Sunburn pro

Link to comment
Share on other sites

Callbacks are working fine for me in version 2.31.

I use them pretty extensively and call all kinds of engine commands in them.

 

You should always check if the entity the callback passes is not 0.

At least thats what i do, and it works ;)

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...