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

Brew installed openjdk gives LineUnavailableException: line with format PCM_SIGNED 48000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported. #158402

Open
4 tasks done
pacman-admin opened this issue Dec 28, 2023 · 16 comments
Labels
linux Linux is specifically affected needs response Needs a response from the issue/PR author

Comments

@pacman-admin
Copy link

brew gist-logs <formula> link OR brew config AND brew doctor output

: 4.2.1-18-gdbb800b
ORIGIN: https://github.com/Homebrew/brew
HEAD: dbb800b7d34b36c976d94c176decb2847de7d92a
Last commit: 15 hours ago
Core tap JSON: 27 Dec 23:00 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit sandybridge
Clang: N/A
Git: 2.34.1 => /bin/git
Curl: 7.81.0 => /bin/curl
Kernel: Linux 6.2.0-39-generic x86_64 GNU/Linux
OS: Ubuntu 22.04.3 LTS (jammy)
Host glibc: 2.35
/usr/bin/gcc: 11.4.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@11: N/A
gcc: 13.2.0
xorg: N/A

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Play sound in a java-based game using the Java Clip API

What happened (include all command output)?

It returned this error:
javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 48000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.

It works fine with an intellij JDK or a

What did you expect to happen?

The sound gets played like it did with a JDK from the Oracle website or on macOS or Windows.

Step-by-step reproduction instructions (by running brew commands)

`brew install openjdk`


`jpackage` for some java app that uses Clip.
OR
Attempt to use /home/linuxbrew/.linuxbrew/opt/openjdk/libexec``` as a JDK in Intellij IDEA(or similar)
And run a java app that uses Clip.
@pacman-admin pacman-admin added the bug Reproducible Homebrew/homebrew-core bug label Dec 28, 2023
@pacman-admin
Copy link
Author

pacman-admin commented Dec 28, 2023

I can definitively prove this.
If I use a different non-linuxbrew JDK it works absolutely fine.

@SMillerDev
Copy link
Member

Could you make a pull request to add this as a test to the OpenJDK formula? That way we can ensure that it's reproducibly fixed.

@pacman-admin
Copy link
Author

@SMillerDev Please explain what you mean.
What does "this" refer to?

@pacman-admin
Copy link
Author

All I know is this: brew JDKs have broken sound on Ubuntu 22.04 LTS.

@alebcay
Copy link
Member

alebcay commented Jan 3, 2024

@SMillerDev Please explain what you mean. What does "this" refer to?

Do you have an minimal code snippet that we can javac <class name> and java <class name> to execute and reproduce this issue? Most maintainers here don't immediately know of a Java app off the top of their head that uses Clip (nor are we necessarily familiar with that API), so something simple that we can validate with would be helpful.

@pacman-admin
Copy link
Author

pacman-admin commented Jan 3, 2024 via email

@pacman-admin
Copy link
Author

pacman-admin commented Jan 3, 2024 via email

@pacman-admin
Copy link
Author

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jan 31, 2024
@alebcay
Copy link
Member

alebcay commented Feb 6, 2024

Yes, just use this JAr: pacman-admin/pacmancode@master/jar/Pac-Man.jar (raw)

So far, this seems to run fine on macOS using brewed openjdk (audio plays fine). I don't have a good Linux x86_64 box (with a GUI) to test on the moment.

@github-actions github-actions bot removed the stale No recent activity label Feb 6, 2024
@iMichka iMichka added the linux Linux is specifically affected label Feb 12, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Mar 5, 2024
@pacman-admin
Copy link
Author

Has anyone made any progress?

@github-actions github-actions bot removed the stale No recent activity label Mar 5, 2024
@gromgit
Copy link
Member

gromgit commented Mar 7, 2024

Yes, just use this JAr: pacman-admin/pacmancode@master/jar/Pac-Man.jar (raw)

So far, this seems to run fine on macOS using brewed openjdk (audio plays fine). I don't have a good Linux x86_64 box (with a GUI) to test on the moment.

Just tested the same JAR with Homebrew OpenJDK on my Ubuntu 23.10 x86_64 daily driver, no issues with graphics or sound, and no errors of any sort:
image

@pacman-admin, did you update Homebrew openjdk and still have issues running that JAR?

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Mar 29, 2024
@pacman-admin
Copy link
Author

pacman-admin commented Mar 29, 2024 via email

@github-actions github-actions bot removed the stale No recent activity label Mar 29, 2024
@gromgit
Copy link
Member

gromgit commented Mar 30, 2024

Is anyone working on this?

As you can see, nobody can reproduce the errors you're getting, so...

Also, you never responded to my question from three weeks ago:

did you update Homebrew openjdk and still have issues running that JAR?

Failure to respond to questions also delays any possible resolution, for obvious reasons.

Another relevant question: are any of your users experiencing the same problem? If not, that strongly suggests an issue specific to your system.

@cho-m cho-m added needs response Needs a response from the issue/PR author and removed bug Reproducible Homebrew/homebrew-core bug labels Apr 1, 2024
@fel1x-developer fel1x-developer mentioned this issue Apr 16, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux Linux is specifically affected needs response Needs a response from the issue/PR author
Projects
None yet
Development

No branches or pull requests

7 participants
@gromgit @SMillerDev @iMichka @alebcay @cho-m @pacman-admin and others