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

[Bug]: NPE on AcousticEchoCanceler #82

Open
1 of 2 tasks
Pitros opened this issue May 22, 2024 · 7 comments
Open
1 of 2 tasks

[Bug]: NPE on AcousticEchoCanceler #82

Pitros opened this issue May 22, 2024 · 7 comments
Labels
bug Something isn't working
Milestone

Comments

@Pitros
Copy link
Contributor

Pitros commented May 22, 2024

Version

v2.0.0

Which operating systems have you used?

  • Android
  • iOS

Environment that reproduces the issue

Pixel 7 - Android 14
Samsung S10 - Android 10

Is it reproducible in the example application?

Not tested

RTMP Server

Reproduction steps

Minimize app, reopen app, at some point crashes.

Expected result

App does not crash.

Actual result

App crashes.

Additional context

RN 0.74

Relevant logs output

Fatal Exception: io.github.thibaultbee.streampack.error.StreamPackError: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.audiofx.AcousticEchoCanceler.setEnabled(boolean)' on a null object reference
       at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer.configure(BaseStreamer.kt:213)
       at video.api.livestream.ApiVideoLiveStream$audioConfig$2.invoke(ApiVideoLiveStream.kt:89)
       at video.api.livestream.ApiVideoLiveStream$audioConfig$2.invoke(ApiVideoLiveStream.kt:84)
       at video.api.reactnative.livestream.LiveStreamView$1$1.invoke(LiveStreamView.kt:75)
       at video.api.reactnative.livestream.LiveStreamView$1$1.invoke(LiveStreamView.kt:72)
       at video.api.reactnative.livestream.utils.permissions.SerialPermissionsManager$requestPermissions$request$1$1.invoke(SerialPermissionsManager.kt:38)
       at video.api.reactnative.livestream.utils.permissions.SerialPermissionsManager$requestPermissions$request$1$1.invoke(SerialPermissionsManager.kt:35)
       at video.api.reactnative.livestream.utils.permissions.PermissionsManager$requestPermissions$1.onAllGranted(PermissionsManager.kt:51)
       at video.api.reactnative.livestream.utils.permissions.PermissionsManager.requestPermissions(PermissionsManager.kt:76)
       at video.api.reactnative.livestream.utils.permissions.PermissionsManager.requestPermissions(PermissionsManager.kt:49)
       at video.api.reactnative.livestream.utils.permissions.SerialPermissionsManager.requestPermissions$lambda$1(SerialPermissionsManager.kt:35)
       at video.api.reactnative.livestream.utils.permissions.SerialPermissionsManager.$r8$lambda$dzig6asy22NzT_1QrKBawhgieas()
       at video.api.reactnative.livestream.utils.permissions.SerialPermissionsManager$$ExternalSyntheticLambda1.run(:10)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
       at java.lang.Thread.run(Thread.java:1012)
    
@Pitros Pitros added the bug Something isn't working label May 22, 2024
@ThibaultBee
Copy link
Member

Hi,

Hopefully, this ThibaultBee/StreamPack@cc07059 and ThibaultBee/StreamPack@e44c7de fix this crash.

@ThibaultBee ThibaultBee added this to the v2.0.1 milestone May 23, 2024
@Pitros
Copy link
Contributor Author

Pitros commented Jun 9, 2024

@ThibaultBee awesome, any ETA for 2.0.1?

@ThibaultBee ThibaultBee changed the title [Bug]: Random crashes [Bug]: NPE on AcousticEchoCanceler Jun 11, 2024
@ThibaultBee
Copy link
Member

Hi,

I have made a fix in the main branch. Could you test to reproduce on main branch?

@talhatsk
Copy link

@ThibaultBee will this fix Attempt to invoke virtual method 'int android.media.audiofx.AudioEffect.setEnabled(boolean)' on a null object reference crash also?

@ThibaultBee
Copy link
Member

@ThibaultBee will this fix Attempt to invoke virtual method 'int android.media.audiofx.AudioEffect.setEnabled(boolean)' on a null object reference crash also?

Yes.

@talhatsk
Copy link

@ThibaultBee will this fix Attempt to invoke virtual method 'int android.media.audiofx.AudioEffect.setEnabled(boolean)' on a null object reference crash also?

Yes.

great, Thanks

@ThibaultBee
Copy link
Member

Could you test on 2.0.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants