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
{{ message }}
Repository navigation
Beauti: Tip dates -> Clone from causes NullPointerException when trees are linked #171
When trying to Clone from in the Tip dates panel, Beauti seems to attmept copying the wrong partition. This becomes apparent when some partitions share the same tree, leading to a NullPointerException. This seems to affect the current 2.8 version, but also previous version (tested on 2.7.8).
Steps to reproduce
Import two alignments, split both by codon position (trees are linked within each alignment).
Tip Dates tab → select both partitions → Clone from.
Result
Nothing is cloned, and:
java.lang.NullPointerException: Cannot invoke "beast.base.evolution.tree.TreeInterface.getID()" because "tree" is null
at beastfx.app.inputeditor.BeautiPanel.cloneFrom(BeautiPanel.java:481)
at beastfx.app.beauti.ClonePartitionPanel.clonePartitions(ClonePartitionPanel.java:60)
Cause
cloneFrom computes source/target as indices into doc.getPartitions(type)
(= pPartition[i]) but dereferences them against likelihoods.pDistributions.get(). pPartition[i] is deduplicated by model (BeautiDoc.java:2108-2117); pDistributions holds
every likelihood. Unlinked they coincide, so the bug is invisible; linked they diverge and the
wrong likelihood is selected. It then shares the source's tree, so renameId maps the tree id
onto itself, the guard at BeautiDoc.java:2361 skips it, deepCopyPlugin returns null
(:2473), and cloneFrom dereferences it. The filtered list is always shorter, so the bad
index never goes out of bounds — it just picks the wrong element.
Activity
NicoNeureiter commentedon Sep 28, 2026
Solved with the suggested fix (PR #172 )