After learning java on my own, i began a project for getting data from a website through api calls for a game called torn. There were a few little details i fixed thanks to some help, but the main issue i had is still not solved. after a day and a half of running, the program just freezes. i couldn't find anything about it so far. I took heap dumps for a while and i noticed some things. hope someone can help. During the first day or so, all is well (screenshot of heap dump after 3 hours and after 25 hours). Then, a few hours later, the program is still running but there is no instance of the method that runs it all (screenshot after 30 hours). A few hours after that the program is still running (as in it has not terminated or exited) but there is no activity and no instances of the methods at all (40 hours into run). (Some of the images may require scrolling right and left to see all the info). I also noticed that after the program freezes, the thread for the runnable changes from "timed-waiting" to "waiting", which i also don't understand.
I have also included the code for my project (minus the actual key used in connecting to the site) along with the images in case it helps.The main is in OtherFactionsStats.java .
I appreciate all the help and advice -especially with my beginner status in java-, and thank you in advance.
This can happen if the
RunUpdater
constructor throws a RuntimeException.According to the JavaDoc:
I would propose to replace (in
OtherFactionStats.main()
):with
This will print out any exception that occurs during
new RunUpdater()
and then gracefully shut down your application.