Bug 1026589 - Can't upload particular image to ccms using chrome
Can't upload particular image to ccms using chrome
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.8
Assigned To: Lee Newson
Depends On:
  Show dependency treegraph
Reported: 2013-11-04 21:24 EST by mmurray
Modified: 2014-07-13 17:10 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-07-13 17:10:54 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)
Can't upload this image to ccms with chrome (103.55 KB, image/png)
2013-11-04 21:24 EST, mmurray
no flags Details
Image that can't be uploaded in Firefox or Chrome (420.95 KB, image/png)
2014-01-12 22:37 EST, Lee Newson
no flags Details
Big image (1.22 MB, image/jpeg)
2014-07-01 23:21 EDT, Matthew Casperson
no flags Details
Really big image (5.78 MB, image/jpeg)
2014-07-01 23:26 EDT, Matthew Casperson
no flags Details

  None (edit)
Description mmurray 2013-11-04 21:24:53 EST
Created attachment 819463 [details]
Can't upload this image to ccms with chrome

Description of problem:
Uploading attached image results in error message with chrome (upload successful with firefox).

Error Message:
Uncaught exception was detected. Redirecting you to the home page.
Exception: (RangeError) : Maximum call stack size exceeded

Version-Release number of selected component (if applicable):
Build 201310180711
Comment 1 mmurray 2013-11-04 21:28:34 EST
Actually, now doing an image search show that it did upload successfully despite the chrome message, return to main page and spinning wheel of doom!
Comment 2 mmurray 2013-11-20 23:54:30 EST
Example of another image is [4271] Cen_wizoffline.png.
Comment 3 Matthew Casperson 2013-12-01 22:26:40 EST
This is a known issue in Chrome. Firefox is unaffected. Will have to find workaround for Chrome users.
Comment 4 Lee Newson 2014-01-12 22:37:15 EST
Created attachment 849118 [details]
Image that can't be uploaded in Firefox or Chrome

Alexandra Settle sent me this image and she wasn't able to upload it using Chrome or Firefox. I tried myself using Chrome 31 and Firefox 25 and it didn't work for me either. For reference the error on Firefox was:

Uncaught exception was detected. Redirecting you to the home page.
Exception: (RangeError) : arguments array passed to Function.prototype.apply is too large
Comment 5 Lee Newson 2014-06-25 02:58:30 EDT
Fixed in 1.8-SNAPSHOT build 201406251649.

This was actually creating the images correctly. The problem however was in our clone method when the object was returned and was attempting to be displayed.

Since chrome (and firefox on larger files) have issues copying large arrays (see https://code.google.com/p/google-web-toolkit/issues/detail?id=8239), I've altered the way we do the clone so that the byte array isn't cloned. This means that the two items will reference the same object in memory, but given that the only way we alter that value via the UI is to send new data to the REST API and then replace the old value, this isn't an issue.
Comment 6 Lee Newson 2014-07-01 21:41:04 EDT
Note: Matt has merged the changes into restyle and uploaded them to the test/development server.
Comment 7 Matthew Casperson 2014-07-01 23:21:48 EDT
Created attachment 913968 [details]
Big image
Comment 8 Matthew Casperson 2014-07-01 23:26:05 EDT
Created attachment 913969 [details]
Really big image
Comment 9 Matthew Casperson 2014-07-01 23:35:20 EDT
Confirmed that bulk image uploading and uploading individual images in Chrome and Firefox works with the supplied sample cases. I also successfully uploaded an image 1.2 MB big.

Really large images (around 6 MB) failed, but that is most likely another bug (see BZ#1112937).

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