Hello Guest

Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)

  • 22 Replies
  • 321 Views
*

Offline princec

  • *****
  • 1927
    • Puppygames
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #15 on: February 17, 2019, 15:27:26 »
Yes, I'm using minimal LWJGL - core, GL, AL, GLFW only at this stage.
Nothing fancy is going on regarding strings. Quite often it doesn't even get as far as loading source code to the shaders as it crashes before it even gets a window up.
There's only one context, and usually when it crashes, still only one thread doing any work (tried singlethreaded too, same results).
In short there was no combination of things I did or disabled or properties set that fixed it other than simply trying 3.1.6, when everything worked exactly perfectly, first time (sound included).
I need to do a bit more work to get the project to build properly (getting theagentd to try running it from Eclipse was a bit of an eye-opener as to how much of a faff that was) but then I can easily deploy it to Steam for you. Getting to the bottom of this would seem to be of extreme importance because it does rather look like right now the entire 3.2.x is totally broken and has been for a while!

Cas :)

*

Offline spasi

  • *****
  • 2101
    • WebHotelier
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #16 on: February 17, 2019, 16:30:31 »
I need to do a bit more work to get the project to build properly (getting theagentd to try running it from Eclipse was a bit of an eye-opener as to how much of a faff that was) but then I can easily deploy it to Steam for you. Getting to the bottom of this would seem to be of extreme importance because it does rather look like right now the entire 3.2.x is totally broken and has been for a while!

That's great, thank you. Obviously, I'll be deeply disheartened if this turns out to be a bug in LWJGL. It would mean the testing I perform is lacking and I can't depend on the community to promptly discover and report such issues.

One more thing you could try: LWJGLX/debug (direct download: https://build.lwjgl.org/addons/lwjglx-debug/lwjglx-debug-1.0.0.jar). Run with:

Code: [Select]
java -javaagent:lwjglx-debug-1.0.0.jar <...normal arguments..>
Assuming no obvious error pops up until it crashes, you can enable tracing with:

Code: [Select]
java -javaagent:lwjglx-debug-1.0.0.jar=t;o=trace.log <...normal arguments..>
Review the log (to remove sensitive information if necessary) and attach it here or in a PM. KaiHH was kind enough to do a couple of fixes earlier, the trace will now include all LWJGL calls. This will help me focus the investigation to what's actually being used only.

*

Offline CoDi

  • *
  • 49
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #17 on: February 21, 2019, 09:27:55 »
Obviously, I'll be deeply disheartened if this turns out to be a bug in LWJGL. It would mean the testing I perform is lacking and I can't depend on the community to promptly discover and report such issues.

Just dropping in to note that we are running Pathway builds on LWJGL 3.2.0 (with a modified libGDX 1.9.9) since half a year now, and I didn't hear of such trouble. Between our dev team, external contributors and our publisher, this has been running on quite a number of systems already, so I would be surprised if this is a widespread problem.

I don't know if it helps, but here's my OpenAL setup code:
https://gist.github.com/code-disaster/a14993f38966ba06fa4f579820f89d43

I noted a couple of things:
- my call order (device, context) is slightly different to yours
- I run audio on a separate thread, so there are thread context calls
- that retry loop is because we've had a problem on some systems that device creation would fail on the first try, but succeed after a short delay

*

Offline princec

  • *****
  • 1927
    • Puppygames
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #18 on: February 21, 2019, 09:41:59 »
It isn't the AL library that's the problem it turns out though, that actually works perfectly well on 3.1.6 (and removing AL from the game didn't fix it in 3.2.x).
It very much looks like the problem the Minecraft guys were running in to in the thread Spasi linked to back up the thread.
As to why it "seems" ok... this is the peril of native code - it probably isn't, you've just been lucky enough that whatever memory corruption is occurring hasn't blown up for enough users that they've started complaining at you yet :) You'd be surprised how gamers are conditioned to just accept crash bugs and shrug and restart from the world of AAA...

I'm slowly working towards getting a build together but I'm a bit busy working for The Man right now and other things.

Cas :)

*

Offline spasi

  • *****
  • 2101
    • WebHotelier
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #19 on: February 21, 2019, 10:32:59 »
It very much looks like the problem the Minecraft guys were running in to in the thread Spasi linked to back up the thread.

They're having crashes with 3.1.6 too though. Also:

Quote
It seems to be exclusive to development type environments, where the game is launched from either an IDE or gradle.

*

Offline princec

  • *****
  • 1927
    • Puppygames
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #20 on: February 21, 2019, 10:35:46 »
The peculiar thing about running from an IDE is that if you do look at the actual process that the IDE spawns, and its commandline, there's absolutely nothing different to how it looks than if it were launched from a command prompt. So again... possibly just random luck here.

Cas :)

*

Offline princec

  • *****
  • 1927
    • Puppygames
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #21 on: February 21, 2019, 12:23:43 »
It occurs to me that it might be GLFW that's the problem but that'll be harder to test.

Cas :)

*

Offline princec

  • *****
  • 1927
    • Puppygames
Re: Can't get sound to work (LWJGL 3.2.1 build 12, Win10 64-bit)
« Reply #22 on: February 22, 2019, 12:51:43 »
OH NOES!!!!11!!!

It's just randomly started to go wrong with LWJGL 3.1.6 now too :( No reason for it... was working last time I tried. Now it's not.

Cas :)