Skip to content

Commit d2a1fd0

Browse files
committed
MatchMaker: catch and suggest fix for StackOverflowError
This may occur in large studies (400K+) with many cases (20K+) when finding communities of cases.
1 parent 3a4c0cf commit d2a1fd0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/org/pankratzlab/internal/gwas/MatchMaker.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ private static List<Match> kdMatchMaker(Path baseDir, Path inputSamples, List<Sa
100100
KDMatch.writeToFile(optimizedMatches.stream(), outputOpt,
101101
setConvert.stream().toArray(String[]::new),
102102
setConvert.stream().toArray(String[]::new), finalNumSelect);
103+
} catch (StackOverflowError s1) {
104+
s1.printStackTrace();
105+
log.info("To potentially prevent this StackOverflowError, try increasing the Thread Stack Size with the -Xss argument passed to the java virtual machine (i.e. java -Xss10m)");
103106
} catch (InterruptedException e1) {
104107
e1.printStackTrace();
105108
} catch (ExecutionException e2) {

0 commit comments

Comments
 (0)