• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[v16.1] Crashing on Catching.

  • 5
    Posts
    8
    Years
    • Seen Jul 18, 2019
    Salutations, poké developers!
    I've just started making my own Pokémon Essentials game, and everything was going pretty nice and smooth, until i tried to catch a new pokémon. The game simply crashed, without any kind of error message.

    The same problem ocurred in both the testing and the normal playing modes.

    Is there anyone capable and willing to help this newbie developer?
     
  • 129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    First, make sure there is actually no error message: look for a debuglog.txt or dumplog.txt in the Data folder or in the main folder, or perhaps a crash dump named something different than that.

    If there's no error message, it didn't crash. Showing an error message when an uncaught exception is thrown is a function of RMXP, regardless of what Essentials might do, so it should always show a message or write a log if a crash happens.

    Start looking for reasons why the game might quit unexpectedly. For example, setting $scene to nil will cause the main loop to exit gracefully, and close the game. If that happens at some point shortly after you catch a pokemon, then it could result in the game shutting down when you don't expect it.

    And it doesn't have to be explicitly set to nil; you might be setting $scene to a variable that didn't get anything assigned to it accidentally, and that would result in the same effect.

    EDIT: You can test to see if the game is actually exiting properly instead of crashing by putting the following line at the very end of the Main Section:

    Code:
    raise "The game exited gracefully!"
     
    Last edited:
  • 5
    Posts
    8
    Years
    • Seen Jul 18, 2019
    First, make sure there is actually no error message: look for a debuglog.txt or dumplog.txt in the Data folder or in the main folder, or perhaps a crash dump named something different than that.

    Looked everywhere; no crash/debug/log was found...

    EDIT: Added the 'raise "The game exited gracefully!"' in the end of Main, and the pseudoerror message appeared when i tried to exit the game, but didn't when i trie dto catch a pokémon...
     
    Last edited:
  • 1,682
    Posts
    8
    Years
    • Seen May 29, 2024
    Looked everywhere; no crash/debug/log was found...

    EDIT: Added the 'raise "The game exited gracefully!"' in the end of Main, and the pseudoerror message appeared when i tried to exit the game, but didn't when i trie dto catch a pokémon...

    On my computer, error logs get saved to "Documents\Saved Games\[game name]"
    Windows 7. Screenshots are saved there too.
     
  • 5
    Posts
    8
    Years
    • Seen Jul 18, 2019
    On my computer, error logs get saved to "Documents\Saved Games\[game name]"
    Windows 7. Screenshots are saved there too.

    Looked there too, nothing found... Curiously, when i opened a clean project, the catching worked... Now, i don't have a clue of what i changed that broke my project...
     
  • 129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    Looked everywhere; no crash/debug/log was found...

    EDIT: Added the 'raise "The game exited gracefully!"' in the end of Main, and the pseudoerror message appeared when i tried to exit the game, but didn't when i trie dto catch a pokémon...

    Welp, I'm out of ideas then. :/

    Looked there too, nothing found... Curiously, when i opened a clean project, the catching worked... Now, i don't have a clue of what i changed that broke my project...

    You could start putting your code in a diff tool to see the difference between a clean project and yours. I use quickdiff personally, especially since the scripts aren't files that you can easily open in another program (irritatingly). I would look for changes in PokeBattle_Battle, PokeBattle_BattlePeer, PokeBattle_Scene, and PScreen_Bag (depending on at which point it crashes, which you haven't told us).
     
  • 5
    Posts
    8
    Years
    • Seen Jul 18, 2019
    I'm gonna try to use this program to check the differences. I haven't told you guys when exactly 'cause i as trying to post an image of it. Lemme try now...

    imgur.com/lsccu2o
     
  • 129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    imgur.com/lsccu2o

    Ok, you certainly didn't mention the "Player has stopped working" dialog. There's no question that crashed then!

    Look for differences in PokeBattle_Battle in the method named "pbThrowPokeBall", and in PokeBattle_Scene.

    EDIT: Also check to make sure Data/PkmnAnimations.rxdata is there, and is not corrupted or something.
     
  • 1,224
    Posts
    10
    Years
    I'm gonna try to use this program to check the differences. I haven't told you guys when exactly 'cause i as trying to post an image of it. Lemme try now...

    imgur.com/lsccu2o

    I don't know what the actual code problem is, but when your game stops responding like that it's generally stuck in an infinite loop somewhere, if that helps you find it. When Graphics.update is not called for some number of seconds, that's when the "stopped responding" occurs.
     
    Back
    Top