brlrt / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

OBJ files with mtl references, and line endings that are not in DOS format fail to load #122

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Create an obj file containing valid mtllib and usemtl references on a Linux PC. 
Make sure it does not have DOS line endings.

Attempt to load it using

Obj.load("http://localhost/mytest.obj");

The loader will throw an error containing:

Error #1009: Cannot access a property or method of a null object reference
away3d.loaders::Obj/parseMtl()...

Now, open the same file in wordpad, save it and try to use it again. It should 
now work. Wordpad is changing the line endings when it saves.

Occurs in revision 2684 at least.

Original issue reported on code.google.com by brucewei...@googlemail.com on 6 Jul 2010 at 3:53