The # character exception not fixed for me in GL project :
Microsoft.Xna.Framework.Audio.NoAudioHardwareException was unhandled
ErrorCode=-2147467259
HResult=-2147467259
Message=OpenAL device could not be initialized.
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.Audio.OpenALSoundController.OpenSoundController()
at Microsoft.Xna.Framework.Audio.OpenALSoundController…ctor()
at Microsoft.Xna.Framework.Audio.OpenALSoundController.get_GetInstance()
at Microsoft.Xna.Framework.SdlGamePlatform…ctor(Game game)
at Microsoft.Xna.Framework.Game…ctor()
at Game1.Game1…ctor() in D:\Some#Character\Game1\Game1\Game1.cs:line 15
at Game1.Program.Main() in D:\Some#Character\Game1\Game1\Program.cs:line 16
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.Audio.OpenALSoundController.OpenSoundController()
InnerException:
Win10 64bit
VS Community 2015
I have a clean MonoGame 3.7.1 install. There is no old file left of the previous version in the Program Files folder.
This is a different issue. It seems the OpenAL dll was loaded, but the alcOpenDevice function was not found so its invocation throws a NullReferenceException (no exception is thrown when it fails to load).
@Pixi91 Can you verify that the x64/soft_oal.dll and x86/soft_oal.dll libraries are in your bin folder?
@harry-cpp Could this happen when the OpenAL Soft lib isn’t found? It looks like we don’t do any error checking so we only detect that the lib isn’t loaded when any of the functions are run.
Yes, they can be found in those folders. The error occurs only if the # character is in the path. If I do not try to start inside Visual Studio, but manualy run .exe from the debug folder, I do not get any error messages, simply the program will not start, the clock will flash briefly next to the cursor, but nothing happen. If I remove the # character at any time, the error will disappear in the already finished debug folder. Windows project don’t generate this error. If I remember correctly, version 3.6 did not have this bug yet.
We made the same mistake loading OpenAL Soft as we did with SDL, I’ll have a fix up ASAP.
EDIT: Fix is up.
EDIT2: Fix has been merged. You can get a develop build from the downloads page: http://www.monogame.net/downloads/
I am using Mac and Visual Studio for Mac and when I want to create a project I did not found the multiplatform template and I do not find any for Linux
Hi, I experienced a weird issue, trying to playing Songs under iOS.
I imported my_song.mp3 file via content pipeline (using “Mp3 Importer - MonoGame”) and load and play it as follows:
Song msx = Content.Load<Song>("my_song"); Microsoft.Xna.Framework.Media.MediaPlayer.Play(msx);
All the things goes well, no errors was generated and the Microsoft.Xna.Framework.Media.MediaPlayer.State is “Playing”, but no music is audible (of course, the volume is correctly set…).
I tried with various format of mp3 and also with .ogg, with the same result.
I tried to downgrade to release 3.6 and the above code works well. In simulator and in real devices the songs play fine.
So, it’s definitively confirmed it’s an issue of the latest 3.7 / 3.7.1 releases of monogame.
I am very curious to discover the reasons of this bug…
Nobody can help us?
Visual studio makes it a lot easier to get started. So i would recommend to use that one. You could use vs code but that is a lot more hassle to get it working.
Guys, a small suggestion - please update the News (“Latest Headlines”) section on the main page. From how it looks right now, one might think that version 3.6 is current…