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

Provide Observer object for RemoveObserver #79

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

DDHSchmidt
Copy link
Contributor

I was observing System.ObjectDisposedException for already closed instances of the CameraView whenever I changed my iOS device's orientation.
I could trace it back to the OrientationChanged observer that is not correctly removed on dispose.
The call to RemoveObserver() should have the return value of AddObserver() as its first parameter.

RemoveObserver expects the object that was returned during the AddObserver(...) call
@TTalpey
Copy link

TTalpey commented Dec 6, 2023

Works for me! Tested and confirmed it resolves the iOS orientation crash after closing an instance.

@janusw
Copy link

janusw commented Jan 6, 2024

FYI: I merged this and several other open PRs into my fork at https://github.com/janusw/Camera.Maui and published a new release that includes these fixes on nuget.org: https://www.nuget.org/packages/CameraMaui/1.4.5

@stoff99
Copy link

stoff99 commented Jan 9, 2024

@janusw thank you so much for you fix in your fork. This saved my life :)
Hopefully this gets merged soon in the original.
Thx !

@janusw
Copy link

janusw commented Jan 9, 2024

@janusw thank you so much for you fix in your fork. This saved my life :)

In fact I primarily tried to save my own life here, but I'm glad to hear that it saved someone else's life as well 😆

Hopefully this gets merged soon in the original. Thx !

I hope so too. But in case it doesn't I will definitely keep maintaining my fork.

My main plea to @hjam40 at this point is: Please make up your mind whether you want to keep maintaining this project or not. If you do, do it properly. If you don't have time for it, let people know that the project is abandoned and unmaintained. Don't make promises that you cannot fulfill (doesn't help anybody).

I offered to help with maintenance and my offer stands. Just waiting in silence until the project is forked to death is not a very useful approach.

@hjam40 hjam40 merged commit 01ce778 into hjam40:master Jan 9, 2024
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

Successfully merging this pull request may close these issues.

None yet

5 participants