Skip Menu |

This queue is for tickets about the Tree-Suffix CPAN distribution.

Report information
The Basics
Id: 19305
Status: rejected
Priority: 0/
Queue: Tree-Suffix

People
Owner: Nobody in particular
Requestors: wolfgang.bergner [...] web.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.14
Fixed in: (no value)



Subject: Strange characters at the end of strings
Hi gray, I don't know if this is my fault or not, it would be great if you'd have a look at this. I just added couple of strings to an array: my @arr = ('acute onset', 'acoa aneurysms', 'acute subarachnoid', 'age range', 'aneurysmal formation', 'acute period'); Then I added this to a Tree::Suffix my $tree = Tree::Suffix->new(@arr); When I now print all the strings in the tree with... foreach ($tree->strings) { print $tree->string($_), "\n"; } ...I get a weird output, i.e. at the end of some strings appears a strange character. E.g.: acoa aneurysms acute onset -> acute period<89> acute subarachnoid age range -> aneurysmal formation^Y I don't really see what could be wrong with my little code snippet, so do you think this could be a bug? Would be great if you could help me fast, since I could use this for my thesis which I have to finish in only 5 weeks (I know, this is not your problem). Thanks a lot! Wolfgang
From: gray [...] cpan.org
On Wed May 17 09:32:00 2006, guest wrote: Show quoted text
> Hi gray, > > I don't know if this is my fault or not, it would be great if you'd have > a look at this. > > I just added couple of strings to an array: > my @arr = ('acute onset', 'acoa aneurysms', 'acute subarachnoid', > 'age range', 'aneurysmal formation', 'acute period'); > > Then I added this to a Tree::Suffix > my $tree = Tree::Suffix->new(@arr); > > When I now print all the strings in the tree with... > foreach ($tree->strings) { > print $tree->string($_), "\n"; > } > > ...I get a weird output, i.e. at the end of some strings appears a > strange character. E.g.: > acoa aneurysms > acute onset > -> acute period<89> > acute subarachnoid > age range > -> aneurysmal formation^Y > > I don't really see what could be wrong with my little code snippet, so > do you think this could be a bug? Would be great if you could help me > fast, since I could use this for my thesis which I have to finish in > only 5 weeks (I know, this is not your problem).
My first thought is your problem could be platform-specific. Did you run `make test` when installing the module and if so, were all tests successfull? The problem could also lie in the libstree library, to which this module binds. Can you run the tests included in the source for that library.
From: mail [...] maasha.dk
I am having problems here also - it actually renders the module completely useless so this is indeed a severe bug! I am attaching a small test script to this bugreport. On my system the output is: $VAR1 = [ 'gcggagccaactggagctgatcgaaccggaaccgac¹' ]; note that superscript 1 at the end!!! To me it looks like some pointer is overshooting somewhere and garble from them memory is inserted by mistake. I can't tell if this is a bug in Tree::Suffix, libstree, Perl, or my OS. I am running: Tree::Suffix 0.14 libstree-0.4.2 Perl 5.8.4 Debian/Linux Martin Debian/Linux 3 On Wed May 17 13:41:29 2006, GRAY wrote: Show quoted text
> On Wed May 17 09:32:00 2006, guest wrote:
> > Hi gray, > > > > I don't know if this is my fault or not, it would be great if you'd have > > a look at this. > > > > I just added couple of strings to an array: > > my @arr = ('acute onset', 'acoa aneurysms', 'acute subarachnoid', > > 'age range', 'aneurysmal formation', 'acute period'); > > > > Then I added this to a Tree::Suffix > > my $tree = Tree::Suffix->new(@arr); > > > > When I now print all the strings in the tree with... > > foreach ($tree->strings) { > > print $tree->string($_), "\n"; > > } > > > > ...I get a weird output, i.e. at the end of some strings appears a > > strange character. E.g.: > > acoa aneurysms > > acute onset > > -> acute period<89> > > acute subarachnoid > > age range > > -> aneurysmal formation^Y > > > > I don't really see what could be wrong with my little code snippet, so > > do you think this could be a bug? Would be great if you could help me > > fast, since I could use this for my thesis which I have to finish in > > only 5 weeks (I know, this is not your problem).
> > My first thought is your problem could be platform-specific. Did you run > `make test` when installing the module and if so, were all tests > successfull? The problem could also lie in the libstree library, to > which this module binds. Can you run the tests included in the source > for that library.
Download test_stree
application/octet-stream 1.4k

Message body not shown because it is not plain text.

From: gray [...] cpan.org
On Tue Oct 24 13:47:37 2006, maasha wrote: Show quoted text
> I am having problems here also - it actually renders the module > completely useless so this is indeed a severe bug! > > I am attaching a small test script to this bugreport. > > On my system the output is: > > $VAR1 = [ > 'gcggagccaactggagctgatcgaaccggaaccgac¹' > ]; > > note that superscript 1 at the end!!! > > To me it looks like some pointer is overshooting somewhere and garble > from them memory is inserted by mistake. I can't tell if this is a bug > in Tree::Suffix, libstree, Perl, or my OS. > > I am running: > Tree::Suffix 0.14 > libstree-0.4.2 > Perl 5.8.4 > Debian/Linux > > Martin > Debian/Linux 3 > >
> > My first thought is your problem could be platform-specific. Did you run > > `make test` when installing the module and if so, were all tests > > successfull? The problem could also lie in the libstree library, to > > which this module binds. Can you run the tests included in the source > > for that library.
>
Try testing libstree itself- it includes a directory of tests. You can plug your inputs into the test program lcstext. This seems like a platform-specific issue since I have not seen this problem on Mac OS X. If it is a problem with the libstree, the author doesn't seem to be supporting it anymore.
i asked the author if the library is abandonware and replied that he'd accept patches for the bugs. so i'm betting it won't be fixed unless somebody else does it. On Tue Oct 24 14:07:08 2006, GRAY wrote: Show quoted text
> If it is a problem with the libstree, the author doesn't seem to be > supporting it anymore.
On Tue Oct 24 14:07:08 2006, GRAY wrote: Show quoted text
> Try testing libstree itself- it includes a directory of tests. You can > plug your inputs into the test program lcstext.
We're hitting the same problem on multiple Linux (Ubuntu) boxes. The problem appears to be in libstree itself, in libstree 0.4.2 and 0.4.3. We run the libstree test program like so: /opt/libstree-0.4.2/test/lrstext GTTGTTGCTGATCACGAGCGCTGGGATGTCGAGCGCGGCCAGGACGGC GCCGTCCTCGTCCGCCACGATCACGATCTGCGGCGTCGCCAGGCCGGGCACCGTCTCGACGGTGGTCAGCACACGGCCCCGGTGGAGCCAGGCTCTGACCTGGTCGCCCGG GCCGTCATCGTCGGCCACGATCACAATGTGCGACGTTGACTGATCCGGCACCGGCCGGGCCGTGGAGGCCACCCGGTGCCGCTCTAACCAGGCCTGGATTTGGACCCC CGGGGCGATGAGGACGTTGGTGACGAGCTCGGCGCGGTGCGCCCAGGTCGTCACCGCGTCTCCCGG GACCAGCAGTGGCACGCTGGGCGTCCGCGCGGCCTGGATGGCCCGGATCGCGGCCGGTTCGATTACCTTGTAGCAGTCGACGTAGGCGTAGGAGGCCCTGGCCAGCGGTGCAAGGTCGACCGCGGTCAGGGCCTCGGCGACTCCTTGTAGGTACGG CGGAACCCCTGCCCGGCGGGCGGCCTCGATGGCGCGGAGGCTTGCTGGTTCGATGAGCTGGTAGCAGTCCACATAGGCGAAGGATGCCGAGGCCAGCGGTGTGAGGTCCACGGCCATCAGCCCATCCAGTACCCCGGGCAGGTACGG GGTGACTACCACCCACGAAGCTCCGGTCTGGCCCAGCAGGGTGGCGGCTACGGCCGGGGCAGTTTCGTGCGCGTCGTCGTCGACGTTGGTCTGGATGATCAGATCCGGGCAGTCCCGGAGGACGGACGCCACCATCGGTGTGAGGAC CGTGACCACCACCCAGGAGGCCCGGGTCTGGCTCCGCAGGGAGGCCGCCGTCGCCAGGGCCTCCCCGTGCGCGGCGTCGTCCACGTTCGTCTGGATCACCAGCAGTTCCGGCCAATCCCGGAGCGCGGAAGCCACCTCCGG GCGGACGGCCGCCGGTAGCTGATCCAGCGATTCACCGCACGCCAGCAGTTCCGTGAGATGCGGCAGCGGTTCGTGGTGGGCTCGCGCACACCGGAGCCCACCACTGGC GCCGTCCTGGCCGCGCTCGACATCCCAGCGCTCGTGATCAGCAACAAC CCGGGCGACCAGGTCAGAGCCTGGCTCCACCGGGGCCGTGTGCTGACCACCGTCGAGACGGTGCCCGGCCTGGCGACGCCGCAGATCGTGATCGTGGCGGACGAGGACGGC GGGGTCCAAATCCAGGCCTGGTTAGAGCGGCACCGGGTGGCCTCCACGGCCCGGCCGGTGCCGGATCAGTCAACGTCGCACATTGTGATCGTGGCCGACGATGACGGC CCGGGAGACGCGGTGACGACCTGGGCGCACCGCGCCGAGCTCGTCACCAACGTCCTCATCGCCCCG CCGTACCTACAAGGAGTCGCCGAGGCCCTGACCGCGGTCGACCTTGCACCGCTGGCCAGGGCCTCCTACGCCTACGTCGACTGCTACAAGGTAATCGAACCGGCCGCGATCCGGGCCATCCAGGCCGCGCGGACGCCCAGCGTGCCACTGCTGGTC CCGTACCTGCCCGGGGTACTGGATGGGCTGATGGCCGTGGACCTCACACCGCTGGCCTCGGCATCCTTCGCCTATGTGGACTGCTACCAGCTCATCGAACCAGCAAGCCTCCGCGCCATCGAGGCCGCCCGCCGGGCAGGGGTTCCG GTCCTCACACCGATGGTGGCGTCCGTCCTCCGGGACTGCCCGGATCTGATCATCCAGACCAACGTCGACGACGACGCGCACGAAACTGCCCCGGCCGTAGCCGCCACCCTGCTGGGCCAGACCGGAGCTTCGTGGGTGGTAGTCACC CCGGAGGTGGCTTCCGCGCTCCGGGATTGGCCGGAACTGCTGGTGATCCAGACGAACGTGGACGACGCCGCGCACGGGGAGGCCCTGGCGACGGCGGCCTCCCTGCGGAGCCAGACCCGGGCCTCCTGGGTGGTGGTCACG GCCAGTGGTGGGCTCCGGTGTGCGCGAGCCCACCACGAACCGCTGCCGCATCTCACGGAACTGCTGGCGTGCGGTGAATCGCTGGATCAGCTACCGGCGGCCGTCCGC And get this output: GCCAGGGCCTCC^Q GGAGGCCCTGGC^Q CCAGCAGTTCCG) CGGAACTGCTGG^Q ( If that paste is corrupted you can check it out here: svn co https://clabsvn.ist.unomaha.edu/anonsvn/user/jhannah/UNO/JCVI/Project_C/tree_suffix_test file: 3.sh ) I don't have the C skills to fix libstree, and can't find any alternatives, in any language, anywhere near as convenient to use as Tree::Suffix! :( Thanks for the module... :) Wish we could use it... Thanks for your time, j # cat /etc/debian_version lenny/sid # uname -a Linux klab.ist.unomaha.edu 2.6.24-24-generic #1 SMP Wed Apr 15 15:54:25 UTC 2009 i686 GNU/Linux
From: asher.diamond [...] gmail.com
I found the problem in libstree in lst_string.c: lines 79 and 80: remove the '+ 1' *(index->end_index) - index->start_index /*+ 1*/); s[i][*(index->end_index) - index->start_index /*+ 1*/] = '\0'; and lrstext works and then Tree::Suffix->longest_repeated_substrings() no longer occasionally adds junk to the found string So, if anyone is still listening, and living, (hey, it's been awhile...) I did this on version 0.4.2 here is a short test case for libstree: lrstext 0 0 abcdefghijkl abcdefghijkl
On Thu Jan 03 15:59:28 2013, asher.diamond wrote: Show quoted text
> I found the problem in libstree > in lst_string.c:
This isn't the right place to address bugs in the libstree library. You should contact the author directly, but note that it's been abandonware for many years.