Announcement

Collapse
No announcement yet.

SdlException at example game launch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SdlException at example game launch

    Hello! I'm trying to get started with the engine by inspecting games from QuickStarters' repo. Unfortunately, I cannot run almost all of these. After a couple of seconds of splash screen games crash with the following exception:
    Code:
    01 Feb 2018 01:38:40,383 ERROR - PROCESS | Read: Invalid argument
    01 Feb 2018 01:38:40,387 ERROR - PROCESS |
    01 Feb 2018 01:38:40,387 ERROR - PROCESS | Unhandled Exception:
    01 Feb 2018 01:38:40,388 ERROR - PROCESS | SdlDotNet.Core.SdlException
    01 Feb 2018 01:38:40,388 ERROR - PROCESS |   at SdlDotNet.Audio.Mixer.LoadMusic (System.String filename) [0x00017] in <ae088fc4af0b499aa3606c346f89bf71>:0
    01 Feb 2018 01:38:40,388 ERROR - PROCESS |   at SdlDotNet.Audio.Music..ctor (System.String fileName) [0x00016] in <ae088fc4af0b499aa3606c346f89bf71>:0
    01 Feb 2018 01:38:40,388 ERROR - PROCESS |   at WaveEngine.Adapter.Media.MusicPlayer.Play (WaveEngine.Common.Media.MusicInfo song) [0x00001] in <8158cc360773458fa1f5da908d151173>:0
    01 Feb 2018 01:38:40,388 ERROR - PROCESS |   at WaveEngine.Framework.Services.MusicPlayer.Play (WaveEngine.Common.Media.MusicInfo music) [0x00032] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,388 ERROR - PROCESS |   at WaveFrogger.Services.AudioService.Play (WaveFrogger.Services.Audio+Music music, System.Single volume) [0x0006e] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,389 ERROR - PROCESS |   at WaveFrogger.Scenes.InitialScene.CreateScene () [0x000cf] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,389 ERROR - PROCESS |   at WaveEngine.Framework.Scene.Initialize (WaveEngine.Framework.Services.GraphicsDevice graphicsDevice) [0x000da] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,389 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.InitializeASingleScene (WaveEngine.Framework.Scene scene) [0x0000f] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,389 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.InitializeScreenContext (WaveEngine.Framework.Services.ScreenContext context) [0x00019] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,389 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.ToExecute (WaveEngine.Framework.Services.ScreenContext nextContext, WaveEngine.Framework.Services.ScreenTransition transition, System.Boolean doDispose) [0x00109] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,389 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextCommands.ToContextCommand.Execute () [0x00001] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,390 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.Update (System.TimeSpan gameTime) [0x00021] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,390 ERROR - PROCESS |   at WaveEngine.Framework.Game.UpdateFrame (System.TimeSpan gameTime) [0x0004e] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,390 ERROR - PROCESS |   at WaveFrogger.App.Update (System.TimeSpan elapsedTime) [0x0012b] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,390 ERROR - PROCESS |   at WaveEngine.Adapter.Application.HandleWindowhandleRenderFrame (System.Object sender, OpenTK.FrameEventArgs e) [0x00020] in <8158cc360773458fa1f5da908d151173>:0
    01 Feb 2018 01:38:40,390 ERROR - PROCESS |   at (wrapper delegate-invoke) System.EventHandler`1[OpenTK.FrameEventArgs]:invoke_void_object_TEventArgs (object,OpenTK.FrameEventArgs)
    01 Feb 2018 01:38:40,391 ERROR - PROCESS |   at OpenTK.GameWindow.OnRenderFrame (OpenTK.FrameEventArgs e) [0x00000] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,391 ERROR - PROCESS |   at OpenTK.GameWindow.OnRenderFrameInternal (OpenTK.FrameEventArgs e) [0x00010] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,391 ERROR - PROCESS |   at OpenTK.GameWindow.RaiseRenderFrame (System.Double elapsed, System.Double& timestamp) [0x0000c] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,391 ERROR - PROCESS |   at OpenTK.GameWindow.DispatchUpdateAndRenderFrame (System.Object sender, System.EventArgs e) [0x000d5] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,391 ERROR - PROCESS |   at OpenTK.GameWindow.Run (System.Double updates_per_second, System.Double frames_per_second) [0x000c6] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,391 ERROR - PROCESS |   at WaveEngine.Adapter.Application.Run () [0x000de] in <8158cc360773458fa1f5da908d151173>:0
    01 Feb 2018 01:38:40,392 ERROR - PROCESS |   at WaveFrogger.Program.Main (System.String[] args) [0x00008] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,392 ERROR - PROCESS | [ERROR] FATAL UNHANDLED EXCEPTION: SdlDotNet.Core.SdlException
    01 Feb 2018 01:38:40,392 ERROR - PROCESS |   at SdlDotNet.Audio.Mixer.LoadMusic (System.String filename) [0x00017] in <ae088fc4af0b499aa3606c346f89bf71>:0
    01 Feb 2018 01:38:40,392 ERROR - PROCESS |   at SdlDotNet.Audio.Music..ctor (System.String fileName) [0x00016] in <ae088fc4af0b499aa3606c346f89bf71>:0
    01 Feb 2018 01:38:40,392 ERROR - PROCESS |   at WaveEngine.Adapter.Media.MusicPlayer.Play (WaveEngine.Common.Media.MusicInfo song) [0x00001] in <8158cc360773458fa1f5da908d151173>:0
    01 Feb 2018 01:38:40,393 ERROR - PROCESS |   at WaveEngine.Framework.Services.MusicPlayer.Play (WaveEngine.Common.Media.MusicInfo music) [0x00032] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,393 ERROR - PROCESS |   at WaveFrogger.Services.AudioService.Play (WaveFrogger.Services.Audio+Music music, System.Single volume) [0x0006e] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,393 ERROR - PROCESS |   at WaveFrogger.Scenes.InitialScene.CreateScene () [0x000cf] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,393 ERROR - PROCESS |   at WaveEngine.Framework.Scene.Initialize (WaveEngine.Framework.Services.GraphicsDevice graphicsDevice) [0x000da] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,393 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.InitializeASingleScene (WaveEngine.Framework.Scene scene) [0x0000f] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,393 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.InitializeScreenContext (WaveEngine.Framework.Services.ScreenContext context) [0x00019] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.ToExecute (WaveEngine.Framework.Services.ScreenContext nextContext, WaveEngine.Framework.Services.ScreenTransition transition, System.Boolean doDispose) [0x00109] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextCommands.ToContextCommand.Execute () [0x00001] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at WaveEngine.Framework.Services.ScreenContextManager.Update (System.TimeSpan gameTime) [0x00021] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at WaveEngine.Framework.Game.UpdateFrame (System.TimeSpan gameTime) [0x0004e] in <53c3c94a5c634e388b649fce2498bae6>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at WaveFrogger.App.Update (System.TimeSpan elapsedTime) [0x0012b] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at WaveEngine.Adapter.Application.HandleWindowhandleRenderFrame (System.Object sender, OpenTK.FrameEventArgs e) [0x00020] in <8158cc360773458fa1f5da908d151173>:0
    01 Feb 2018 01:38:40,394 ERROR - PROCESS |   at (wrapper delegate-invoke) System.EventHandler`1[OpenTK.FrameEventArgs]:invoke_void_object_TEventArgs (object,OpenTK.FrameEventArgs)
    01 Feb 2018 01:38:40,395 ERROR - PROCESS |   at OpenTK.GameWindow.OnRenderFrame (OpenTK.FrameEventArgs e) [0x00000] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,395 ERROR - PROCESS |   at OpenTK.GameWindow.OnRenderFrameInternal (OpenTK.FrameEventArgs e) [0x00010] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,395 ERROR - PROCESS |   at OpenTK.GameWindow.RaiseRenderFrame (System.Double elapsed, System.Double& timestamp) [0x0000c] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,397 ERROR - PROCESS |   at OpenTK.GameWindow.DispatchUpdateAndRenderFrame (System.Object sender, System.EventArgs e) [0x000d5] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,397 ERROR - PROCESS |   at OpenTK.GameWindow.Run (System.Double updates_per_second, System.Double frames_per_second) [0x000c6] in <7cc021395b804a47911bd89175eeb053>:0
    01 Feb 2018 01:38:40,397 ERROR - PROCESS |   at WaveEngine.Adapter.Application.Run () [0x000de] in <8158cc360773458fa1f5da908d151173>:0
    01 Feb 2018 01:38:40,397 ERROR - PROCESS |   at WaveFrogger.Program.Main (System.String[] args) [0x00008] in <59480603a7b14128a38369330aa6240c>:0
    01 Feb 2018 01:38:40,397 ERROR - PROCESS | AL lib: (EE) alc_cleanup: 1 device not closed
    01 Feb 2018 01:38:40,397 INFO - PROJECTSERVICE | Closed Game Window
    This applies to games with sounds (as it comes from SdlDotNet.Audio.Mixer.LoadMusic), so NewImpossibleGame was compiled and run successfully as it doesn't have any sounds. The scene simulation was also successful, as, from my understanding, doesn't involve any sounds.

    I am using Manjaro Linux (rolling release) KDE edition (KDE version 5.11.5) with kernel version 4.14.14-1-MANJARO. Wave engine (version 2.4.1) was, of course, installed using .deb package. Mono version 5.0.0.

    How can I get games to run?

    Thanks.

  • #2
    Hi Cucazer.

    Our Wave Editor package for Linux is supposed to install all required dependencies, but maybe something went wrong. Please, check that you already have installed the following packages using apt command: libsdl-mixer1.2, sox, libopenal1. If not, try to install them manually.

    Regards.



    Comment


    • #3
      So I've checked installed packages and sdl_mixer, lib32-sdl_mixer, sox and openal were already installed. I've additionally installed lib32-openal, sdl_sound and ffmpeg-compat-54 just in case, but this did not have any effect on this error. I've also checked dll bindings in Tao.Sdl.dll.config and libSDL-1.2.so.0, libSDL_mixer-1.2.so.0 and libsmpeg-0.4.so.0 are available in /usr/lib.

      After a couple hours of investigation I've found out that it is Mix_LoadMUS(string file) call to sdl_mixer from binding in SdlMixer.cs in Tao.Sdl that was always returning 0 IntPtr even if I tried to call it from expression evaluator (Immediate Window) both with mp3s in QuickStarters and my own mp3s. More unfortunate is that I could not get any error description from Mix_GetError() call (otherwise it would be visible at top of exception message in the first post), specifically Mix_GetError() returned empty string. As a side note - it was possible to set the error message by calling Mix_SetError(string message) and then have it in the exception message.
      On the other hand Mix_LoadWAV(string file) calls were successful and returned valid pointers, so after commenting out background music calls I was able to play some of the games with all sound effects (except of background music, of course)!

      Then I checked my libSDL_mixer by using code found at http://forums.libsdl.org/viewtopic.php?p=41148 and linking to libSDL_mixer library (I don't have libSDL2 installed yet) and it worked out just fine with mp3s in QuickStarters assets using absolute and relative paths, as well as without Mix_Init part.

      Currently I'm out of ideas for the further investigation and will return to it later, but I think, I can make something without using mp3s as workaround. However it is quite a peculiar problem and I'll be happy to find a root of it someday.

      Thank you for your attention and keep up happy developing!

      Comment

      Working...
      X