Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnails, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG #21873

Closed
rajil opened this issue Jan 24, 2016 · 7 comments · Fixed by #21950
Closed

Thumbnails, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG #21873

rajil opened this issue Jan 24, 2016 · 7 comments · Fixed by #21950

Comments

@rajil
Copy link

rajil commented Jan 24, 2016

Hello,

I have some photos taken from a phone which render fine in gwenview and gimp, but give an error in owncloud. The errors I get in the owncloud.log file is
"imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG"

The web UI is unable to show the thumbnail.
The relevant packages i have installed are php56-gd-5.6.17 and jpeg-turbo-1.4.2

Google returned this
golang/go#3916
https://code.google.com/p/go/issues/detail?id=3916

@MorrisJobke
Copy link
Contributor

golang/go#3916

With the image that is linked there I can reproduce the error:

{"reqId":"vFZDhvb9KbRyDLVYHRnt","remoteAddr":"::1","app":"PHP","message":"imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG\n at \/Users\/morrisjobke\/Projects\/owncloud\/master\/lib\/private\/image.php#515","level":0,"time":"2016-01-25T08:26:49+00:00","method":"GET","url":"\/master\/index.php\/core\/preview.png?file=%2Fasd%2Fxx.jpg&c=1338e8260789f433aefdda62641e5109&x=64&y=64&forceIcon=0"}

@MorrisJobke
Copy link
Contributor

Workaround:

ini_set ('gd.jpeg_ignore_warning', 1);

See http://php.net/manual/en/image.configuration.php

cc @oparoz

@oparoz
Copy link
Contributor

oparoz commented Jan 27, 2016

Thanks @MorrisJobke . It had already been added to Gallery(+), but would be good to have it enabled in core. Where though?

@LukasReschke
Copy link
Member

I'd advocate for

core/lib/base.php

Lines 471 to 476 in 308396b

/**
* Try to set some values to the required ownCloud default
*/
public static function setRequiredIniValues() {
@ini_set('default_charset', 'UTF-8');
}
. Any objections?

@oparoz
Copy link
Contributor

oparoz commented Jan 27, 2016

Sounds good to me :)

LukasReschke added a commit that referenced this issue Jan 27, 2016
@LukasReschke
Copy link
Member

=> #21950

@DeepDiver1975 DeepDiver1975 added this to the 9.0-current milestone Jan 27, 2016
kainosnoema pushed a commit to cotap/prism that referenced this issue Feb 8, 2017
Some errors are actually warnings, and result in a normal image, but
it's impossible to tell from the error code which are which.

libjpeg-turbo/libjpeg-turbo#112
owncloud/core#21873

Signed-off-by: Evan Owen <evan@zinc.it>
@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants