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

DAEParser crashes if referenced material image doesn't exist #485

Closed
inssein opened this issue Mar 12, 2013 · 3 comments
Closed

DAEParser crashes if referenced material image doesn't exist #485

inssein opened this issue Mar 12, 2013 · 3 comments
Assignees

Comments

@inssein
Copy link

inssein commented Mar 12, 2013

Like the title says, if your model's reference images that do not exist, it crashes because image.resource is null on line 698 of DAEParser.

What I have done at the moment is added a !== null check before building the material. If it is null, I just build the default material. PR coming soon.

Note: I dynamically replace certain materials after the model has been loaded. Previously with Papervision, I was able to pass in a list of materials to override, sort of the same way Away3D can use an AssetLoaderContext with asset urls. Anyways, some of our old models contain bad data (point to images that don't exist -- but are meant to be replaced dynamically), and this was causing our model loaders to crash.

@ringodotnl
Copy link
Member

Can you supply the files (collada / texture's if any, etc) and an simplified example code you used for testing ?
Which branch did you use ?

@ringodotnl
Copy link
Member

Fixed in dev branch see commit fea982e

@inssein
Copy link
Author

inssein commented Mar 27, 2013

wow sorry about the late reply, totally missed this issue. I will see if I can get to writing a quick test.

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

No branches or pull requests

2 participants