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

Crash when surface is small #16

Open
max-frai opened this issue Aug 14, 2021 · 3 comments
Open

Crash when surface is small #16

max-frai opened this issue Aug 14, 2021 · 3 comments

Comments

@max-frai
Copy link

Hello, thank you for this lib. I discovered that my app sometimes crashes without logs. And now I found, that in some places my templates were not optimal and sometimes layout is wrong. It crashes when passed width/height for surface is, for example, 300x4.

                <Surface
                    style={{
                        height: size.height,
                        width: size.width,
                    }}
                >
                    <Blurhash hash={blurhash} />
                </Surface>
@max-frai
Copy link
Author

So I found that when surface size is calculated in runtime (inside onLayout, for example), sometimes when size is not yet set and is zero, it's also crash

@schiller-manuel
Copy link
Owner

Does it also crash if you put something else inside the <Surface> instead of the <Blurhash> component?
You should see some crash reason e.g. in the Android logcat output, what does it tell you?

@max-frai
Copy link
Author

max-frai commented Sep 2, 2021

@schiller-manuel There are no logs, I'm testing it only on ios and it crashes silently :( I didn't try to put something else into Surface

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