i get an error like 'Uncaught abort({})'
justalways opened this issue · 1 comments
when i open a 20M tiff file, it failed
Uncaught abort({}) at Error
at jsStackTrace (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:79:20924)
at stackTrace (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:79:21107)
at abort (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:100:5646)
at ___syscall192 (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:79:528423)
at cq (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:89:65708)
at Array.xe (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:83:118776)
at pd (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:83:93033)
at le (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:83:117061)
at Object.ccallFunc [as ccall] (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:79:8204)
at new Tiff (https://d62epjyi40fiq.cloudfront.net/cm/js/tiff.js:301:37)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
before this ,there are 2 warns like this:
RangeError: Source is too large
at Uint8Array.set ()
at Object.mmap (tiff.js:79)
at Object.mmap (tiff.js:79)
at ___syscall192 (tiff.js:79)
at cq (tiff.js:89)
at Array.xe (tiff.js:83)
at pd (tiff.js:83)
at le (tiff.js:83)
at Object.ccallFunc [as ccall] (tiff.js:79)
at new Tiff (tiff.js:301)
can you help me?@seikichi
ps: i use chrome 66.0.3359.117
For images that are too large you should initialize the Total memory with a greater value
like this:
Tiff.initialize({TOTAL_MEMORY: 19777216 * 10}); // Initialize the memory with 197 MB
const image = new Tiff({ buffer: data }); // your instance method