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
Describe the bug
When using the dnConstrainedTopology distribution with nonclock trees (i.e., when the treeDistribution argument if of type Distribution__BranchLengthTree), a backbone constraint can only be employed when an initial tree is specified as well. If the initialTree argument is omitted, passing a constraint tree to the backbone argument will cause a segfault. For clock trees (i.e., when treeDistribution is of type Distribution__TimeTree), this doesn't happen – the analysis might fail to find a suitable initial state, but there will be no segfault.
I tried to investigate further using the backtrace functionality in GDB, but unfortunately, I'm not able to parse the output beyond seeing that the problem has to do with TopologyNode:
Thread 2 received signal SIGSEGV, Segmentation fault.
0x000000010436c9bc in std::__1::__tree<RevBayesCore::TopologyNode const*, std::__1::less<RevBayesCore::TopologyNode const*>, std::__1::allocator<RevBayesCore::TopologyNode const*> >::size (this=0x70) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__tree:1071
1071 const size_type& size() const _NOEXCEPT {return __pair3_.first();}
(gdb) backtrace
#0 0x000000010436c9bc in std::__1::__tree<RevBayesCore::TopologyNode const*, std::__1::less<RevBayesCore::TopologyNode const*>, std::__1::allocator<RevBayesCore::TopologyNode const*> >::size (this=0x70) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__tree:1071
#1 0x00007ff7bfef8940 in ?? ()
#2 0x000000010436e0f9 in std::__1::__compressed_pair<std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, RevBayesCore::TopologyNode*>, void*>*, std::__1::__tree_node_destructor<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, RevBayesCore::TopologyNode*>, void*> > > >::__compressed_pair<std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, RevBayesCore::TopologyNode*>, void*>*&, std::__1::__tree_node_destructor<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, RevBayesCore::TopologyNode*>, void*> > > > (this=0x70, __t1=@0x104fe7e70: 0x7ff84a646448, __t2=...)
at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__memory/compressed_pair.h:136
#3 0x0000000100005570 in ?? () at /usr/local/include/boost/program_options/options_description.hpp:191
#4 0x0000000000000000 in ?? ()
To Reproduce This zipped directory contains (1) an example dataset, (2) a single backbone tree (which can be read in either as a nonclock tree or as a clock tree), (3) initial trees for both nonclock and clock analyses, and (4) Rev scripts for both nonclock and clock analyses. One absolute path has to be changed in the scripts.
Expected behavior
It should be possibly to apply a backbone constraint to a nonclock analysis with or without also specifying an initial tree. Failure to supply an initial tree might prevent RevBayes from finding a suitable initial state on its own, but it should not cause a segfault.
Computer info
macOS 12.6.9, RevBayes 1.2.2, latest version of the development branch (rapture-2254-g0b59a0).
The text was updated successfully, but these errors were encountered:
Hmm, so the segfault no longer happens on development, which is good. However, without a starting tree, the nonclock analysis won't find a viable initial state (all likelihoods are either -inf or nan) if the backbone tree has more than 4 tips, which is still a pretty substantial problem.
bjoelle
changed the title
[BUG] Segfault w/ backbone constraints for nonclock trees unless initial tree is specified
[BUG] No valid initial state w/ backbone constraints for nonclock trees unless initial tree is specified
Apr 15, 2024
Describe the bug
When using the
dnConstrainedTopology
distribution with nonclock trees (i.e., when thetreeDistribution
argument if of typeDistribution__BranchLengthTree
), a backbone constraint can only be employed when an initial tree is specified as well. If theinitialTree
argument is omitted, passing a constraint tree to thebackbone
argument will cause a segfault. For clock trees (i.e., whentreeDistribution
is of typeDistribution__TimeTree
), this doesn't happen – the analysis might fail to find a suitable initial state, but there will be no segfault.I tried to investigate further using the backtrace functionality in GDB, but unfortunately, I'm not able to parse the output beyond seeing that the problem has to do with
TopologyNode
:To Reproduce
This zipped directory contains (1) an example dataset, (2) a single backbone tree (which can be read in either as a nonclock tree or as a clock tree), (3) initial trees for both nonclock and clock analyses, and (4) Rev scripts for both nonclock and clock analyses. One absolute path has to be changed in the scripts.
Expected behavior
It should be possibly to apply a backbone constraint to a nonclock analysis with or without also specifying an initial tree. Failure to supply an initial tree might prevent RevBayes from finding a suitable initial state on its own, but it should not cause a segfault.
Computer info
macOS 12.6.9, RevBayes 1.2.2, latest version of the
development
branch (rapture-2254-g0b59a0).The text was updated successfully, but these errors were encountered: