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

[iOS] Random crashing due to apparent race condition #100

Closed
ndermg opened this issue Sep 6, 2022 · 0 comments
Closed

[iOS] Random crashing due to apparent race condition #100

ndermg opened this issue Sep 6, 2022 · 0 comments

Comments

@ndermg
Copy link

ndermg commented Sep 6, 2022

I have an app which calls ping.start quite frequently. Leave it running long enough and it will eventually crash due to hitting the assert(NO) on line 526 of GBPing.m where it does a switch on the value of self.hostAddressFamily. Occasionally, the value is 0 (and this can also be induced manually by setting a breakpoint on line 516).
Is there any reason why that default cannot be removed? When I comment it out, nothing seems to explode and the crash doesn't occur anymore.

(I did notice this other, non-React Native GBPing does this instead of assert(NO):

                err = errno;
                return;

However, when I try changing it to that, we soon crash due to another race condition: the reject callback in the 'start' method in RNReactNativePing.m gets called twice, once in the fail block (line 57) then again in the dispatch_after block (line 61) which causes a fatal 'Illegal callback invocation from native module' error.)

@ndermg ndermg closed this as completed Feb 16, 2023
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

1 participant