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

Game crashing with OpenAL error when demolishing huge structures. #234

Closed
noway opened this issue Apr 8, 2014 · 12 comments
Closed

Game crashing with OpenAL error when demolishing huge structures. #234

noway opened this issue Apr 8, 2014 · 12 comments
Labels
bug some feature is broken

Comments

@noway
Copy link
Contributor

noway commented Apr 8, 2014

So here error from SystemMessages.log:

2014/04/08 19:27:02 [GLProgramManager.cpp:129] Successfully linked GLSL program 'Shaders/Basic.program' in 6.351ms
2014/04/08 19:33:08 [Client.cpp:207] Closing netlog
2014/04/08 19:33:08 [Client.cpp:212] Disconnecting
2014/04/08 19:33:08 [NetClient.cpp:416] Waiting for graceful disconnection
2014/04/08 19:33:08 [NetClient.cpp:361] ENet host destroyed
2014/04/08 19:33:08 [Client.cpp:217] Disconnected
2014/04/08 19:33:08 [GLRenderer.cpp:297] New map loaded; freeing old renderers...
2014/04/08 19:33:08 [GLRenderer.cpp:336] No map loaded
2014/04/08 19:33:08 [Runner.cpp:54] [!] Unhandled exception in SDLRunner:
OpenAL error 40963: Invalid value
at /home/noway/compiling/openspades/Sources/Audio/ALFuncs.cpp:332
void spades::audio::ALDevice::Internal::ALSrc::PlayBufferOneShot(ALuint) at ALDevice.cpp:317
void spades::audio::ALDevice::Internal::Play(spades::audio::ALAudioChunk*, const spades::Vector3&, const spades::client::AudioParam&) at ALDevice.cpp:514
virtual void spades::audio::ALDevice::Play(spades::client::IAudioChunk*, const spades::Vector3&, const spades::client::AudioParam&) at ALDevice.cpp:755
virtual void spades::client::Client::GrenadeExploded(spades::client::Grenade*) at Client_Update.cpp:1131
void spades::client::Grenade::Explode() at Grenade.cpp:65
bool spades::client::Grenade::Update(float) at Grenade.cpp:48
void spades::client::World::Advance(float) at World.cpp:84
void spades::client::Client::UpdateWorld(float) at Client_Update.cpp:135
virtual void spades::client::Client::RunFrame(float) at Client.cpp:383
void spades::gui::SDLRunner::Run(int, int) at SDLRunner.cpp:414
void spades::gui::Runner::Run() at Runner.cpp:75
void spades::gui::Runner::RunProtected() at Runner.cpp:48
int main(int, char**) at Main.cpp:312

2014/04/08 19:33:13 [Settings.cpp:268] Saving preference to SPConfig.cfg
2014/04/08 19:33:13 [Settings.cpp:184] Saving preferences to SPConfig.cfg

This happens when players demolish huge bridge in game. Here is this bridge.
overview
And after demolishing:
overview

Not sure, but maybe this error comes from OpenAL polyphonics which are limited to specified number.

Maybe just stop playing sounds for awhile when there are huge loads on sound system?

@noway
Copy link
Contributor Author

noway commented Apr 12, 2014

Looks like this bug appears even in non-intense play session. Game just crashing after some time. And this bug appeared only recently.

@mschlumpp
Copy link
Contributor

I'm experiencing the same bug. After some time the game crashes with this error or hangs in some OpenAL related method.

yvt added a commit that referenced this issue Apr 12, 2014
@noway
Copy link
Contributor Author

noway commented Apr 13, 2014

Here log after c3e9258 commit:

2014/04/13 19:15:33 [GLProgramManager.cpp:129] Successfully linked GLSL program 'Shaders/Basic.program' in 7.906ms
2014/04/13 19:16:59 [Client.cpp:207] Closing netlog
2014/04/13 19:16:59 [Client.cpp:212] Disconnecting
2014/04/13 19:16:59 [NetClient.cpp:416] Waiting for graceful disconnection
2014/04/13 19:16:59 [NetClient.cpp:361] ENet host destroyed
2014/04/13 19:16:59 [Client.cpp:217] Disconnected
2014/04/13 19:16:59 [GLRenderer.cpp:298] New map loaded; freeing old renderers...
2014/04/13 19:16:59 [GLRenderer.cpp:337] No map loaded
2014/04/13 19:17:00 [Runner.cpp:54] [!] Unhandled exception in SDLRunner:
[/home/noway/compiling/openspades/Sources/Audio/ALDevice.cpp:222] : void spades::audio::ALDevice::Internal::ALSrc::Set3D(const spades::Vector3&, bool) : OpenAL error 40963: Invalid value
at /home/noway/compiling/openspades/Sources/Audio/ALFuncs.cpp:346
void spades::audio::ALDevice::Internal::ALSrc::Set3D(const spades::Vector3&, bool) at ALDevice.cpp:217
void spades::audio::ALDevice::Internal::Play(spades::audio::ALAudioChunk*, const spades::Vector3&, const spades::client::AudioParam&) at ALDevice.cpp:577
virtual void spades::audio::ALDevice::Play(spades::client::IAudioChunk*, const spades::Vector3&, const spades::client::AudioParam&) at ALDevice.cpp:818
virtual void spades::client::Client::GrenadeExploded(spades::client::Grenade*) at Client_Update.cpp:1131
void spades::client::Grenade::Explode() at Grenade.cpp:65
bool spades::client::Grenade::Update(float) at Grenade.cpp:48
void spades::client::World::Advance(float) at World.cpp:84
void spades::client::Client::UpdateWorld(float) at Client_Update.cpp:135
virtual void spades::client::Client::RunFrame(float) at Client.cpp:383
void spades::gui::SDLRunner::Run(int, int) at SDLRunner.cpp:414
void spades::gui::Runner::Run() at Runner.cpp:75
void spades::gui::Runner::RunProtected() at Runner.cpp:48
int main(int, char**) at Main.cpp:312

@barnes710
Copy link

same thing i need this fixed because i am just playing and next thing u know it crashes

@mschlumpp
Copy link
Contributor

The bug is hard to reproduce but it may be introduced in d856bca, although the commit doesn't modify anything sound specific...
@noway421 could you try to bisect the bug, too?

@noway
Copy link
Contributor Author

noway commented Apr 19, 2014

Bisecting this bug would be pretty hard, but i'll try.

@mschlumpp
Copy link
Contributor

I put some logging into the Set3D function and there are some strange values:

2014/04/19 09:27:44 [ALDevice.cpp:222] AL_POS: -0.000000, nan, 39489115634079230810304544768.000000
2014/04/19 09:27:44 [MainScreen.cpp:246] [!] Error while running a game client: [../Sources/Audio/ALDevice.cpp:223] : void spades::audio::ALDevice::Internal::ALSrc::Set3D(const spades::Vector3&, bool) : OpenAL error 40963: Invalid value
at ../Sources/Audio/ALFuncs.cpp:346
void spades::audio::ALDevice::Internal::ALSrc::Set3D(const spades::Vector3&, bool) at ALDevice.cpp:217
void spades::audio::ALDevice::Internal::Play(spades::audio::ALAudioChunk*, const spades::Vector3&, const spades::client::AudioParam&) at ALDevice.cpp:578
virtual void spades::audio::ALDevice::Play(spades::client::IAudioChunk*, const spades::Vector3&, const spades::client::AudioParam&) at ALDevice.cpp:819
virtual void spades::client::Client::GrenadeExploded(spades::client::Grenade*) at Client_Update.cpp:1131
void spades::client::Grenade::Explode() at Grenade.cpp:65
bool spades::client::Grenade::Update(float) at Grenade.cpp:48
void spades::client::World::Advance(float) at World.cpp:84
void spades::client::Client::UpdateWorld(float) at Client_Update.cpp:135
virtual void spades::client::Client::RunFrame(float) at Client.cpp:383
virtual void spades::gui::MainScreen::RunFrame(float) at MainScreen.cpp:234
void spades::gui::SDLRunner::Run(int, int) at SDLRunner.cpp:436
void spades::gui::Runner::Run() at Runner.cpp:75
void spades::gui::Runner::RunProtected() at Runner.cpp:48
int main(int, char**) at Main.cpp:312

or:

2014/04/19 09:27:37 [ALDevice.cpp:222] AL_POS: 281.580048, -0.000000, 6077707121886531549694603034624.000000
2014/04/19 09:27:37 [ALDevice.cpp:222] AL_POS: 281.580048, -0.000000, 6077707121886531549694603034624.000000
2014/04/19 09:27:37 [ALDevice.cpp:222] AL_POS: 281.580048, -0.000000, 6077707121886531549694603034624.000000

@noway
Copy link
Contributor Author

noway commented Apr 20, 2014

Is there any way to induce this bug? Because i can't reproduce it on git HEAD currently.
I made map with huge floating structure trying to crash openspades. But openspades surprisingly don't crash after that.

@yvt
Copy link
Owner

yvt commented Apr 20, 2014

2014/04/19 09:27:44 [ALDevice.cpp:222] AL_POS: -0.000000, nan, 39489115634079230810304544768.000000

I believe this is the cause of OpenAL error. But where did NaN come from?

@noway
Copy link
Contributor Author

noway commented Apr 20, 2014

Sometimes this bug happens right after someone throw a grenade. Don't know, but maybe this info help you somehow.

@mschlumpp
Copy link
Contributor

@noway421 The bug is very often triggered on servers with airstrikes. Thus when there are grenades.
@yvt After many if's and breakpoints: It came from the server... NetClient.cpp

@mschlumpp
Copy link
Contributor

Ok I think I found the bug: d856bca

-                   Player *p = GetPlayerOrNull(reader.ReadByte());
+                   //Player *p = GetPlayerOrNull(reader.ReadByte());

@yvt yvt closed this as completed in f6d8c22 Apr 20, 2014
yvt added a commit that referenced this issue Apr 20, 2014
@feikname feikname added the bug some feature is broken label Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug some feature is broken
Projects
None yet
Development

No branches or pull requests

5 participants