Crash when click the Preview button!

zellhuangzellhuang Member, PRO Posts: 79
edited March 2012 in Tech Support
My GS often crashes when I click the Preview button in the engine.And the more important thing is that after it crashed and restart,it may change some of my rules or expressions.I'm definitely sure I have saved my game before crashing(before click the Preview button).This problem is gonna killing me!I don't know whick rule or express it may change.My game is a strategy game,using a lot of cards to form your stategy.The rules maybe a little complicated,will it be the reason why it crashed and changed my rules?
BTW,my computer is a 13 inch macbook pro,and the system version is 10.7.2,the GS version is 0.9.87beta.This crash problem started since GS version 0.9.2.

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Certainly sounds like a problem with your code. The only thing i can think of is to literally turn off rules until you find the culprit. A very complicated set of rules on multiple actors could be tested and found in under an hour. Remember it doesn't matter if the game obviously doesn't work correctly as you turn rules off, you're just testing to see if it crashes.
    Too avoid crashing, i would do the above in reverse, i.e. take all actors out of the scene and start adding them in 1 by 1. Once you've found the offending actor, turn all its rules off and then turn back on 1 by 1 until you find it. That way you'll limit the amount of crashes you have.

    Hope that helps, good luck :)
  • zellhuangzellhuang Member, PRO Posts: 79
    Certainly sounds like a problem with your code. The only thing i can think of is to literally turn off rules until you find the culprit. A very complicated set of rules on multiple actors could be tested and found in under an hour. Remember it doesn't matter if the game obviously doesn't work correctly as you turn rules off, you're just testing to see if it crashes.
    Too avoid crashing, i would do the above in reverse, i.e. take all actors out of the scene and start adding them in 1 by 1. Once you've found the offending actor, turn all its rules off and then turn back on 1 by 1 until you find it. That way you'll limit the amount of crashes you have.

    Hope that helps, good luck :)
    Thanks for your help,man.I think I will try your methord later, 'cause I've code this project for more than 5 months,and the checking work will definitely take me a lot of time.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    @Zellhuang No worries good luck. It would also be worth trying to hit preview when on different scenes, if the other scenes load then you can narrow it down to what scene is crashing the game. Then use the above method and it shouldn't take that long in reality.
  • calvin9403calvin9403 Member Posts: 3,186
    is your game a big game? because f you have tons of image GS might crash especially your computer is running low in memory

    and you should update to at least 0.9.9(if you don't like the playheaven thing)

  • zellhuangzellhuang Member, PRO Posts: 79
    is your game a big game? because f you have tons of image GS might crash especially your computer is running low in memory

    and you should update to at least 0.9.9(if you don't like the playheaven thing)

    Yep,maybe it's a big game.My project is about 60% done,and the project size is 35MB. I just use some simple images now.After I finish all the code,I will replace these simple images to better ones.I think the project size will be nearly 100MB when it done.
    Thanks for your help!Why I didn't update is that I was afraid it may change my rules after updating :( But I think I really should do it now :D
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Thats not a big game! Its not crashing due to the memory on your Mac. It'll be something with your rules. Did you troubleshoot as we discussed?
  • zellhuangzellhuang Member, PRO Posts: 79
    Thats not a big game! Its not crashing due to the memory on your Mac. It'll be something with your rules. Did you troubleshoot as we discussed?
    Sorry man,I havn't yet.I planed to do the troubleshoot this Sunday.After that,I'll tell you the result as soon as possible :)
Sign In or Register to comment.