Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not seek in XCF file
#6
You are hitting a strange bug. There is only one place in the Gimp code where this message occurs, it is this very small function, that calls the fseek() system API.
Code:
gboolean
xcf_seek_pos (XcfInfo  *info,
             guint     pos,
             GError  **error)
{
 if (info->cp != pos)
   {
     info->cp = pos;
     if (fseek (info->fp, info->cp, SEEK_SET) == -1)
       {
         g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
                      _("Could not seek in XCF file: %s"),
                      g_strerror (errno));

         return FALSE;
       }
   }

 return TRUE;
}

There are only two ways to make it return the "invalid argument" message:
  • use an invalid seek type (but since SEEK_SET is hardcoded that can't be it)
  • use a negative value...
There is some chance that the seek value held in a 32-bit number is seen as negative when it is bigger than 2GB. So maybe you file would actually be a bit bigger than 2GB and hit that possible problem. As a work around you can maybe save the file in two halves, the top half of layers and the bottom half (and later use File>Open to open the bottom layers and use File>Open as layers to add the top half.

If the cumulated sizes of the two files is bigger than 2GB, you have a good candidate for a bug report on http://bugzilla.gnome.org.
Reply


Messages In This Thread
Could not seek in XCF file - by nbeaudet - 10-16-2016, 08:47 AM
RE: Could not seek in XCF file - by rich2005 - 10-16-2016, 09:31 AM
RE: Could not seek in XCF file - by nbeaudet - 10-16-2016, 02:53 PM
RE: Could not seek in XCF file - by Ofnuts - 10-16-2016, 09:31 AM
RE: Could not seek in XCF file - by rich2005 - 10-16-2016, 05:47 PM
RE: Could not seek in XCF file - by Ofnuts - 10-16-2016, 07:10 PM
RE: Could not seek in XCF file - by nbeaudet - 10-17-2016, 07:27 AM

Forum Jump: