[TT-RSS 1.8] gd warning with memory allocation

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
rutgerw
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 28 Mar 2013, 23:23

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby rutgerw » 14 Jun 2013, 00:06

The function call that causes this warning is found in include/colors.php, function colorPalette. $img = imagecreatefromstring(file_get_contents($imageFile));

For example (some icons that I found in my feed-icons directory):

Code: Select all

$img = imagecreatefromstring(file_get_contents('http://distrowatch.com/favicon.ico'));
// or
$img = imagecreatefromstring(file_get_contents('http://www.codinghorror.com/favicon.ico'));


also gives this error. Installed PHP version = 5.3.10, GD version = 2.0

As a workaround, I put floIcon.php back in the lib/ directory. If floIcon.php is present, imagecreatefromstring is not used.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby fox » 14 Jun 2013, 00:15

Add something like that to the imagecreatefromstring bit:

Code: Select all

$er = error_reporting(0);
$img = @imagecreatefromstring(....)
error_reporting($er);

rutgerw
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 28 Mar 2013, 23:23

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby rutgerw » 14 Jun 2013, 00:43

No no luck. Two error messages are suppressed ('Passed data is not in 'WBMP' format', 'Couldn't create GD Image Stream out of Data'), but the "gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully" warning is not suppressed. Also tried ini_set('display_errors',0); but still, this message is displayed.

For some reason this message is always sent to STDERR, regardless of PHP's error settings.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby fox » 14 Jun 2013, 08:53

Hmm, what if we try checking imagesize data better.

E.g.

Code: Select all

    } else if ($size[0] > 0 && $size[1] > 0) {
        $img = @imagecreatefromstring(file_get_contents($imageFile));
    }

rutgerw
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 28 Mar 2013, 23:23

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby rutgerw » 14 Jun 2013, 10:44

Doesn't work either: the image size is returned correctly. But imagecreatefromstring() still writes that error message.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby fox » 14 Jun 2013, 10:49

This looks like something is broken with your GD, I'm not sure what I can do about it then. :(

You can always disable this particular bit of code, you won't get fancy colored feed badges, but it's not like they are particularly important. Either that or ignore the warning.

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby Andyt8 » 14 Jun 2013, 11:59

fox wrote:>Ok, that means, it affects all feeds.

It does? Then your GD is somehow broken or for some reason you don't have enough PHP working memory for it.


I wasn't able to check 100% all icons. At the moment it looks like, that the most of them produce the error.

fox wrote:

Code: Select all

    } else if ($size[0] > 0 && $size[1] > 0) {
        $img = @imagecreatefromstring(file_get_contents($imageFile));
    }

Didn't help. The same problem again.


According to my second post - the missing floicon files solves the problem as a workaround...


I use the following:
PHP Version : 5.4.11
PHP Memory Limit : 128
GD Version : bundled (2.0.34 compatible)
FreeType Support : Ja
FreeType Linkage : with freetype
T1Lib Support : Nein
GIF Read Support : Ja
GIF Create Support : Ja
JPEG Support : Ja
PNG Support : Ja
WBMP Support : Ja
XPM Support : Ja
XBM Support : Ja
JIS-mapped Japanese Font Support : Nein


Don't know how I'm able to give you more information?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby fox » 14 Jun 2013, 12:18

I'll change it so ms icons are not passed to gd since it can't parse them anyway

Sent from my GT-I9300 using Tapatalk 2

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby fox » 15 Jun 2013, 13:16


rutgerw
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 28 Mar 2013, 23:23

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby rutgerw » 16 Jun 2013, 22:57

Thanks. The GD warning is now gone.

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: [TT-RSS 1.8] gd warning with memory allocation

Postby Andyt8 » 18 Jun 2013, 08:32

Thanks, it work for me - there are no GD warning, but I get an empty email every run through cronjob. I use "--quiet" - is that an other problem or is it possible that it has something to do with the changes?

Before my upgrade from 1.7.9 to 1.8 - there were no empty emails...


Return to “Support”

Who is online

Users browsing this forum: No registered users and 8 guests