After installing the module, if i travel to any page with Avatar Gallery turned on, the whole site crashes and gives me a blank page. If I go to View-> Page source, there is nothing.

Comments

RockRat’s picture

I had this happen to my site too with the module installed.

torgospizza’s picture

If you turn on error reporting you might see this message:

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 650 bytes) in /sites/all/modules/avatar_gallery/avatar_gallery.module on line 348

This is what happens for me. I have php.ini setup to allow 48 megs of memory, there's no reason why the ImageCreateTrueColor use at line 348 should be using all of that memory. Not sure how to fix this, though, just thought I'd add my issue here, since it appears to be the same.

(You also get this error when uploading a new avatar with avatar gallery module turned on.

hokuspokus’s picture

This is often a memory issue; A.K.A. the White Screen of Death (WSOD). 48 meg may seem like a lot, but if you have image related modules enabled, it can chew through that amount in nothing flat. Increase your memory to over 100 meg and see what happens, and if it fixes it, you can try backing down a bit to see what is stable. One module (i think imagecache) recommends at least 96 meg, so 100 is not out of the question.

ozmex’s picture

i have mine set to 150Mb, trying to upload a 5k file, and still getting this error. could it be some other problem?

Fatal error: Allowed memory size of 157286400 bytes exhausted (tried to allocate 57070001 bytes) in /path/to/modules/avatar_gallery/avatar_gallery.module on line 350

torgospizza’s picture

Add this code to your index.php file (in Drupal root) and see what the errors are that it's throwing..

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
hokuspokus’s picture

Yes with this code you will get the errors printed out onscreen instead of just a white screen. Much more useful in diagnosing problems.

agileware’s picture

Title: SIte goes blank. » SIte goes blank. (Fatal error: Allowed memory size of 50331648 bytes exhausted - line 384 or 439)

This error is now on line 439 in the most recent version.

The problem is caused by the way this module works.
It creates one huge image with all the avatars joined together (WHY???).

The imagecreatetruecolor image is already known to be memory hungry but when you are trying to join together a couple of thousand avatars into one huge image you need enormous amounts of memory.
It just isn't a sensible thing to do unless you have very very few users.

This is why your site might have been working and then suddenly stop. Because each time a user joins it uses more memory than last time until your server can't cope.

Aside from this, I really can't see a use for this module. What is the point of having one big static image?

You would be better off with a view of all the avatars, that link back to the users profile or something. That might at least be useful.

So my recommendation is... Just don't use this module if you are running into this problem. Try Views.