Piotr A. Dybczyński wrote:

> Hello,
> 
> Lyx is GREAT, but...
> 
> after I have switched from lyx 1.2.2 to 1.3.1 I cannot display in Lyx some
> of my old lyx files.
> 
> Lyx crashes when loading (after successfully converted) some *.ps graphics
> files. Sometimes such files are shown correctly but any attempt to rotate
> the image causes imediately lyx crash. The example of debug output when
> crashing during image display is shown below:

Hello Piotr.
I believe that you have found a bug in the xforms GUI library which is 
triggered when attempting to rotate grayscale images by 90degree multiples. 
If you have the xforms source code, then the crash is fixed by the attached 
patch. I have submitted this patch to xforms.

If you cannot patch the xforms source, then the available workarounds are:
1. Rotate the image outside of LyX and load that.
2. Use the Qt frontend ;-)

Best regards,
-- 
Angus
diff -u release/image/image_rotate.c angus/image/image_rotate.c
--- release/image/image_rotate.c	2002-06-03 20:52:08.000000000 +0000
+++ angus/image/image_rotate.c	2003-03-25 13:25:00.000000000 +0000
@@ -72,10 +72,19 @@
 	    g = rotate_matrix(im->green, im->h, im->w, deg, sizeof(**im->red));
 	    b = rotate_matrix(im->blue, im->h, im->w, deg, sizeof(**im->red));
 	}
-	else
+	else if (im->type == FL_IMAGE_GRAY)
+	{
+	    r = rotate_matrix(im->gray, im->h, im->w, deg, sizeof(**im->gray));
+	}
+	else if (im->type == FL_IMAGE_CI)
 	{
 	    r = rotate_matrix(im->ci, im->h, im->w, deg, sizeof(**im->ci));
 	}
+	else
+	{
+	    M_err("flimage_rotate", "InternalError: unsupported image type\n");
+	    return -1;	    
+	}
 
 	if ((deg % 180) == 0)
 	{

Reply via email to