-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when trying to insert a large String #15
Comments
I will look at it. I think there is error in validation function. Do you see infinite loop in some reasonable size string which can be debugged?
Hi,You have done a wonderful job in the implementation. However, when I try to insert a large String (I can provide the test string) It throws the following exception. It never completed inserting the full string.Exception in thread "main" java.lang.NullPointerException |
Hi, The exception is generated when the nextChar(int i) function try to access the start value of the activeNode child at the line: return input[active.activeNode.child[input[active.activeEdge]].start + active.activeLength]; (last return statement in the else block in the nextChar function) At this line the "active.activeNode.child[input[active.activeEdge]]" is null for sum reason and that failed the tree creation. I did not see any infinite loops though. |
I meant do you have a smaller example where you get NPE instead of this 63K long string. |
Sorry, I did not get any NPE with smaller strings that I tried with. If I come across one I will let you know. |
fixed some bugs. Probably that will fix this issue. |
Hi,
You have done a wonderful job in the implementation. However, when I try to insert a large String (I can provide the test string) It throws the following exception. It never completed inserting the full string.
Exception in thread "main" java.lang.NullPointerException
at SuffixTree.nextChar(SuffixTree.java:426)
at SuffixTree.startPhase(SuffixTree.java:322)
at SuffixTree.build(SuffixTree.java:143)
at SuffixTree.main(SuffixTree.java:101)
The string I was trying to insert was 63027 in length. However, another large string with a length of 63067 inserted without any errors (I can provide this test string as well).
However, the second large string failed at your validation function;
Failed at 58 for index 56
Failed validation
false
I was trying to debug it but couldn't track it down. Wanted to bring it to your attention. Thanks.
The text was updated successfully, but these errors were encountered: