ddevault / TrueCraft

Minecraft for hipsters
http://truecraft.io/
MIT License
2.4k stars 312 forks source link

Truecraft crashes when launcher tries to start a single player game #251

Open nikasm opened 8 years ago

nikasm commented 8 years ago

Hello,

On a clean Windows 7 VM, installed Visual Studio Community, Git. I open the .sln and Build. No errors.

I open the launcher, then try to create a new Single Player world. When I try to open it Truecraft crashes. Windows then opens the Crash reporter with these files.

Temp.zip

manio143 commented 8 years ago

Check the eventvwr.exe for the exact error. There will be at least two entries from the crash.

nikasm commented 8 years ago

First error: .NET Runtime

  <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2016-06-27T20:00:25.000000000Z" /> 
  <EventRecordID>2185</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>craft-PC</Computer> 
  <Security /> 
  </System>

Second error: Application Error

  <EventData>
  <Data>TrueCraft.Client.exe</Data> 
  <Data>1.0.6021.306</Data> 
  <Data>00000000</Data> 
  <Data>KERNELBASE.dll</Data> 
  <Data>6.1.7601.18015</Data> 
  <Data>50b8479b</Data> 
  <Data>e0434352</Data> 
  <Data>0000000000009e5d</Data> 
  <Data>960</Data> 
  <Data>01d1d0ae837467d0</Data> 
  <Data>C:\Users\craft\Desktop\TrueCraft\TrueCraft.Client.exe</Data> 
  <Data>C:\Windows\system32\KERNELBASE.dll</Data> 
  <Data>c9837680-3ca1-11e6-831d-001c422a5cd6</Data> 
  </EventData>
  </Event>
manio143 commented 8 years ago

In the .NET Runtime there should be a stack trace with the information of the exception that caused the crash.

nikasm commented 8 years ago

Where do I look for this? There is a memory dump in the first post of this issue, is that it?

manio143 commented 8 years ago

I don't really know how to read a memdump, but the stack trace info should be in the details in the event viewer (see https://www.youtube.com/watch?v=TK768PB0BGc)

nikasm commented 8 years ago

Application: TrueCraft.Client.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.DllNotFoundException at OpenTK.Audio.OpenAL.AL.GenBuffers(Int32, Int32*) at OpenTK.Audio.OpenAL.AL.GenBuffers(Int32, Int32 ByRef) at Microsoft.Xna.Framework.Audio.OALSoundBuffer..ctor()

Exception Info: Microsoft.Xna.Framework.Audio.NoAudioHardwareException at Microsoft.Xna.Framework.Audio.OALSoundBuffer..ctor() at Microsoft.Xna.Framework.Audio.SoundEffect.PlatformInitialize(Byte[], Int32, Microsoft.Xna.Framework.Audio.AudioChannels) at TrueCraft.Client.AudioManager.LoadOgg(System.IO.Stream) at TrueCraft.Client.AudioManager.LoadAudioPack(System.String, System.String[]) at TrueCraft.Client.AudioManager.LoadDefaultPacks(Microsoft.Xna.Framework.Content.ContentManager) at TrueCraft.Client.TrueCraftGame.Initialize() at Microsoft.Xna.Framework.Game.DoInitialize() at Microsoft.Xna.Framework.Game.Run(Microsoft.Xna.Framework.GameRunBehavior) at TrueCraft.Client.Program.Main(System.String[])

nikasm commented 8 years ago

Similar issues to the audio start issue above: https://getsatisfaction.com/polytron/topics/error_initializing_audio_subsystem_game_wont_start_or_load_after_showing_title_screen_once

Tried to start it many times, then finally it started only to crash again with: Graphics were brown and moved incredibly slow.

Application: TrueCraft.Client.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: OpenTK.Graphics.GraphicsContextException at OpenTK.Platform.Windows.WinGLContext.MakeCurrent(OpenTK.Platform.IWindowInfo) at Microsoft.Xna.Framework.Threading.BlockOnUIThread(System.Action) at Microsoft.Xna.Framework.Graphics.IndexBuffer.Dispose(Boolean) at Microsoft.Xna.Framework.Graphics.GraphicsResource.Finalize()

manio143 commented 8 years ago

I have the same issue with no audio device and found an issue https://github.com/mono/MonoGame/issues/1654 describing it. They've fixed it apparently, and it should work if you build MonoGame from source. I haven't had time to test it yet, though.

nikasm commented 8 years ago

I was building from source and had the same issue, I'll rebuild it. Just tried the precompiled version and it has the same issue.

Do I need to update Mono or somekind of framework package to get the fix onto my code, the rebuild? How?

manio143 commented 8 years ago

I cloned mono/MonoGame, built MonoGame.Framework.Windows/GL but neither seems to work for me.But you should give it a try. After building I simply copied them into the bin/Release of TrueCraft.Client.

Note: The default MonoGame NuGet package that comes with TrueCraft works for me on Win7

flibitijibibo commented 8 years ago

Can you guys see if this branch works at all?

https://github.com/SirCmpwn/TrueCraft/pull/228

You may need the native libs from here:

http://fna-xna.github.io/download/

ddevault commented 8 years ago

@flibitijibibo if we can produce reliable builds for all 3 platforms from our Jenkins box, I'll definitely switch to FNA just to get these Windows kids off my back

flibitijibibo commented 8 years ago

Just updated to FNA 16.07, should build out of the box. The native libs can be pulled straight from the download URL however's easiest, and the Xiph libs (ogg/vorbis/vorbisfile/theora/theoraplay) can all be skipped when packaging. As a bonus, you can also skip the jpeg lib as well.

manio143 commented 8 years ago

@flibitijibibo I got DLLNotFoundException at first because I forgot about the native libs.

Exception Info: System.DllNotFoundException
   at SDL2.SDL.SDL_GetPlatform()
   at Microsoft.Xna.Framework.SDL2_FNAPlatform..cctor()
Exception Info: System.TypeInitializationException
   at Microsoft.Xna.Framework.SDL2_FNAPlatform.ProgramInit()
   at Microsoft.Xna.Framework.FNAPlatform..cctor()
Exception Info: System.TypeInitializationException
   at Microsoft.Xna.Framework.Game..ctor()
   at TrueCraft.Client.TrueCraftGame..ctor(TrueCraft.Client.MultiplayerClient, System.Net.IPEndPoint)
   at TrueCraft.Client.Program.Main(System.String[])

Then I got the libs and copied MojoShader.dll, SDL2*.dll, soft_oal.dll, zlib1.dll into the program directory. Now I got NullRefferenceException

Exception Info: System.NullReferenceException
   at Microsoft.Xna.Framework.Graphics.Texture2D.SetData[[System.Byte, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Byte[])
   at Microsoft.Xna.Framework.Graphics.Texture2D.FromStream(Microsoft.Xna.Framework.Graphics.GraphicsDevice, System.IO.Stream)
   at TrueCraft.Client.Rendering.TextureMapper.LoadDefaults(Microsoft.Xna.Framework.Graphics.GraphicsDevice)
   at TrueCraft.Client.TrueCraftGame.LoadContent()
   at Microsoft.Xna.Framework.Game.Initialize()
   at TrueCraft.Client.TrueCraftGame.Initialize()
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run()
   at TrueCraft.Client.Program.Main(System.String[])

Turns out I also needed libjpg.dll and libpng.dll

Ok, so the client runs, but the Launcher has issues

Exception Info: System.Threading.SemaphoreFullException
   at System.Threading.SemaphoreSlim.Release(Int32)
   at System.Threading.SemaphoreSlim.Release()
   at TrueCraft.RemoteClient.ProcessNetwork(System.Net.Sockets.SocketAsyncEventArgs)
   at TrueCraft.RemoteClient.OperationCompleted(System.Object, System.Net.Sockets.SocketAsyncEventArgs)
   at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs)
   at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags)
   at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)