You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work as support for a HPC cluster and this bug has affected one of our users, so I won't be able to provide the exact specifics. Long story short, the user reports that for a high enough value of ploidy (20-50), they start getting null pointer exception errors. Here we can see an example of how they launch the program:
And this is the stack trace obtained when it fails:
java.lang.NullPointerException: Cannot invoke "org.broadinstitute.hellbender.utils.logging.OneShotLogger.warn(String)" because "this.oneShotLogger" is null
at org.broadinstitute.hellbender.tools.walkers.genotyper.GenotypingEngine.calculateGenotypes(GenotypingEngine.java:147)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCallerGenotypingEngine.assignGenotypeLikelihoods(HaplotypeCallerGenotypingEngine.java:219)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCallerEngine.callRegion(HaplotypeCallerEngine.java:700)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCaller.apply(HaplotypeCaller.java:273)
at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.processReadShard(AssemblyRegionWalker.java:200)
at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.traverse(AssemblyRegionWalker.java:173)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1085)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:140)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:192)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:211)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
at org.broadinstitute.hellbender.Main.main(Main.java:289)
The user mentioned that this didn't happen on GATK 4.1, so I've been comparing both versions of the code. It turns out that the implementation of "GenotypingEngine.java" has changed since then, and after some digging, I noticed that the issue is that the newer versions have uninitialized instances of the class "OneShotLogger".
The fix is simple, I've added the change myself and built GATK again. The user reports that the issue is gone. Just add the following code inside the constructor method:
protected GenotypingEngine(final Config configuration,
final SampleList samples,
final boolean doAlleleSpecificCalcs) {
this.configuration = Utils.nonNull(configuration, "the configuration cannot be null");
Utils.validate(!samples.asListOfSamples().isEmpty(), "the sample list cannot be null or empty");
this.samples = samples;
this.doAlleleSpecificCalcs = doAlleleSpecificCalcs;
logger = LogManager.getLogger(getClass());
this.oneShotLogger = new OneShotLogger(logger); // <------ ADD THIS LINE
numberOfGenomes = this.samples.numberOfSamples() * configuration.genotypeArgs.samplePloidy;
alleleFrequencyCalculator = AlleleFrequencyCalculator.makeCalculator(configuration.genotypeArgs);
}
Steps to reproduce
See description, but I can't provide the exact inputs used for it.
Expected behavior
The null pointer exception shouldn't occur, there should be a warning only.
Actual behavior
Program crashes with null pointer exception for high enough values of ploidy.
The text was updated successfully, but these errors were encountered:
Bug Report
Affected tool(s) or class(es)
Bug when this line is executed:
gatk/src/main/java/org/broadinstitute/hellbender/tools/walkers/genotyper/GenotypingEngine.java
Line 147 in 9f77b1f
Casued because attribute "oneShotLogger" is uninitialized. See line (
gatk/src/main/java/org/broadinstitute/hellbender/tools/walkers/genotyper/GenotypingEngine.java
Line 42 in 9f77b1f
gatk/src/main/java/org/broadinstitute/hellbender/tools/walkers/genotyper/GenotypingEngine.java
Line 65 in 9f77b1f
Affected version(s)
Description
I work as support for a HPC cluster and this bug has affected one of our users, so I won't be able to provide the exact specifics. Long story short, the user reports that for a high enough value of ploidy (20-50), they start getting null pointer exception errors. Here we can see an example of how they launch the program:
And this is the stack trace obtained when it fails:
The user mentioned that this didn't happen on GATK 4.1, so I've been comparing both versions of the code. It turns out that the implementation of "GenotypingEngine.java" has changed since then, and after some digging, I noticed that the issue is that the newer versions have uninitialized instances of the class "OneShotLogger".
The fix is simple, I've added the change myself and built GATK again. The user reports that the issue is gone. Just add the following code inside the constructor method:
Steps to reproduce
See description, but I can't provide the exact inputs used for it.
Expected behavior
The null pointer exception shouldn't occur, there should be a warning only.
Actual behavior
Program crashes with null pointer exception for high enough values of ploidy.
The text was updated successfully, but these errors were encountered: