STLLoader Giving "errorRangeError: Invalid typed array length: 17576829549" Reading Wrong Number of Faces
See original GitHub issueI’ve got an STL file with 4811 faces but STLLoader.js is detecting 1818587680 faces. It says 1818587680 faces no matter which STL file I choose.
I see in STLLoader.js, it detects the file is in binary format and it looks at offset 80 here:
function parseBinary(data) {
var reader = new DataView(data);
var faces = reader.getUint32(80, true);
I’m using three and STLLoader in React. I’m importing the modules STLLoader needs using:
import {
BufferAttribute,
BufferGeometry,
FileLoader,
Float32BufferAttribute,
Loader,
LoaderUtils,
Vector3
} from "three";
I installed three using “yarn add three”
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
STLLoader in Vue not functioning - Stack Overflow
So I am pretty sure this is an issue with my code and not with the THREE and Vue intergration. I am not...
Read more >RangeError: invalid array length - JavaScript - MDN Web Docs
The JavaScript exception "Invalid array length" occurs when specifying an array length that is either negative, a floating number or exceeds ...
Read more >STL Loader file path issues - Questions - three.js forum
I have some problems rendering my STL file with the STLLoader from ThreeJS. First, I encountered this error message RangeError: Invalid typed array...
Read more >WebGL: RangeError: invalid array length - Unity Forum
I'm getting this same error RangeError: Invalid Typed Array Length with a setting of 1024mb....but 1000 works, trying to figure out what the ......
Read more >App Service deployment results in RangeError: Invalid typed ...
When trying to deploy to App Service from DevOps, I get "RangeError: Invalid typed array length". No information is given as to where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright thanks 😃
If you need help, you can try the three.js forum.