Fractal Softworks Forum

Starsector => Bug Reports & Support => Topic started by: 00lewnor on June 25, 2017, 04:24:20 AM

Title: Error in sound initialization
Post by: 00lewnor on June 25, 2017, 04:24:20 AM
The popup:

Quote
Error in sound initialization, proceeding with sound disabled.

org.lwjgl.openal.AL10.nalDistanceModel(l)V

Shows up immediately after clicking play Starsector. The game crashes when it finishes loading with:

Quote
Fatal: org.lwjgl.openal.AL10.nalListenerfv(lj)V

Check starsector.log for more info.

Spoiler
22259 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/particlealpha32sq.png (using cast)
23071 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalListenerfv(IJ)V
java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalListenerfv(IJ)V
   at org.lwjgl.openal.AL10.nalListenerfv(Native Method)
   at org.lwjgl.openal.AL10.alListener(AL10.java:685)
   at sound.new.o00000(Unknown Source)
   at com.fs.starfarer.ooOO.I.o00000(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]


The game ran fine last week and I don't know what has changed since then. I have uninstalled and reinstalled the game, I had re-downloaded some mods after reinstalling but they were all deactivated.
Title: Re: Error in sound initialization
Post by: Alex on June 25, 2017, 07:02:37 AM
If you grab OpenAL and install it, here:
https://openal.org/downloads/

That should resolve the problem. If it doesn't, I'd try a clean reinstall of the game - i.e. remove the game folder manually (after saving off anything you care about - mods, screenshots, saves) and then install it.
Title: Re: Error in sound initialization
Post by: 00lewnor on June 25, 2017, 12:53:10 PM
Installing OpenAL didn't help (the installer finished so fast i'm inclined to think it was already installed) however, mostly on whim, I ran Starsector as administrator and it loaded fine. I assume the cause is Windows Defender that my laptop decided I wanted installed I don't have a clue when (there are times when I want to punch whoever designed windows 10).

So I can work around it by running Starsector as an administrator but is there a correct way to fix this e.g. some way to tell Windows Defender to trust Starsector?
Title: Re: Error in sound initialization
Post by: Alex on June 25, 2017, 01:37:46 PM
Glad you got it sorted out!

So I can work around it by running Starsector as an administrator but is there a correct way to fix this e.g. some way to tell Windows Defender to trust Starsector?

Not that I know of, really not familiar with Windows Defender and haven't seen anyone talk about doing that here. Might be possible, though.
Title: Re: Error in sound initialization
Post by: HellBent on July 22, 2017, 06:39:09 AM
Had same issue, was resolved by running as admin as above
Title: Re: Error in sound initialization
Post by: Vayra on June 27, 2019, 10:40:20 PM
Interesting, my copy just started doing this too. Reinstalling normally didn't fix it, nor did a completely clean reinstall (uninstall, delete entire folder incl. mods, restart PC, reinstall), Running as admin still works, however.

E: Oop, clean reinstall didn't fix it either.
Title: Re: Error in sound initialization
Post by: Alex on June 28, 2019, 08:29:57 AM
Well, that's weird! Let me know if you end up figuring something out, aside from the "run as admin" thing, that is.
Title: Re: Error in sound initialization
Post by: xenoargh on July 02, 2019, 03:01:40 PM
Yes, you can define exclusions for Windows Defender:  see here (https://www.google.com/search?rlz=1C1GGRV_enUS751US753&ei=rdMbXe2-FcHWtQaDlaiwAQ&q=How+do+I+add+exceptions+to+Windows+Defender%3F&oq=How+do+I+add+exceptions+to+Windows+Defender%3F&gs_l=psy-ab.3..0i22i30l4.35152.35152..35909...0.0..0.113.113.0j1......0....2j1..gws-wiz.......0i71.ag_4Qvefxdk).
Title: Re: Error in sound initialization
Post by: taerkar on July 11, 2019, 03:50:37 PM
Just got hit by this out of the blue as well. Admin mode got around it.
Title: Re: Error in sound initialization
Post by: DelicateTask on July 13, 2019, 04:45:03 PM
Me and my GF just booted up the game today and we both got this error. Admin mode gets around it, but it's really weird that we've been playing this game for months with no problem, then POW, problems. Super strange.

Edit: also, in reply to Xeno, I tried setting up an exception and it didn't work for me, but you can always right-click on starsector.exe, click Properties, select the Compatibility tab, and select "Run this program as an administrator" and save. Then you don't have to intentionally run it as an admin every time.

(It seems that adding an exception only prevents the excepted item from being included in virus scans and such, not necessarily granting it any privileges.)
Title: Re: Error in sound initialization
Post by: xenoargh on July 13, 2019, 06:11:08 PM
Hmm.  This is strange.  I'm running it under Win10, no problems and I didn't have to grant it elevated status.
Title: Re: Error in sound initialization
Post by: DelicateTask on July 14, 2019, 06:10:46 AM
I'm also running Win10, and I don't think my computer has updated in between playing. It's odd that it just suddenly happened.
Title: Re: Error in sound initialization
Post by: LAJ-47FC9 on July 15, 2019, 05:19:39 AM
I got slapped with this one at random, starting last Friday. Unfortunately for me (as seems to be the usual case), none of the fixes are working. Tried reinstalling OpenAL, running in admin mode, removing all other copies of OpenAL on my computer...
Halp. I don't wanna play the game without sound, that's half the atmosphere gone :(
Title: Re: Error in sound initialization
Post by: Alex on July 15, 2019, 07:36:06 AM
Hmm. Do you have any idea what changed last Friday? Maybe an automatic update? If so, it might help to know what it did, if there's any clue. Or some other kind of software being installed?

Also, are you 100% sure it's the same issue? The the fixes that seemed to have helped in everyone else's case didn't here makes it seem at least possible that it's might be a slightly different one. Just in case, could you post the stack trace from the starsector.log?

Would also help to know your operating system. I'm assuming windows 10 but would be good to be sure.

And, finally - are you running vanilla or with mods? Assuming it's the same issue, that shouldn't matter, but might be worth running a vanilla game just to test. A reinstall of the game could be worth a shot as well.
Title: Re: Error in sound initialization
Post by: xenoargh on July 15, 2019, 09:22:50 AM
Maybe these folks have an audio chipset in common; perhaps there was some sort of exploit found utilizing that hardware (or the mobo's in general) that has been patched, requiring elevated permissions? 

It's rather odd that some of us are fine, others suddenly aren't; that strongly implies there's a weird OS/driver-related issue going on here.

If anybody currently experiencing this bug could post your motherboard make / model, that might help.
Title: Re: Error in sound initialization
Post by: LAJ-47FC9 on July 18, 2019, 01:54:08 AM
Hmm. Do you have any idea what changed last Friday? Maybe an automatic update? If so, it might help to know what it did, if there's any clue. Or some other kind of software being installed?

Also, are you 100% sure it's the same issue? The the fixes that seemed to have helped in everyone else's case didn't here makes it seem at least possible that it's might be a slightly different one. Just in case, could you post the stack trace from the starsector.log?

Would also help to know your operating system. I'm assuming windows 10 but would be good to be sure.

And, finally - are you running vanilla or with mods? Assuming it's the same issue, that shouldn't matter, but might be worth running a vanilla game just to test. A reinstall of the game could be worth a shot as well.
I'm almost 100% sure that nothing was installed or changed before it started happening - to my knowledge, anyway. The closest thing I did was update one of the mods I use, and that wouldn't cause this. I am, however, running Windows 10, and we all know how transparent they are.

Running about as many mods as my VRAM will let me, but I did try a fresh install in another location, and I got the same error as always. I've also tried entirely purging OpenAL and downloading a fresh copy, and no dice either.

When I try to run the game, the following error pops up in a box over the main window:
Error box
(https://puu.sh/DSH1N/4f96d47ce6.png)
[close]
Now, after the loading sequence finishes, just before the main menu, the game crashes to desktop, and the following appears in the log:
Stacktrace!
Code
231715 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalListenerfv(IJ)V
java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalListenerfv(IJ)V
at org.lwjgl.openal.AL10.nalListenerfv(Native Method)
at org.lwjgl.openal.AL10.alListener(AL10.java:685)
at sound.B.o00000(Unknown Source)
at com.fs.starfarer.C.L.o00000(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[close]
Title: Re: Error in sound initialization
Post by: Alex on July 18, 2019, 08:01:14 AM
That second error sounds like you've got a different version of an OpenAL dll somewhere on your system (possibly in the Windows/system32 or system folders?) and the windows is loading that one instead of the one the game tells it to use, for windows reasons.

Depending on how thoroughly you'd purged your system of OpenAL, might make sense to search the filesystem for the dlls just to see if there are any somewhere unexpected that might be getting loaded - say, due to a program using those running at startup, or some such. The files you'd wan to look for are OpenAL32.dll and OpenAL64.dll.

Not sure this would help, obviously; this is kind of an odd situation. Still, the error does make it seem like a version of OpenAL that's incompatible with the game is somehow being used.
Title: Re: Error in sound initialization
Post by: Originem on July 19, 2019, 09:09:58 AM
I have a solution that you could find download OpenAL64.dll and put it into system32.
Title: Re: Error in sound initialization
Post by: LAJ-47FC9 on January 21, 2020, 09:13:15 PM
While I hate to post in an old topic, I feel that it's important to document this for people that might have a similar error in future, so they can know what worked - at least for me.

By the way, Originem, you are a genius. I found and installed OpenAL64.dll, and put it into my system32 folder as you said... and it worked. No further complaints from the game, at least as far as I can tell. I am not sure how to repay my debt to you, so please take my sincerest thanks.

Mods, please don't kill me for the necro, I promise it's for a good cause. Like a time capsule!
Title: Re: Error in sound initialization
Post by: Alex on January 21, 2020, 09:16:18 PM
Hi - thank you for sharing what worked for you, that's really helpful and I appreciate it. Where'd you get an OpenAL64.dll that helped in your case, if you don't mind telling me?
Title: Re: Error in sound initialization
Post by: LAJ-47FC9 on January 21, 2020, 09:53:08 PM
If I'm being honest, I just googled "openAL64.dll" and picked the first website. Not exactly a security-conscious way to go, but I just wanna play the game, darnit q.q

To be slightly more specific, I grabbed it from here: https://www.dll-files.com/openal64.dll.html
Probably not a bad idea to vet it a bit. But it seems to work fine, so I'm not complaining.
Title: Re: Error in sound initialization
Post by: Alex on January 21, 2020, 10:00:56 PM
Thank you - that's very interesting. So apparently it's possible for a different version of OpenAL to work when the one that comes with the game doesn't... really good to know that's a possibility.
Title: Re: Error in sound initialization
Post by: Vulpes on August 13, 2021, 09:21:18 AM
I've had my own experience with this.  It doesn't really make sense but I thought I should document it for others.

step 0: Play starsector the previous day, just before turning off PC. 

Step 1: Next day, I installed the "free web version" of microsoft office.

Step 2: I installed libre office to compare later -- during installation, it claimed nvidia webhelper was using a file so I'd need to restart to complete installation.

Step 3: restart PC.  After a little web browsing I try and run Starsector.  Encounter this error.   Running in admin mode did work, but I wanted to test this out, so I uninstalled libre office.

Step 4: restart PC and boot up starsector.  Works perfectly.

Step 5: Install Libre Office again, this time without Nvidia webhelper forcing a restart.  Starsector still works fine.


I had swapped to an MSI motherboard and reinstalled drivers lately, but as mentioned in step 0 I'd been playing starsector just fine.  Libre Office is the only significant change to my system I'm aware of.

I'm left more than a little confused and can't replicate results, but MAYBE it has something to do with some kind of nvidia sound driver interaction?  I'm using the integrated realtek stuff on my motherboard so that doesn't make sense either, but so be it. 
Title: Re: Error in sound initialization
Post by: Imaginary Llamas on December 21, 2021, 02:44:33 PM
Apologies for the necro, but it seems worth keeping discussion of the same error in one place.

Earlier this year I was playing 0.95a just fine. I just installed 0.95.1a and now I have this same error. I have tried everything mentioned in the troubleshooting topic and this topic (so that's a clean reinstall, run as admin, reinstalling OpenAL, deleting OpenAL dlls from Windows folder and restarting, copying Starsector OpenAL dlls to System32 and restarting, and Originem's idea of downloading a different version of OpenAL64.dll).

I can only think of two relevant system changes: the BIOS got updated a month ago, and a couple of weeks back I was trying to solve a sound issue, and the Windows troubleshooter did a lot of audio driver switching and resetting.

I'd appreciate any suggestions - this is the first time in 10 years I've been outright unable to play Starsector :(
Title: Re: Error in sound initialization
Post by: Alex on December 21, 2021, 02:49:05 PM
Hmm. It might be worthwhile to post up the actual error, just to make sure it's indeed the same issue we're I think assuming.

Also, you could grab the 0.95a version here (https://fractalsoftworks.s3.amazonaws.com/starsector/starsector_install-0.95a-RC15.exe) and see if that somehow works - it should have the same .dll files, but I suppose you never know, and it's worth a try just to narrow down the possibilities.
Title: Re: Error in sound initialization
Post by: Imaginary Llamas on December 21, 2021, 03:27:35 PM
Sure, here are the log errors:
Log errors
Code
8823 [Thread-3] ERROR sound.B  - org.lwjgl.LWJGLException: Could not locate OpenAL library.
org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:156)
at org.lwjgl.openal.AL.create(AL.java:102)
at org.lwjgl.openal.AL.create(AL.java:206)
at sound.B$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sound.B.o00000(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.super(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
...
...
17074 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalListenerfv(IJ)V
java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalListenerfv(IJ)V
at org.lwjgl.openal.AL10.nalListenerfv(Native Method)
at org.lwjgl.openal.AL10.alListener(AL10.java:685)
at sound.B.o00000(Unknown Source)
at com.fs.starfarer.String.OO0O.o00000(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.super(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[close]

I installed 0.95a and that is now showing the same error when I try to run it.
Title: Re: Error in sound initialization
Post by: Alex on December 21, 2021, 03:42:11 PM
Thank you! Aha - it is a bit of a different error, since we're looking at "org.lwjgl.LWJGLException: Could not locate OpenAL library".

Have you tried:
1) Making sure you actually have some kind of audio output device plugged in, and
2) Unplugging your headphones, if that's the current audio output device - some googling seems to indicate that sometimes this error can crop up from using headphones.
Title: Re: Error in sound initialization
Post by: Imaginary Llamas on December 22, 2021, 09:59:32 AM
1) I definitely have audio devices plugged in! My audio setup is a set of external speakers connected to my monitor connected to my PC via DisplayPort, and a set of headphones connected directly to the PC. I switch which one is the active audio device when I need to.
2) I tried unplugging the headphones and starting Starsector, and I got the same error. For completeness sake, I get the same issue whether I set the headphones or the speakers as the active audio device.
Title: Re: Error in sound initialization
Post by: Alex on December 22, 2021, 10:20:37 AM
Hmm. It sounds like you've tried just about everything I would think to suggest here. The only things that come to mind are 1) trying to run the game in safe mode just to see what happens, and 2) reinstalling the audio device drivers (which seems a bit extreme and, if you were trying to solve another sound issue and finally did, could set you back on that front).

Actually, another thought - in Windows Event Viewer, in the Application/ and System/ changes, do you see any error or warning messages corresponding with the attempt to launch the game?

(Also, I'm assuming the game runs when sound is turned off in the launcher? It might be a useful data point, just to know.)
Title: Re: Error in sound initialization
Post by: Imaginary Llamas on December 22, 2021, 12:40:54 PM
The game runs fine if I turn sound off in the launcher. There doesn't appear to be anything in the Event Viewer corresponding to launching Starsector.

I though Windows safe mode disabled sound drivers?
Title: Re: Error in sound initialization
Post by: Alex on December 22, 2021, 02:01:48 PM
I though Windows safe mode disabled sound drivers?

... you might be right, I'm not sure about that. To be honest that was just a "grasping at straws" kind of idea.
Title: Re: Error in sound initialization
Post by: Imaginary Llamas on January 02, 2022, 05:05:21 AM
Well I did a reset of Windows the other day, and when I tried installing and running Starsector afterwards there were no issues. It might be that reinstalling the sound drivers would have been sufficient, but I'd wanted to go back to a clean install of Windows for other reasons anyway. So at least if all else fails that might work for other people as well.
Title: Re: Error in sound initialization
Post by: Alex on January 02, 2022, 09:36:22 AM
Thank you for the info! I'm glad you finally got it sorted out.