Comments (7)
Seems to occur in file tree_reader.cpp, line 65:
else if (nextChar == ';') {
keepGoing = false;
}
This is the only exit I can see. Should have a condition:
if (nextChar == null) {
Yell at user.
}
Better yet, as we discussed, perhaps deal with the length of the tree string.
int counter = 0;
int treeLength = tree.size();
bool semicolonEncountered = false;
while (counter < (treeLength - 1)) { // iterate through the characters in the tree string
Do stuff...
counter ++;
}
if (!semicolonEncountered) {
cout << "You messed up, yo." << endl;
exit(0);
}
from treepl.
Noticed the exact same code is in treemachine, despite being in java. Java doesn't do the infinite loop thing when a semicolon is missing, but crashes with informative error.
from treepl.
For what it is worth, I patched this in treemachine:
// pb is the newick tree string
if (pb.charAt(pb.length() - 1) != ';') {
System.out.println("Tree is invalid: missing concluding semicolon. Exiting.");
System.exit(1);
}
from treepl.
look good. I will get this in treepl this weekend
On Wed, Mar 13, 2013 at 4:11 PM, Joseph W. Brown
[email protected]:
I patched this in treemachinehttps://github.com/OpenTreeOfLife/treemachine/blob/master/src/main/java/jade/tree/TreeReader.java:
// pb is the newick tree string
if (pb.charAt(pb.length() - 1) != ';') {
System.out.println("Tree is invalid: missing concluding semicolon.
Exiting.");
System.exit(1);
}—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-14865561
.
from treepl.
I've fixed this in a pull request I just sent.
from treepl.
Okay, in pull request #9
from treepl.
thanks
On Tue, Apr 15, 2014 at 8:07 AM, Joseph W. Brown
[email protected]:
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-40473851
.
from treepl.
Related Issues (20)
- Tree is invalid: missing concluding semicolon HOT 7
- segmentation fault HOT 2
- What exactly does "linear search failed" mean in terms of tree quality? HOT 4
- Unstable smooth values
- CV hanging HOT 1
- Writing a for loop for treepl? HOT 2
- Confidence Intervals: Bayesian vs ML
- treepl: command not found HOT 1
- Problem with mrca and tiny branch length at internal node. HOT 1
- Treepl+RaxML replicate trees HOT 1
- Installation problem
- treePL not following age calibrations HOT 4
- R script to check consistency of calibrations for 100 large trees (~3,000 taxa)? HOT 22
- Is there a license? HOT 1
- How to call treePL ?? HOT 11
- Segmentation fault (core dumped) when using prime
- Failed setting feasible start rates/dates after 10 attempts. Aborting. HOT 8
- The root time is biased towards the maximum time of the fossil which calibrated to the root. HOT 3
- Large variation among different replicates but with same parameters
- Installation issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from treepl.