Bug 969895 - Large Images cannot be displayed
Summary: Large Images cannot be displayed
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI   
(Show other bugs)
Version: 1.1
Hardware: Unspecified Unspecified
Target Milestone: ---
: ---
Assignee: pressgang-ccms-dev
QA Contact:
Keywords: Reopened
: 977160 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-03 00:02 UTC by Lee Newson
Modified: 2013-07-01 02:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-01 02:45:42 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example Image that will cause issues when using Chrome (136.70 KB, image/png)
2013-06-03 00:02 UTC, Lee Newson
no flags Details

Description Lee Newson 2013-06-03 00:02:51 UTC
Created attachment 756143 [details]
Example Image that will cause issues when using Chrome

Description of problem:
If you upload an image to the server that is medium - large (ie ~1000px or larger), then when trying to view the image you get an error saying "Uncaught exception was detected. Redirecting you to the home page.
Exception: (RangeError) : Maximum call stack size exceeded" or "Uncaught exception was detected. Redirecting you to the home page.
Exception: (RangeError) : arguments array passed to Function.prototype.apply is too large"

How reproducible:
Always in Google Chrome, appears to allow larger images in Firefox though. I haven't tested this on any other browsers though.

Steps to Reproduce:
1. Upload a larger image to the server.
2. Try and view the image from the new UI 

Actual results:
You get one of the errors above depending on the size of the image and then redirected back to the home page.

Expected results:
The image should be displayed, or at the very least still be able to see the information about the image. Then, if need be you could also upload a smaller copy of the image.

Additional Info:
Viewing the image directly from the REST API works fine. I've attached an image that causes issues when viewing from Chrome but not Firefox.

Comment 1 Matthew Casperson 2013-06-03 05:33:52 UTC
Fixed in 201306031528

This is an issue with Chrome - http://code.google.com/p/chromium/issues/detail?id=56588

The exception comes about because of an attempt to clone an RESTImageV1 with a large RESTLanguageImageV1 child.

The solution is to load the image initially without the language image data. The language image data can then be loaded separately, and a shallow clone done into the entities the page is working with. You'll see that when an image is loaded, it's basic details are loaded first, and then the language image is loaded next.

When QAing bug fixes, please make sure the build you are using is equal to or higher than the build identified above. Also be aware that this fix may have only been applied in PressGang Next at this time.

Comment 2 Matthew Casperson 2013-06-03 05:35:47 UTC
Image 2628 can be used as a test for this bug.

Comment 3 Lee Newson 2013-06-03 05:43:34 UTC

Comment 4 Lee Newson 2013-06-24 00:01:07 UTC
Moving this to RELEASE_PENDING, since it's only in NEXT atm.

Comment 5 Lee Newson 2013-06-24 00:01:53 UTC
*** Bug 977160 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.