Re: Crash on rotate image



Thanks for trying all this out, by the way.

I've attached another patch to try if you would. I can't see how
f_transform_jpeg can return without setting an error or being true.
Maybe I'm missing something obvious.

cheers

Loz

On Fri, 2005-01-28 at 12:17 +0000, Matthew Kay wrote:
> > Could you change to two occurrences of 'ref' in your patched version
> > src/JpegUtils.cs to 'out'. Hopefully this time we'll see the error
> > message.
> 
> Done, but no discernable difference in the errors:
> 
> 
> pixbuf == null
> found item
> found item
> source_path=/home/matt/rummage/ruperttourphotos/dscf0071.jpg,
> destination_path=/home/matt/rummage/ruperttourphotos/dscf0071.jpg.tmp
> 
> Unhandled Exception: System.Exception: Exception of type
> System.Exception was thrown.
> in [0x00033] (at /usr/local/src/f-spot-0.0.6/src/JpegUtils.cs:60)
> JpegUtils:Transform (string,string,JpegUtils/TransformType)
> in [0x000bd] (at /usr/local/src/f-spot-0.0.6/src/RotateCommand.cs:50)
> RotateCommand:Execute (RotateCommand/Direction,Photo[])
> in [0x0001c] (at /usr/local/src/f-spot-0.0.6/src/MainWindow.cs:372)
> MainWindow:RotateSelectedPictures (RotateCommand/Direction)
> in [0x00002] (at /usr/local/src/f-spot-0.0.6/src/MainWindow.cs:1336)
> MainWindow:HandleRotate270Command (object,System.EventArgs)
> in <0x00069> (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_object_EventArgs
> (object,System.EventArgs)
> in <0x0012d> GtkSharp.voidObjectSignal:voidObjectCallback (intptr,int)
> in <0x0005a> (wrapper native-to-managed)
> GtkSharp.voidObjectSignal:voidObjectCallback (intptr,int)
> in (unmanaged) (wrapper managed-to-native) Gtk.Application:gtk_main ()
> in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main ()
> in <0x00007> Gtk.Application:Run ()
> in <0x00007> Gnome.Program:Run ()
> in [0x00076] (at /usr/local/src/f-spot-0.0.6/src/main.cs:30) Driver:Main
> (string[])
> 
> 
-- 
Laurence Hygate <loz flower powernet co uk>
Index: libfspot/f-jpeg-utils.c
===================================================================
RCS file: /cvs/gnome/f-spot/libfspot/f-jpeg-utils.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 f-jpeg-utils.c
--- libfspot/f-jpeg-utils.c	8 Nov 2003 06:52:42 -0000	1.1.1.1
+++ libfspot/f-jpeg-utils.c	28 Jan 2005 12:45:28 -0000
@@ -417,8 +417,10 @@ f_transform_jpeg  (const char      *sour
 	/* Since the error reporting of jpegtran sucks, check at least that the source
 	   file exists.  */
 	if (! g_file_test (source_path, G_FILE_TEST_EXISTS)) {
-		if (error_message_return != NULL)
+		if (error_message_return != NULL) 
 			*error_message_return = g_strdup (_("File not found"));
+
+		g_warning ("File not found");
 		return FALSE;
 	}
 
@@ -442,6 +444,7 @@ f_transform_jpeg  (const char      *sour
 		g_warning (G_GNUC_FUNCTION ": unknown transform type %d", transform);
 		if (error_message_return != NULL)
 			*error_message_return = g_strdup_printf (_("Unknown transform type %d"), transform);
+		g_warning ("Unknown transformation type");
 		return FALSE;
 	}
 
@@ -450,6 +453,7 @@ f_transform_jpeg  (const char      *sour
 	if (jpegtran ((char *) source_path, (char *) destination_path, jpegtran_transform) != 0) {
 		if (error_message_return != NULL)
 			*error_message_return = g_strdup (_("Operation failed"));
+		g_warning ("Operation failed");
 		return FALSE;
 	}
 
@@ -458,5 +462,6 @@ f_transform_jpeg  (const char      *sour
 	    || transform == F_JPEG_TRANSFORM_ROTATE_90)
 		swap_xy_exif_fields (destination_path);
 
+	g_warning ("About to return true...");
 	return TRUE;
 }


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