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

Update ndk and ndk-glue to 0.7 #47

Closed
wants to merge 9 commits into from
Closed

Conversation

torokati44
Copy link
Contributor

Re: #46
I haven't actually tested whether this breaks anything, but it shouldn't:registered::tm:.

@torokati44
Copy link
Contributor Author

As evidenced by the commits on the branch of this PR, I'm having some difficulties making the project build with NDK 25.
Shall I instead switch back to NDK 24 using nttld/setup-ndk@v1?

@torokati44
Copy link
Contributor Author

torokati44 commented Aug 17, 2022

Okay, I'm now officially lost in the forest of runner image-, Android API-, and NDK-versions... :|

@katyo
Copy link
Owner

katyo commented Aug 20, 2022

@torokati44 Could you fix CI?

@katyo
Copy link
Owner

katyo commented Aug 20, 2022

As evidenced by the commits on the branch of this PR, I'm having some difficulties making the project build with NDK 25. Shall I instead switch back to NDK 24 using nttld/setup-ndk@v1?

Of course

@torokati44
Copy link
Contributor Author

Could you fix CI?

Yes, that's exactly what I've been trying so hard to do... 😐

I'll try to give it another go sometime, downgrading to NDK 24.

Rodrigodd and others added 7 commits August 26, 2022 17:42
This mainly fix issue katyo#41, that causes crashes when a `AudioStream` was
drop. That happen because the `AudioStream` was not closed on Drop, but
was deleted, causing a use-after-free by the not closed `onDataCallback`
thread.

Also, the method `AudioStreamBuilder::open_stream` was using the
deprecated method `openStream(AudioStream*)`, that do not allow deleting
the `AudioStream` safely. Replaced it by
`openStream(shared_ptr<AudioStream>)`.  The deprecated function allowed
a use-after-free by the `onErrorCallback` thread.

Also, as noted by issue katyo#45, the bindings for `AudioStream::close()` was
wrongly bound to the concrete implementation of the base class, instead
of calling the virtual method.

Also note that currently there is no safe way to delete the
`onErrorCallback` of a `AudioStream` in oboe (see
google/oboe#1610), so instead the current
implementation leaks the callback on drop.

Also, remove some unsound `Drop` implementations and replace them by
explicit unsafe delete methods.
@torokati44
Copy link
Contributor Author

I don't plan to work on this anymore, sorry... :|

@torokati44 torokati44 closed this Sep 7, 2022
@katyo
Copy link
Owner

katyo commented Sep 14, 2022

@torokati44 Don't worry about it. I planned to update this library soon.

@MarijnS95
Copy link

@katyo is this something that can be picked up again? Looks like this PR contains much more than simply bumping the ndk dependency from 0.6 to 0.7 which didn't / does not have that many breaking changes: https://github.com/rust-windowing/android-ndk-rs/releases/tag/ndk-0.7.0

@MarijnS95 MarijnS95 mentioned this pull request Nov 25, 2022
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

4 participants