acediff bug

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

acediff bug

Nicolas Thierry-Mieg
hi all,

I've run into what looks like a bug in acediff.
This happens with all versions I've tested, ie today's daily build and
the current supported build, both with dynamically linked binaries. I've
also tested the current supported static build, same result.
All of this, on linux (FC4, kernel 2.6.14-1.1656_FC4 on a pentium4 system)

Here is a tiny example to illustrate the problem:
$ more wspec/models.wrm
?Interaction Bait UNIQUE ?Text
              Prey UNIQUE ?Text
              fns

$ more test1.ace
Interaction : "test1"
Bait "bait1"
Prey "prey1"

$ more test2.ace
Interaction : "test1"
Bait "bait1"
Prey "prey1"
fns

$ ace.supported/acediff test1.ace test2.ace
reading file 1 - 4 lines read - sorting file 1
reading file 2 - 6 lines read - sorting file 2
performing diff - sorting diff
// acediff difference from test1.ace to test2.ace

Interaction "test1"
Prey "prey1"
fns
-D Prey "prey1"

// end of file


As you can see, acediff adds the Prey, then deletes it. After parsing
the acediff output, I've obviously lost my Prey info.


Funny thing is, if you replace "fns" with "Fns" it's OK...
But if you use a different tag you get strange behaviours.
eg, using "a_A", acediff also kills the Bait!
As far as I can tell (but I haven't tested it much), it works OK when
the tag starts with an uppercase letter.

Is something wrong with my files or ace binaries??

A+
nicolas


--
------------------------------------------------------------
Nicolas Thierry-Mieg
Laboratoire LSR-IMAG, BP 53, 38041 Grenoble Cedex 9, France
tel : (33/0)4-76-63-55-79, fax : (33/0)4-76-63-55-50
------------------------------------------------------------

_______________________________________________
Acedb mailing list
[hidden email]
http://www.bio.net/biomail/listinfo/acedb
Reply | Threaded
Open this post in threaded view
|

Re: acediff bug

Nicolas Thierry-Mieg
following up on the below bug report, here is a quick patch which makes
all -D lines appear first in the acediff output
The resulting diff file is still more heavy than it should be (ie it can
say "-D somedata" on one line and later add the same data back in the
object), but at least this prevents data loss...

On a side note, gcc 4.0 and later doesn't support -fwritable-strings, so
I had to remove this switch from wmake/LINUX_GTK2_4_DEF to compile
anything. This seems ok for acediff, but I'm not sure how this would
affect the rest of the code. Is this OK, or is it necessary to use gcc 3
to compile acedb?



Nicolas Thierry-Mieg wrote:

> hi all,
>
> I've run into what looks like a bug in acediff.
> This happens with all versions I've tested, ie today's daily build and
> the current supported build, both with dynamically linked binaries. I've
> also tested the current supported static build, same result.
> All of this, on linux (FC4, kernel 2.6.14-1.1656_FC4 on a pentium4 system)
>
> Here is a tiny example to illustrate the problem:
> $ more wspec/models.wrm
> ?Interaction Bait UNIQUE ?Text
>              Prey UNIQUE ?Text
>              fns
>
> $ more test1.ace
> Interaction : "test1"
> Bait "bait1"
> Prey "prey1"
>
> $ more test2.ace
> Interaction : "test1"
> Bait "bait1"
> Prey "prey1"
> fns
>
> $ ace.supported/acediff test1.ace test2.ace
> reading file 1 - 4 lines read - sorting file 1
> reading file 2 - 6 lines read - sorting file 2
> performing diff - sorting diff
> // acediff difference from test1.ace to test2.ace
>
> Interaction "test1"
> Prey "prey1"
> fns
> -D Prey "prey1"
>
> // end of file
>
>
> As you can see, acediff adds the Prey, then deletes it. After parsing
> the acediff output, I've obviously lost my Prey info.
>
>
> Funny thing is, if you replace "fns" with "Fns" it's OK...
> But if you use a different tag you get strange behaviours.
> eg, using "a_A", acediff also kills the Bait!
> As far as I can tell (but I haven't tested it much), it works OK when
> the tag starts with an uppercase letter.
>
> Is something wrong with my files or ace binaries??
>
> A+
> nicolas
>
>
--
------------------------------------------------------------
Problems with my digital signature? visit:
http://igc.services.cnrs.fr/Doc/General/trust.html
--------------------
Nicolas Thierry-Mieg
Laboratoire LSR-IMAG, BP 53, 38041 Grenoble Cedex 9, France
tel : (33/0)4-76-63-55-79, fax : (33/0)4-76-63-55-50
------------------------------------------------------------

diff -Naur ACEDB-source.daily.060224/wace/acediff.c ACEDB-source.daily.060224.patched/wace/acediff.c
--- ACEDB-source.daily.060224/wace/acediff.c 2003-06-24 01:30:10.000000000 +0200
+++ ACEDB-source.daily.060224.patched/wace/acediff.c 2006-02-24 17:09:35.000000000 +0100
@@ -337,7 +337,7 @@
        and advance consumed input streams */
       if (cmpClass < 0 || (cmpClass == 0  &&  cmpData < 0))
  {
-  if (fprintf (out, "%8d %s -D %s\n",
+  if (fprintf (out, "%08d %s -D %s\n",
        lineA, Text(obNameA), Text(dataA)) == 0)
     aceDiffAbort("IO error") ;
   getLine (inA, &lineA, obNameA, dataA) ;

_______________________________________________
Acedb mailing list
[hidden email]
http://www.bio.net/biomail/listinfo/acedb

smime.p7s (5K) Download Attachment