-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Re: issue#435, ensure that duplicate calls to destroy arcore are ignored #451
Re: issue#435, ensure that duplicate calls to destroy arcore are ignored #451
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work! hopefully this fixes it once and for all.
@kmayoral Hi! Now I see that in version 2.1.0 the second call was returned. Perhaps the one who returned it understands the logic better and this call is necessary. But, apparently because of this, the crash returned again I see your fix. You have added a flag I see only one case, when ARScene view will not have lifecycle I think next (it is not a best solution) solution can prevent double destroy also I don't know if it is possible use ArSceneView without Lifecycle It can produce new error in the future |
Hi @Antiglobalist , thanks for the comments! So it seems that your changes were probably wiped by a conflict resolving merge somewhere along the lines. I definitely wouldn't be opposed to both changes being included in the code, but I do feel that this PR will make it so any other accidental double calls of I would like if we could land this PR and then have another PR that reopens the changes you had previously made, what do you think? |
@kmayoral Hi! |
@grassydragon Hello. Please take a look at my research above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@Antiglobalist The double Lifecycle was there for Flutter but it might not be applicable anymore. |
@ThomasGorisse Sure! |
Since it takes a few seconds to destroy the arcore object, multiple calls to the method can still happen concurrently while the first is still being destroyed but before the object reference has been nullified. This should protect against that race condition.