memory allocation problem with EXIF display memory allocation problem with EXIF display
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

memory allocation problem with EXIF display

Started by mathfeel, January 16, 2008, 10:25:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mathfeel

If I turn ON reading of EXIF tag, some of the picture would give this error:
Fatal error: Allowed memory size of 33,554,432 bytes exhausted (tried to allocate 330,825,729 bytes) in /home/zpzstudi/public_html/coppermine/include/makers/canon.php on line 603

Why would canon.php tries to allocate this large (300MB?) amount of memory??

Joachim Müller

Review the file with an Exif viewer application to find out (e.g. Exifer or similar). The additional exif information might be just the straw that breaks the camel's neck - review the sticky on the upload board to find out about resources consumption that can lead to an error message as the one you experienced.

mathfeel

Thanks, but what kind of extra EXIF information am I looking for?

Joachim Müller


DJMaze

Currently I'm researching Jpeg Metadata for a complete new metadata reader.
Because Exifer (and the other PHP lib PHP JPEG Metadata Toolkit) are old and unmaintained.

Due to that i discovered that Exifer, and even PHP Exif extension, have serious issues with array data.

Your Canon is probably a newer model (EOS/1D maybe?) which has several MakerNote fields that contain a large array with integers.
For example the ColorBalance1 tag contains 692 integers in a EOS 40D MkaerNote.
In total the EOS 40D contains 16 arrays from 3 up till 692 entries inside an array!

So probably Exifer crashes on that.

I have no idea how to fix it since i prefer to work on the new library, but maybe this info helps you to find a solution.
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

jabetcha

If anyone else is experiencing this problem, the solution I have found is to download the latest exifer library (now at version 1.7) from here:
http://www.zenphoto.org/trac/wiki/ExifixerLibrary

Make backups of include/exif.php and include/makers/*.php

Copy the new the exif.php to <copperminedir>/include
Copy the files from the makers/*.php  to <copperminedir>/include/makers

Joachim Müller

Thanks for posting this piece of information. Apparently, zenphoto is continuing Jake Olefsky's exif library, so it's definitely a good place to look into. We (coppermine devs) need to look into this as well.

jabetcha


jabetcha

I just checked the 1.4.19 release, and the latest version of this library is not included (still at v1.5). Do any of the devs know when you plan to update this library?

Joachim Müller

So far, nobody has volunteered to look into this. I have taken a note on the dev-only section of the board so this won't be forgotten. Probably won't go into any maintenance release of the cpg1.4.x series, but only (if at all) into cpg1.5.x.

jabetcha

Quote from: Joachim Müller on August 23, 2008, 08:03:37 AM
So far, nobody has volunteered to look into this. I have taken a note on the dev-only section of the board so this won't be forgotten. Probably won't go into any maintenance release of the cpg1.4.x series, but only (if at all) into cpg1.5.x.

Joachim,

I see from the main page that you are feature freezing 1.5x, but browsing the SVN repository, it still appears as if the old Exifer library is still being used. This causes Coppermine to FAIL when viewing thumbnails, normal size photos and full size when viewing any photos from a recent (3 years old or newer) Canon digital camera, if exif information is displayed. I consider this to be a serious BUG in coppermine that has not been addressed in several years.

I've replaced all the files, one-for-one, in the /include/makers directory with the latest exifer library, and my coppermine install has been working perfectly for over 2 years (except for when I upgrade and my files are overwritten!)

I would consider myself to be an extremely loyal coppermine user, and have been using it since pre-1.0 days, and submitted bugs and solutions to Grégory Demar, the creator of Coppermine.