WhiteTreePaladin Posted January 18, 2013 Report Share Posted January 18, 2013 I got this error a couple of times while playing. Revision 13086.ERROR: OpenAL error: Out of Memory; called from CSoundBase::InitOpenAL (line 154)I have attached the log files.interestinglog.htmlmainlog.htmlsystem_info.txtcommands.txt Quote Link to comment Share on other sites More sharing options...
stwf Posted January 18, 2013 Author Report Share Posted January 18, 2013 yes, issues like this (running out of OpenAL sources) are the target of the rewrite I'm doing now. I think its mostly a sound card issue as I can usually get thousands of sources but some machines top out at 200-300.I'm on my third rewrite of the rewrite, so I must be geting close! 1 Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 18, 2013 Report Share Posted January 18, 2013 yes, issues like this (running out of OpenAL sources) are the target of the rewrite I'm doing now. I think its mostly a sound card issue as I can usually get thousands of sources but some machines top out at 200-300.Is that really the cause of the error? Looking at the programmer's guide and OpenAL Soft's code for alGenSources, it seems AL_OUT_OF_MEMORY is returned when the memory allocation fails by returning NULL instead of a valid address, not related to the number of sources available (which could be AL_INVALID_VALUE?) Unless I'm completely misunderstanding it.Edit: hmm digging a bit deeper, it seems AL_OUT_OF_MEMORY could also be thrown from the lowel-level API and is possibly related to sources. Quote Link to comment Share on other sites More sharing options...
stwf Posted January 18, 2013 Author Report Share Posted January 18, 2013 I hadn't really looked into it THAT much, but judging by the fact that the error came from inside CSoundBase::InitOpenAL, I'm pretty sure allocating a new source is the only memory type thing going on in there. My new code allocates all sources at startup time and manages them thereafter, so this isn't really an issue anymore. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 22, 2013 Report Share Posted January 22, 2013 Not a priority, but while you're working on the sound manager, could you look into fixing the build when "--without-audio" is used? Here are the build errors I get with that build option, on Windows:1> SoundManager.cpp1>..\..\..\source\soundmanager\SoundManager.cpp(97): error C2061: syntax error : identifier 'ISoundItem'1>..\..\..\source\soundmanager\SoundManager.cpp(214): error C2143: syntax error : missing ';' before '*'1>..\..\..\source\soundmanager\SoundManager.cpp(214): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>..\..\..\source\soundmanager\SoundManager.cpp(214): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>..\..\..\source\soundmanager\SoundManager.cpp(215): error C2143: syntax error : missing ';' before '*'1>..\..\..\source\soundmanager\SoundManager.cpp(215): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>..\..\..\source\soundmanager\SoundManager.cpp(215): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>..\..\..\source\soundmanager\SoundManager.cpp(43): error C2065: 'm_Items' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(43): error C2061: syntax error : identifier 'ItemsList'1>..\..\..\source\soundmanager\SoundManager.cpp(44): error C2065: 'm_DeadItems' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(44): error C2061: syntax error : identifier 'ItemsList'1>..\..\..\source\soundmanager\SoundManager.cpp(83): error C2653: 'ItemsList' : is not a class or namespace name1>..\..\..\source\soundmanager\SoundManager.cpp(83): error C2065: 'iterator' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(83): error C2146: syntax error : missing ';' before identifier 'lstr'1>..\..\..\source\soundmanager\SoundManager.cpp(83): error C2065: 'lstr' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(83): error C2065: 'm_Items' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(83): error C2227: left of '->begin' must point to class/struct/union/generic type1> type is ''unknown-type''1>..\..\..\source\soundmanager\SoundManager.cpp(84): error C2065: 'lstr' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(84): error C2065: 'm_Items' : undeclared identifier1>..\..\..\source\soundmanager\SoundManager.cpp(84): error C2227: left of '->end' must point to class/struct/union/generic type1> type is ''unknown-type''1>..\..\..\source\soundmanager\SoundManager.cpp(84): fatal error C1903: unable to recover from previous error(s); stopping compilation Quote Link to comment Share on other sites More sharing options...
stwf Posted February 9, 2013 Author Report Share Posted February 9, 2013 HiIf anyone wants to take a look at the sound manager rewrite, its in my git repository https://github.com/s...ree/fix_sourcesIt goes into a distress mode when sources run out, in which it recycles them faster. A possible improvement would be to set priorities int these situations, but I could only bring them up in huge combat demo. Still needs some double checking and cleaning up before I patch svn.Also the battles should sound much better I think. Quote Link to comment Share on other sites More sharing options...
zoot Posted February 9, 2013 Report Share Posted February 9, 2013 HiIf anyone wants to take a look at the sound manager rewrite, its in my git repository https://github.com/s...ree/fix_sourcesI gave this a spin. It seems to work fine, though I weren't able to trigger any combat on either of the combat demo maps. (I believe those maps were bugged a few months back, which is probably when you branched off.) Quote Link to comment Share on other sites More sharing options...
stwf Posted February 10, 2013 Author Report Share Posted February 10, 2013 I gave this a spin. It seems to work fine, though I weren't able to trigger any combat on either of the combat demo maps. (I believe those maps were bugged a few months back, which is probably when you branched off.)yes, its broken, but you can still declare war after the game ends and let them fight away. I do need to merge my branch up... 1 Quote Link to comment Share on other sites More sharing options...
zoot Posted February 10, 2013 Report Share Posted February 10, 2013 yes, its broken, but you can still declare war after the game ends and let them fight away. I do need to merge my branch up...I see. That worked fine too:ERROR: Sound: Entering distress mode through shortageERROR: Sound: Coming out of distress mode suffering 0 errorsERROR: Sound: Entering distress mode through shortageERROR: Sound: Coming out of distress mode suffering 0 errors Quote Link to comment Share on other sites More sharing options...
Pureon Posted February 10, 2013 Report Share Posted February 10, 2013 stwf could test your changes with the latest svn somehow? It would be good to get your Sound Manager rewrite committed soon if possible. Quote Link to comment Share on other sites More sharing options...
stwf Posted February 15, 2013 Author Report Share Posted February 15, 2013 OK the new SoundManager code is in a patch attached to its trac ticket (I'll also attach it here)http://trac.wildfire...com/ticket/1766This is a diff against the latest svn trunk, so patching should not be a problem. I'll be AFK for a week (so I didn't want to check changes in), hopefully this will work fine and can be incorporated during my absence or when I get back.Battles should sound much fuller, and should work much better in low resource environments.Also there is some extra logging here, about going into and out of distress mode. Going into distress mode dues to shortage and coming out with a 0 error count is normal (during large battles) and good behavior. On MacOs there seem to be times the system returns an unknown error when it can't play a sound. So in that case you might go into distress mode on an error and emerge with a big error count. I think this is also not a big problem. It shouldn't happen on non-mac platforms (let me know if it does) and doesn't affect the sound noticeably (also let me know).I can try and track down the exact cause of the issue in the future.Enjoy!soundManagerEntity.patch 2 Quote Link to comment Share on other sites More sharing options...
stwf Posted February 25, 2013 Author Report Share Posted February 25, 2013 Hello All,I'm back! Did anyone get a chance to try out the latest patch? Anyway either way I guess I should just commit it to trunk and see what happens, no? Quote Link to comment Share on other sites More sharing options...
zoot Posted February 25, 2013 Report Share Posted February 25, 2013 If that is the same patch as the one attached to the memory leak ticket, I believe I did try it and found no issue. Go ahead and commit, as far as I am concerned. The worst that can happen is that you get more feedback Quote Link to comment Share on other sites More sharing options...
Pureon Posted February 25, 2013 Report Share Posted February 25, 2013 Welcome back. I'd like you to commit it so we can all test it thoroughly Quote Link to comment Share on other sites More sharing options...
k776 Posted February 25, 2013 Report Share Posted February 25, 2013 Provided you have tested it as much as you can on mac, linux, and windows, and found no issues, go ahead and commit when you have a few hours afterward to fix up any issues that the team finds. Quote Link to comment Share on other sites More sharing options...
stwf Posted March 1, 2013 Author Report Share Posted March 1, 2013 OK, it is in! I'll be around on IRC in case anything goes wrong.... Hopefully this will improve the sound for people. There are still two log messages included for testing purposes. It will say it is going into distress mode over large battles. Then when the battle subsides it should come out of distress mode, hopefully reporting no errors. I haven't seen errors anywhere but on Mac, and I'm not sure they needed to be worried about. Quote Link to comment Share on other sites More sharing options...
plumo Posted March 2, 2013 Report Share Posted March 2, 2013 I can't build the game anymore.1>------ Build started: Project: simulation2, Configuration: Release Win32 ------1> CCmpSoundManager.cpp1>C:\Users\Bastijn\ps\source\lib/external_libraries/openal.h(34): fatal error C1083: Cannot open include file: 'AL/al.h': No such file or directory2>------ Build started: Project: test, Configuration: Release Win32 ------3>------ Build started: Project: pyrogenesis, Configuration: Release Win32 ------2> test_root.cpp3> Creating library ..\..\..\binaries\system\pyrogenesis.lib and object ..\..\..\binaries\system\pyrogenesis.exp3>simulation2.lib(CCmpSoundManager.obj) : error LNK2019: unresolved external symbol "public: void __thiscall CSoundGroup::PlayNext(class CVector3D const &)" (?PlayNext@CSoundGroup@@QAEXABVCVector3D@@@Z) referenced in function "public: virtual void __thiscall CCmpSoundManager::PlaySoundGroup(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,unsigned int)" (?PlaySoundGroup@CCmpSoundManager@@UAEXV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@I@Z)3>..\..\..\binaries\system\pyrogenesis.exe : fatal error LNK1120: 1 unresolved externals2> Creating library ..\..\..\binaries\system est.lib and object ..\..\..\binaries\system est.exp2>simulation2.lib(CCmpSoundManager.obj) : error LNK2019: unresolved external symbol "public: void __thiscall CSoundGroup::PlayNext(class CVector3D const &)" (?PlayNext@CSoundGroup@@QAEXABVCVector3D@@@Z) referenced in function "public: virtual void __thiscall CCmpSoundManager::PlaySoundGroup(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,unsigned int)" (?PlaySoundGroup@CCmpSoundManager@@UAEXV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@I@Z)2>..\..\..\binaries\system est.exe : fatal error LNK1120: 1 unresolved externals========== Build: 0 succeeded, 3 failed, 11 up-to-date, 0 skipped ========== Quote Link to comment Share on other sites More sharing options...
feneur Posted March 2, 2013 Report Share Posted March 2, 2013 Sounds like something is wrong with OpenAL, but while we wait for someone with more knowledge to help out you might want to run update-workspaces to make sure any new/changed source files are taken into account (you might of course have done that already, in which case I would suggest running clean-workspaces.sh and then update-workspaces and try compiling again just to be on the safe side ). Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 2, 2013 Report Share Posted March 2, 2013 Confirmed by philip and apparently someone else on IRC.Compiles cleanly on my mac, though. Quote Link to comment Share on other sites More sharing options...
stwf Posted March 3, 2013 Author Report Share Posted March 3, 2013 ok, the problem with building in Windows should be fixed now... sorry about that. Quote Link to comment Share on other sites More sharing options...
k776 Posted March 4, 2013 Report Share Posted March 4, 2013 Played a quick game on combat large. Got this:ERROR: Sound: Entering distress mode through shortageERROR: Sound: Coming out of distress mode suffering 180 errorsNothing crashes or caused any problems though. Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 4, 2013 Report Share Posted March 4, 2013 I regularly play with Engine.SetSimRate(10) or so, usually get the same messages, but no crashes. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted March 4, 2013 Report Share Posted March 4, 2013 If that error will be occurring often, we should disable it before A13, or log it without displaying anything (if that's useful). Quote Link to comment Share on other sites More sharing options...
quantumstate Posted March 4, 2013 Report Share Posted March 4, 2013 The message has frequently occurred in multiplayer games for me. No other errors or crashes though . Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted March 4, 2013 Report Share Posted March 4, 2013 Might be better to use debug_printf then. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.