Hi all.
My game tends to randomly crash when playing. I have the system console open and it reports no errors at all. I have crashed repeatedly on several computers and my main compyter only two weeks ago was upgraded to a shmick new graphics card with latest drivers. Is there some way to debug a running game other than the system console?
Post morten debugger is the best, but not so newbee freindly, option.
If the crash is in Your python code You can locate it by adding traces (flushing often needed too). But even if Your python code cause the crash it is not for sure it happens in Your code.
If you think a python call is crashing it you can add print statements in your code, starting from the beginning of the logic loop to the end of it. If you see the print statement - you know it happened before the crash, if you don’t see the statement you know it happened after it. Keep doing this until you locate the call that crashes your game and then you can try and work out why it happened.
It can be a pain in the ass, especially if you use callbacks for some stuff, but its really the only way to do it.
If it isn’t a python call that crashes it, you’re going to have to try isolate the problem. Remove certain game aspects or features or objects until your game runs fine.
If you don’t keep periodic backups you should start doing so, its happened to me before and I haven’t been able to find the error so I’ve had to roll back to an earlier update.
It’s funny how much more stable the game is (ie, hasn’t crashed yet) with the sounds removed. Is there a preferred workflow for sound? is ogg better than wav or mp3? Any thoughts appreciated.
Well. It’s pretty offical. Sound is crashing my game. No matter if I use SDL or openAL it crashes. I have made all of my samples OGG but to no avail. The only way to play my game is mute.
Could anyone shed any light on this? I have tested at work and the result is the same.
Is it a certain sound file or sound type that crashes blender?
If you can isolate it as much as possibke then post a bug report a developer might hopefully try and solve it
I’m not sure that it’s a certain sound type as I’ve tried ogg and wav and mp3 and now I am changing it all over to Python and Audaspace (which is trying my python patience :))
Create a new blend file and append all objects from the other blend file(the one.with problems) ,do not append the scene, and save it as a different blend file then try again.
I will make a deatiled report once I figure it out. I have started to rebuild the audio using Audaspace and Python and the whole thing is becoming stable again (but it’s a lot of work to track down all of the audio and rebuild it.)
…which leads me to a question…
I am calling sounds as I need them with some sample code I found on the web…
Now, this plays a sound once only which is fine. When i have a character jumping where I need the sound to repea, I have simply taken out the if statement like so…
But now I get the sound playing twice each time it’s triggered. Is there a way to play it once as in the first snippet of code, but reset for the next time?