question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds

See original GitHub issue

Hi,

I’m getting an error when trying to get dimensions of a specific image.

Version: 0.7.4

Stack trace: RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds at boundsError (internal/buffer.js:71:11) at Buffer.readUInt16LE (internal/buffer.js:230:5) at readUInt (C:\PathToProject\node_modules\image-size\lib\readUInt.js:8:17) at extractOrientation (C:\PathToProject\node_modules\image-size\lib\types\jpg.js:74:21) at validateExifBlock (C:\PathToProject\node_modules\image-size\lib\types\jpg.js:49:12) at Object.calculate (C:\PathToProject\node_modules\image-size\lib\types\jpg.js:118:21) at lookup (C:\Projects\PathToProject\node_modules\image-size\lib\index.js:26:35) at module.exports (C:\PathToProject\node_modules\image-size\lib\index.js:122:12)

Usage import * as sizeOf from 'image-size'; const dimensions = sizeOf(image.path);

Image in question is attached. Somehow I have doubts that this image is corrupted, since I was able to get its dimensions with c# code without problems. Also tried async examples from documentation with same results.

Anything I missed? 😃

darkknight

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
netroycommented, Sep 14, 2019

@PizzaPartyInc the issue you are facing, has been fixed. it’s released as v0.7.5

0reactions
netroycommented, Sep 14, 2019

@mnpenner from the stacktrace you posted, it sounds like that the image in question was invalid. would it be possible to share the image with me?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempt to write outside buffer bounds" · Issue #7047 · nodejs ...
I've had multiple users report a RangeError: Attempt to write outside buffer bounds error that originates inside the Buffer constructor. Here's ...
Read more >
MongoDB RangeError: attempt to write outside buffer bounds
Any idea when MongoDB throws RangeError: attempt to write outside buffer bounds? Please suggest. Below method insert the data in Mongodb
Read more >
Buffer out of bounds error when reading ... - Google Groups
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds. at boundsError (internal/buffer.js:51:11). at Buffer.
Read more >
API "Attempt to write outside buffer bounds" - Go.Data
Hi,When I use the API with:GET /outbreaks/{id}/relationships/exportIt gives the following error: "Attempt to write outside buffer bounds"Do you know why?
Read more >
Using rules to query MySQL, Attempt to access memory ...
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds ... Hi! Encountered this issue and haven't found any related info ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found