OBJLoader2 loading a 404’d resource results in a bad stack trace unable to log the error indicating failure

Description of the problem

There are no implementations of the logger.logInfo routine, indeed nothing other than references (calls) for this token in the entire codebase.

Three.js version
  • r88
  • Dev
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Relevant stack

LoaderSupport.js:445 Uncaught TypeError: this.logger.logInfo is not a function
    at new Builder (LoaderSupport.js:445)
    at OBJLoader2.LoaderBase (LoaderSupport.js:748)
    at new OBJLoader2 (OBJLoader2.js:27)

Maybe some missing newer dependency code failed to make it into r88’s js files? @kaisalmen

Author: Fantashit

1 thought on “OBJLoader2 loading a 404’d resource results in a bad stack trace unable to log the error indicating failure

  1. With the proper scope the issue is gone. Tested it with a non-existing resource: with the fix (see PR) the “Uncaught TypeError” is gone and the error message is printed in the log. Without the fix I was able to reproduce the problem.
    That was simply overlooked. Thanks, for spotting this.

Comments are closed.