helmers Posted May 16, 2010 Share Posted May 16, 2010 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 Quote 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 More sharing options...
DaDonik Posted May 19, 2010 Share Posted May 19, 2010 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 Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Laurens Posted May 31, 2010 Share Posted May 31, 2010 This has been fixed in the latest update. http://leadwerks.com/werkspace/index.php?/tracker/issue-59-crash-on-updateframework-when-using-callbacks/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.