You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Console:
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 ()
at Object.read (PLYLoader.js:568:1)
at binaryReadElement (PLYLoader.js:543:1)
at parseBinary (PLYLoader.js:643:1)
at PLYLoader.parse (PLYLoader.js:710:1)
at Object.onLoad (PLYLoader.js:71:1)
at three.module.js:41507:1
@aardgoose It seems this regression was introduced with the performance improvements added via #25210, #25248 and #25261. Maybe something in #25248 isn't right.
OK, the problem is the example file has \r\n line endings and extractHeaderText() is removing the \n characters in the strings.
The header length is calculated in parseHeader() based on this data which is now incorrect.
As a result the header length is being calculated as 311 bytes long when including the \n characters it is actually 325 bytes. Hence the binary data isn't read correctly.
The following snippet replacing the section following the above line of code fixes the test case, but will obviously break with normal files.
Description
RangeError when adding a mesh into scene
Console:
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 ()
at Object.read (PLYLoader.js:568:1)
at binaryReadElement (PLYLoader.js:543:1)
at parseBinary (PLYLoader.js:643:1)
at PLYLoader.parse (PLYLoader.js:710:1)
at Object.onLoad (PLYLoader.js:71:1)
at three.module.js:41507:1
.ply file
gripper.zip
Reproduction steps
Code
Live example
https://codesandbox.io/s/quizzical-kepler-jjxj4f?file=/src/index.js
Screenshots
No response
Version
152
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered: