Slimwaffle Posted February 2, 2019 Share Posted February 2, 2019 I was wondering if anyone is able to help me. So I have had an issue for months now with Enemies crashing my game. Regardless of the models/animations I use. Regardless of the scripts or code I use (I have tried the Default, The HUD elements ai script and about 4 variations I have made myself). Simply having enemies in my project causes crashes. I have tried running my game without enemies and it runs perfectly. But even if I set them to run away instead of attacking, simply having enemy characters causes the game to crash. I would really love and appreciate some help fixing this because its an issue that makes my game unplayable and the only major bug I have left to fix. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 2, 2019 Share Posted February 2, 2019 I don't know your specifics but recently I had a crash when I loaded a different model in my game. The issue ended up being that I was trying to manipulate an attachment via code that the new model didn't have. In other words, make sure you're not trying to access a model (like a gun) that your new models may not have. Just a thought; could be anything though. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 2, 2019 Share Posted February 2, 2019 Often starting in debug mode, can give you at least an error instead of just a crash. Starting adding nil checks and print out a console warning when something is nill when it shouldn't be Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted February 2, 2019 Author Share Posted February 2, 2019 I don't think its a bone reference thing. Because it even does it while using default crawler prefab.And I tried a very basic script that I wrote where all that was in if was; if player is inside this distance run to random position. I tried debug mode but its unusable my game won't even run in debug. It hits 2fps and stays there in debug mode. Which is weird because I have a pretty decent pc and my gpu is the nvidia 1080. I don't think nil checks will help because I have already tried bare bones code that simply says re-position if player is in range. Using this method I was able to get the crashes from every minute or so up to around the 5-10 minute mark. Also something to point out using this method the game would run longer with fewer crashes but it would also experience a different kind of crash that wasn't so random. Where my game just kept getting slower and slower as more spawned in and then it crashes. I noticed there was a collectgarbage command. Is this something that only works in debug? What is the correct way to use this? I was thinking it might help if I use it in the update world function. Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted February 2, 2019 Author Share Posted February 2, 2019 This is the script I would prefer to have working crash free if at all possible. SCAI.lua Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted February 15, 2019 Author Share Posted February 15, 2019 Bump Quote Link to comment Share on other sites More sharing options...
havenphillip Posted February 16, 2019 Share Posted February 16, 2019 Is there anything more specific about when they crash? Is it on startup or when they die or does it happen at 14 minutes or something like that? Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted February 16, 2019 Author Share Posted February 16, 2019 There is literally nothing specific going on. I have been trying for months to narrow this down. It happens at random and they are doing different things. One that does happen a lot. Enemies will run in place because of the broken navigation. Then after a while they will glitch out collide with the terrain and then the game will crash. But that is only one of many causes. It honestly feels like simply having enemies in my project causes the crash. Quote Link to comment Share on other sites More sharing options...
Slastraf Posted February 17, 2019 Share Posted February 17, 2019 Maybe make a new fps project and try out the default crawler and so on there ? Because I didn't experience so bad behaviour yet. Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted February 18, 2019 Author Share Posted February 18, 2019 I think it might be the navigation being broken. A blank small project works fine. But I remember reading in the forums there was a bug where if you changed the world size or terrain size (something like that) it breaks the navigation. And I did this in my game because I was making a massive open world game. The navigation does appear to be broken because enemies often don't know where to run or move to (and glitch out). And I have noticed these crashes are happening when they glitch out. I have also noticed having more then 1 or two enemies causes the scene to become overloaded very quickly. But this could be because the Leadwerks is 32 bit and isn't able to access more ram. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 18, 2019 Share Posted February 18, 2019 I think this is the post you a referencing: https://www.leadwerks.com/community/topic/17103-infiniteviewrange-navmesh-issues/?do=findComment&comment=111417 I only noticed the strange navmesh generation by code but could easily have other negative effects. To be fair, SetWorldSize is undocumented though BuildNavMesh is official. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 26, 2019 Share Posted February 26, 2019 If you upload your game and send me a link I can run it through the VS debugger and see what is happening. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.