[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gnome-pim: Cannot open user-cal.vcf or GnomeCard.gcrd on PPC


I think I have the problem... it's a doozy. :-)

lexGetc is returning 255 for EOF instead of -1.  This is because
lexLookAhead is calling int lexGeta(), which returns the value from char
lexGetc().  In the cast from char to int, it gives 255 instead of -1, even
though the char is not unsigned.  On Intel and Alpha, it gives -1, which is
the correct behavior (right?).

The attached little test program illustrates this: on Intel and Alpha, it
stops at the end of the file; on PPC and ARM, it infinite loops.  Because
it is common to PPC and ARM, this is not related to endianness.

This is obviously not a gnome-pim problem, so I'm closing this bug.  This
would be a compiler issue, right?  Until this is fixed, it would appear
that everything using bison to parse files is broken on PPC and ARM.


-Adam P.

Adam C Powell IV wrote:

> Package: gnome-pim
> Version: 1.0.55-1
> Severity: normal
> gnomecal and gnomecard do not start on PPC.  strace shows them loading
> the file just fine using a read (8,"blahblah"..., 4096) = 4096 until the
> end of the file, then the length of the file remainder, then it loops
> on:
> read(8, "", 4096)                       = 0
> after it finishes loading the file.  If there is no file, then it starts
> fine and one can make a calendar and address book, but after quitting
> and saving, neither of them can start again, because they infinite loop
> while trying to load the file, even if it's just eighty characters long.
> This has been a problem for a long time (like, months).  It just came up
> today on debian-powerpc that gnomecal does indeed work, and we tried
> stracing.
> Thanks,
> -Aham P.
> -- System Information
> Debian Release: 2.2
> Kernel Version: Linux ebedmelech 2.2.15pre17-atydbg #1 Wed Apr 5
> 22:04:31 EDT 2000 ppc unknown
> Versions of the packages gnome-pim depends on:
> ii  gdk-imlib1     1.9.8-4        Gdk-Imlib is an imaging library for
> use with
> ii  libart2        1.0.56-3       The Gnome canvas widget
> ii  libaudiofile0  0.1.9-0.1      The Audiofile Library
> ii  libc6          2.1.3-8        GNU C Library: Shared libraries and
> Timezone
> ii  libesd0        0.2.17-7       Enlightened Sound Daemon - Shared
> libraries
> ii  libglib1.2     1.2.7-2        The GLib library of C routines
> ii  libgnome32     1.0.56-3       The Gnome libraries
> ii  libgnomesuppor 1.0.56-3       The Gnome libraries (Support
> libraries)
> ii  libgnomeui32   1.0.56-3       The Gnome libraries (User Interface)
> ii  libgnorba27    1.0.56-3       Gnome CORBA services
> ii  libgtk1.2      1.2.7-1        The GIMP Toolkit set of widgets for X
> ii  liborbit0      0.5.0-5        Libraries for ORBit - a CORBA ORB
> ii  xlib6g         3.3.6-6        shared libraries required by X clients
> ii  zlib1g         1.1.3-5        compression library - runtime
#include <stdio.h>

static char mygetc (FILE *the)
  return fgetc (the);

void main()
  FILE *f;
  int c;

  f = fopen ("killme.c","r");

  do {
    c = mygetc (f);
    printf ("|%d=%c", c,c); fflush (stdout);
  } while (c!=EOF);

Reply to: