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

NavaThread exception #53

Merged
merged 9 commits into from
Aug 22, 2024
Merged

NavaThread exception #53

merged 9 commits into from
Aug 22, 2024

Conversation

sepandhaghighi
Copy link
Member

@sepandhaghighi sepandhaghighi commented Aug 19, 2024

Reference Issues/PRs

What does this implement/fix? Explain your changes.

  • NavaThread exception bug fixed

Any other comments?

Local tests on OSs

  • macOS
    • Sonoma
  • Windows
    • Windows 11
  • Linux
    • Ubuntu 20.04

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.48%. Comparing base (07ea3ee) to head (d518a6f).
Report is 1 commits behind head on dev.

Files Patch % Lines
nava/thread.py 80.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              dev      #53       +/-   ##
===========================================
+ Coverage   67.88%   96.48%   +28.60%     
===========================================
  Files           4        4               
  Lines         165      170        +5     
  Branches       24       24               
===========================================
+ Hits          112      164       +52     
+ Misses         47        0       -47     
  Partials        6        6               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sepandhaghighi sepandhaghighi self-assigned this Aug 19, 2024
@sepandhaghighi sepandhaghighi added bug Something isn't working enhancement New feature or request labels Aug 19, 2024
@sepandhaghighi sepandhaghighi added this to the nava v0.7 milestone Aug 19, 2024
self._play_process.wait()
if not self._loop:
break
except Exception: # pragma: no cover
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sadrasabouri Currently, it's not straightforward to test this exception, but we will address it in a future PR. Please disregard it for this PR.

@sepandhaghighi sepandhaghighi marked this pull request as ready for review August 19, 2024 15:11
Copy link
Member

@sadrasabouri sadrasabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Just a point I wanted to mention here for future reference. Since we are using WINSOUND API, but call alsa directly from the system, they still have difference.
For example in MacOS, for async mode, when running Winsound, it gave the error and process is done, but when calling Alsa, it stuck and needed a Ctrl + C to exit.

You can merge it, I just don't merge it so that you see my message here.

@sepandhaghighi
Copy link
Member Author

LGTM. Just a point I wanted to mention here for future reference. Since we are using WINSOUND API, but call alsa directly from the system, they still have difference. For example in MacOS, for async mode, when running Winsound, it gave the error and process is done, but when calling Alsa, it stuck and needed a Ctrl + C to exit.

You can merge it, I just don't merge it so that you see my message here.

What's the meaning of stuck? It's really weird! This process run on another thread. Can you provide a reproducible example?

@sadrasabouri
Copy link
Member

LGTM. Just a point I wanted to mention here for future reference. Since we are using WINSOUND API, but call alsa directly from the system, they still have difference. For example in MacOS, for async mode, when running Winsound, it gave the error and process is done, but when calling Alsa, it stuck and needed a Ctrl + C to exit.
You can merge it, I just don't merge it so that you see my message here.

What's the meaning of stuck? It's really weird! This process run on another thread. Can you provide a reproducible example?

Yes, checkout this on Ubuntu (for example) and see the differnece:

play("path/to/file.wav", engine=Engine.WINSOUND)

and

play("path/to/file.wav", engine=Engine.AFPLAY)

@sadrasabouri
Copy link
Member

We decided to fix the raised issue in a separate PR.

@sadrasabouri sadrasabouri merged commit c166f2b into dev Aug 22, 2024
74 checks passed
@sadrasabouri sadrasabouri deleted the async_error_message branch August 22, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants