Bug 969895 - Large Images cannot be displayed
Large Images cannot be displayed
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: pressgang-ccms-dev
: Reopened
: 977160 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-06-02 20:02 EDT by Lee Newson
Modified: 2013-06-30 22:45 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-30 22:45:42 EDT
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-02 20:02 EDT, Lee Newson
no flags Details

  None (edit)
Description Lee Newson 2013-06-02 20:02:51 EDT
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 01:33:52 EDT
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 01:35:47 EDT
Image 2628 can be used as a test for this bug.
Comment 3 Lee Newson 2013-06-03 01:43:34 EDT
Comment 4 Lee Newson 2013-06-23 20:01:07 EDT
Moving this to RELEASE_PENDING, since it's only in NEXT atm.
Comment 5 Lee Newson 2013-06-23 20:01:53 EDT
*** 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.