This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7230 - UI crash possible when an image size is over a MB
Summary: UI crash possible when an image size is over a MB
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Web interface (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 minor
Target Milestone: ---
Assignee: fd
QA Contact: fd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-06 08:53 UTC by fd
Modified: 2009-08-06 12:59 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-08-06 08:53:44 UTC
For some reason, the fn:sum method sometimes returns a double instead of an integer, even when its arguments do look like integers. The problem is that doubles in XSLT2 are formatted using the scientific notation.

Thus, big image sizes may be reported in the completed moki file as:
 size="2.260045E6" instead of size="2260045"
This is in turn wouldn't be a problem if XSLT2 knew how to parse and convert such numbers into integers, but it doesn't work, and xs:integer('2.260045E6') results in a FORG0001 error.
Comment 1 fd 2009-08-06 10:26:54 UTC
xs:integer() now wraps calls to fn:sum() to force the conversion to integers.
Comment 2 fd 2009-08-06 12:59:41 UTC
Also updated the UI to call the new moki:format-bytes functions and thus display sizes in a more human-friendly format