Pokemon Alpha Sapphire Crashing Randomly

Issue:
I’m working on a python script to automate something in the game for my friend, and I will go afk and sometimes when I come back the citra window is closed (nothing in the script would close the game.)

System Information

  • Operating System: Windows 10
  • CPU: i7 9700k
  • GPU: RTX 2070 Super
  • Citra Version (found in title bar): Canary 1984
  • Game: Pokemon Alpha Sapphire

Diagnostic Log
https://drive.google.com/file/d/1CNWpbOvYLEvA7vOOkK_ZttECGTXZoqmC/view?usp=drivesdk

In order for us to provide better support, we need to see the log generated by Citra. This guide will walk you through how you can obtain the log file: How to Upload the Log File.

I can’t seem to download the log file through the hoster you linked. Can you upload it directly to the forums? You should be able to. If not, try google drive, MEGA or mediafire instead.

https://drive.google.com/file/d/1CNWpbOvYLEvA7vOOkK_ZttECGTXZoqmC/view?usp=sharing

That’s a private link. Please upload the public link to the file.

Im getting a message saying that i cannot post a link to that host when trying to reply with the new link. the problem was though that i had link sharing off so maybe theres a chance its still the same link

That’s a long log file. It’s full of errors which make me think off driver issues, but I’m honestly not that sure. I’m unable to pinpoint where the crash happens so I’ll ask the other support members if they have a clue. Just for reference though, what exactly were you trying to automate? No idea if it’s related but it would be nice to know just in case.

The script is just encountering the starter and if it doesn’t detect a shiny it soft resets. It’s coded in python using the pyautogui library.

1 Like

There might be a memory leak happening within the process of soft resetting the game constantly. Run Citra and your game, then take a note of the RAM usage. Run your script for a while and check back every once in a while to see if the RAM usage increases the longer you run your script.

I haven’t been able to access my PC for a little so I am going to try doing what you said now. I will let you know how it turns out.

So I tested it for the past day, the memory usage seems to be stable the whole time the script is running.

Did you encounter the same crashing issue still?

yes i am still encountering the same issue

Then I’m out of ideas, sorry. Do you have an approximation of how much time it takes for the game to crash using your script?

Yeah about 16 hours give or take.

its not a huge deal its just an inconvenience because when it does happen, i’m usually not home to reopen citra again

This might also have something other than Citra then. Sometimes Windows 10 is weird about the boosting behavior of apps that it thinks are draining battery for example. This could potentially cause an issue in Citra, though I’m grasping at straws here. if you could test this on other systems as well, that would at least rule out a system issue for example.
I’ll let you know if I think of anything else, but yea, I’m almost completely out of ideas.

I actually just had it crash after not long at all, maybe an hour or so. Lot smaller of a log file but still pretty big in general so let me know if its small enough to the point where u can find whats causing the crash. For some reason it still wont let me upload the log file here so heres the link: https://drive.google.com/file/d/1Zgvx8oyeSsdqRo_xn4j8w9w0d5JwEA60/view?usp=sharing

I also just added a feature to the script that will shadowplay the last 5 minutes if citra crashes so I can at least see what happens when it crashes. So now I just have to wait and see.

Ok I just found something that may actually help you, citra seems to only crash right after my script soft resets. I’ll let you know if that information changes.