CRC mismatch error when activating square thumb module

perl

Joined: 2005-03-14
Posts: 10
Posted: Sat, 2005-04-16 13:53

Greetings,

Hoping that you can shed some light on this problem I have. When trying to activate the square thumb module after just having upgraded from beta 1 to beta 2 I get the following error (square thumbs were working before the upgrade):

Error Detail -
Error (ERROR_COLLISION, ERROR_UNKNOWN) : CRC mismatch: 340908721 != 3155881288, or Mime type mismatch: !=

* in modules/core/classes/helpers/GalleryToolkitHelper_medium.class at line 114 (gallerystatus::error)
* in modules/core/classes/GalleryCoreApi.class at line 1714 (gallerytoolkithelper_medium::registeroperation)
* in modules/squarethumb/module.inc at line 97 (gallerycoreapi::registertoolkitoperation)
* in modules/core/AdminModules.inc at line 108 (squarethumbmodule::activate)
* in main.php at line 177 (adminmodulescontroller::handlerequest)
* in main.php at line 79
* in main.php at line 70

System Information
Gallery version 2.0-beta-2
PHP version 4.3.10 apache2handler
Webserver Apache/2.0.52 (Fedora)
Database mysql 3.23.58
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux fedora.link.mine.nu 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1

 
perl

Joined: 2005-03-14
Posts: 10
Posted: Sat, 2005-04-16 14:46

Looked around some more and understand that this apparently has to do with the toolkit registration. I am not claiming to understand how this all works, but figured that the following information might be useful to debug the problem further:

Please let me know if more information is needed.

mysql> select * from g2_TkOperatnMap;
+-----------------------+-----------------+------------------+---------------------------------------------+
| g_name                | g_parametersCrc | g_outputMimeType | g_description                               |
+-----------------------+-----------------+------------------+---------------------------------------------+
| convert-to-image/jpeg | 0               | image/jpeg       | Convert to a JPEG                           |
| scale                 | 340908721       | NULL             | Scale the image to the target size          |
| thumbnail             | 340908721       | NULL             | Scale the image to the target size          |
| resize                | 3155881288      | NULL             | Resize the image to the target dimensions   |
| rotate                | 340908721       | NULL             | Rotate the image                            |
| crop                  | 729751051       | NULL             | Crop the image                              |
| composite             | 1204337430      | NULL             | Overlay source image with a second one      |
| convert-to-image/png  | 0               | image/png        | Convert to image/png                        |
| convert-to-image/gif  | 0               | image/gif        | Convert to image/gif                        |
| convert-to-image/tiff | 0               | image/tiff       | Convert to image/tiff                       |
| select-page           | 340908721       |                  | Select a single page from a multi-page file |
+-----------------------+-----------------+------------------+---------------------------------------------+
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-04-18 06:08

This is a bug :-(. Deactivate all your toolkits (netpbm, imagemagick, gd) and reactivate them and it should work again.

 
perl

Joined: 2005-03-14
Posts: 10
Posted: Mon, 2005-04-18 12:00

I got the square thumbnail module activated by updating the CRC value of 'scale', 'thumbnail' and 'rotate' to 3155881288, but I have no idea about what else I may have broken in the process, so I will do what you suggest.

Thanks for the answer and the good job you are doing.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-18 16:35

haha, i intended to leave this item in the known issues section of the README for beta-2 but bharat removed it :)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-04-18 17:14

Perl, that's probably fine. If you have toolkit related problems in the future, you could try what I suggested above.

mindless, I removed it because I didn't want to maintain that known issue forever and I hopefully figured that the problem might not happen too often any more. Perhaps we should look for the old CRC value and just manually update it to the new one as part of a core upgrade? If it works for Perl it should work for everybody :-)

 
perl

Joined: 2005-03-14
Posts: 10
Posted: Mon, 2005-04-18 18:59

I like that logic. If it works for me it should work for everybody ;-)

Thanks again guys for the great work. I really enjoy looking at your code.