question on stackoverflow about jgap network program error 03-16-2014d1123 What is the exact error message that I am getting? -"C:\Users\kurtw_000\Documents\kurt\storage\DR\2014\03-16-2014d1124\error.txt" Here is the message I was going to post to stackoverflow, but then I found the error before I made the final post { I have some Java code that works on one computer, but doesn't work on any other computers I try it on (I've tried two other computers so far). Basically the program runs a genetic algorithm using the jgap library to evolve a network represented by the jgrapht library. Here is the error I receive on any computer except for the original computer the code was run on. Exception in thread "main" java.lang.StackOverflowError at java.util.regex.Pattern.closure(Unknown Source) Exception in thread "main" java.lang.StackOverflowError at java.util.regex.Pattern.closure(Unknown Source) at java.util.regex.Pattern.sequence(Unknown Source) at java.util.regex.Pattern.expr(Unknown Source) at java.util.regex.Pattern.group0(Unknown Source) at java.util.regex.Pattern.sequence(Unknown Source) at java.util.regex.Pattern.expr(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.util.regex.Pattern.(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at UsefulTools.findAndReplacewithRegEx(UsefulTools.java:810) at UsefulTools.predirectory_check_string_process(UsefulTools.java:758) at UsefulTools.predirectory_check_string_process(UsefulTools.java:772) The error output does not stop there. There are actually 1,014 lines that are basically identical to the last two lines with "at UsefulTools.predirectory. . .". One issue that really confuses me is that the UsefulTools code is not even called when the program breaks down. I used the debug feature in Eclipse to step through the code and identify where the code fails, and I see that the code fails when using the jgap command "population.evolve()". I did not write the evolve() method or the class for the population object so this code should not even use the UsefulTools code which I did write. Note that the "evolve" function likely does use a "FitnessFunction" which I did write, I've tried several troubleshooting steps to fix my problem. I thought that maybe the program doesn't have enough RAM so I ran the program with the "-Xmx1024M" command, but this did not help. I thought that maybe the non-working computers have an older JDK (Java Development Kit) so I installed the newest version of the JDK, but this did not help. What could be the problem here? What should I do? I really want to get this genetic algorithm code running on other computers. I will paste the UsefulTools.findAndReplacewithRegEx code that I wrote just in case this information is important below. However, I do not understand how this could be causing a problem when it is not even used at the time when the program breaks. } The message is cutoff, because I didn't finish writing the rest. So what was the problem? The population.evolve() function made use of the fitness function I made which made use of graphmanager to calculate the search information entropy. This function tried to write output to a directory about what it was doing. However, the program would crash at this line: useful_tools.createTextFile("C:\\Users\\kurtw_000\\Desktop\\temp", "network_analysis_output.txt", output_string); This was causing an error because on the other computers this directory/file path did not exist. I changed the filepath to one that did exist and everything worked great!