Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USDZLoader: Avoid recursive calls of parseNextLine(). #27169

Merged
merged 1 commit into from Nov 11, 2023

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 10, 2023

Related issue: #27158

Description

When testing with the asset from #27158, I have noticed the exported UDSZ could not be loaded with USDZLoader. But only in Chrome. The following error was thrown in parseNextLine():

RangeError: Maximum call stack size exceeded

The error does not appear with smaller assets and not in Firefox. I suppose when a certain number of nested calls are exceeded, Chrome does not allow further processing. The PR introduces a simple for loop which makes the error go away.

@Mugen87 Mugen87 added this to the r159 milestone Nov 10, 2023
@Mugen87 Mugen87 merged commit 2308451 into mrdoob:dev Nov 11, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant