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

Deck not loading layers when one layer has configuration issue? #4134

Closed
jfuehner opened this issue Jan 10, 2020 · 5 comments
Closed

Deck not loading layers when one layer has configuration issue? #4134

jfuehner opened this issue Jan 10, 2020 · 5 comments
Labels

Comments

@jfuehner
Copy link

Hi! I have noticed that deck will not load any layers if one or more layers has a configuration issue...

This seems counter-intuitive. I would think if deck has trouble rendering a layer it would omit rendering that layer but render layers that do not have issues. Additionally, there doesn't appear to be a way to handle these errors.

@ibgreen
Copy link
Collaborator

ibgreen commented Jan 10, 2020

@jfuehner Some comments based on work I did on this a long time ago (@Pessimistress likely has more recent insights)

I would think if deck has trouble rendering a layer it would omit rendering that layer but render layers that do not have issues.

This was the original intention. There was code to catch exceptions from each layer during rendering phase and continue with next layer but I have also seen that this seems to be broken.

Additionally, there doesn't appear to be a way to handle these errors.

E.g. as in allow the application to catch any resulting exceptions? The exceptions are likely being caught by deck.gl which would be somewhat reasonable if rendering wasn't broken.

@jfuehner
Copy link
Author

@ibgreen Perhaps a error event indicating what layer(s) were unable to be rendered? If you have quite a few layers rendering its challenging to identify why one might be broken. Especially, when none are rendering ;-)

@ibgreen
Copy link
Collaborator

ibgreen commented Jan 10, 2020

Agreed, errors should not be silently discarded. As errors are caught and handled there should at least be console logs emitted.

@Pessimistress
Copy link
Collaborator

We do catch the errors during layer lifecycle, so that all layers get initiated/updated even if one fails. However we throw the error at the end:

https://github.com/uber/deck.gl/blob/80978528ffdebf4a82265c0d4408327a0eb0686c/modules/core/src/lib/layer-manager.js#L259-L261

We can expose an optional onError handler that replaces the crash.

@Pessimistress
Copy link
Collaborator

Callback will be available in v8.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants