owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.34k stars 2.05k forks source link

imagepng() expects parameter 1 to be resource #14036

Closed philfry closed 9 years ago

philfry commented 9 years ago

Hi,

pictures are showing up fine when using "files", but when trying to browse them using the gallery ("pictures") I only get the spinning circle.

The logs show:

"app":"PHP","message":"imagepng() expects parameter 1 to be resource, boolean given  at \/var\/www\/html\/owncloud\/lib\/private\/image.php#292","level":3,"time":"2015-02-10T10:22:51+00:00","method":"GET","url":"\/index.php\/apps\/gallery\/ajax\/thumbnail\/batch?token=&image=...
"app":"core","message":"OC_Image->data. Error getting image data.","level":3,"time":"2015-02-10T10:22:51+00:00","method":"GET","url":"\/index.php\/apps\/gallery\/ajax\/thumbnail\/batch?token=&image=...

Regards,

Phil

PVince81 commented 9 years ago

@icewind1991 @oparoz

oparoz commented 9 years ago

I think it's an issue with the Image class not properly checking the response it gets from the preview provider. I encountered the problem when working on the Preview class. @georgehrke

ghost commented 9 years ago

Very likely a duplicate of: https://github.com/owncloud/gallery/issues/158 (Issue tracker of the gallery app is probably a better place to report this. :-))

MorrisJobke commented 9 years ago

Gallery issue -> something for the gallery bug tracker -> close

oparoz commented 9 years ago

The error is non-blocking, but there is still a core issue.

imagepng() expects parameter 1 to be resource, boolean given

The method data() is using $this->resource, without even checking that it has one. The default value for resource is false.

I think @georgehrke should still take a look and make that function more robust.

oparoz commented 9 years ago

Thanks!

itn3rd77 commented 9 years ago

I am facing this bug since ownCloud v8.0 and it´s really really frustrating to have a broken gallery with only a spinning circle. In my humble opinion this isn't a low priority bug. We are talking about a core functionality that is completly broken for every person affected!

Any news or quick fixes to apply myself are relly appreciated.

Regards,

Ingo

MorrisJobke commented 9 years ago

cc @nickvergessen because you also dig into this maybe

oparoz commented 9 years ago

@itheiss - Which browser?

georgehrke commented 9 years ago

I can take a look this evening, should be fairly easy to fix.

Please excuse my brevity and typos. Sent from my mobile

On Mar 13, 2015, at 3:11 PM, Morris Jobke notifications@github.com wrote:

cc @nickvergessen because you also dig into this maybe

— Reply to this email directly or view it on GitHub.

itn3rd77 commented 9 years ago

@oparoz I am using Chrome v 40.0.2214.111 m on Windows 7

oparoz commented 9 years ago

@itheiss - Thanks. I just wanted to make sure you were not on Internet Explorer :)

georgehrke commented 9 years ago

@itheiss can you validate that https://github.com/owncloud/core/pull/14883 fixes the issue?

itn3rd77 commented 9 years ago

@georgehrke The error 'imagepng() expects parameter 1 to be resource, boolean given' is gone but the spinning circle remains. It seems to me the thumbnail generation stops at a specific image. Is the a way to enable traceing to see which images are processed? Maybe we can get a clou which image is causing the problem?

oparoz commented 9 years ago

@itheiss - You're affected by https://github.com/owncloud/gallery/issues/158 and https://github.com/owncloud/gallery/issues/159

You'll have better luck switching to Gallery+: https://apps.owncloud.com/content/show.php/Gallery%2B?content=169116

itn3rd77 commented 9 years ago

@oparoz Thanks for pointing me to Gallery+. Works like a charm!

MorrisJobke commented 9 years ago

stable8 #14917

Trefex commented 9 years ago

:+1: affects me