rfht / fnaify

Run FNA/XNA games on OpenBSD - DEPRECATED! Check out the successor: https://github.com/IndieRunner/IndieRunner
https://www.PlayOnBSD.com
ISC License
36 stars 2 forks source link

Burning Knight crashes after death when game tries to restart #36

Open rfht opened 4 years ago

rfht commented 4 years ago

Maybe an upstream issue.

Trace:

Setting level size to 73:94 12:51:24 Paint() <= Paint()                                                                                                                                                                               [0/2863]
System.NullReferenceException: Object reference not set to an instance of an object                                    
  at VelcroPhysics.Collision.Broadphase.DynamicTree`1[T].InsertLeaf (System.Int32 leaf) [0x0039d] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                                                     
  at VelcroPhysics.Collision.Broadphase.DynamicTree`1[T].MoveProxy (System.Int32 proxyId, VelcroPhysics.Shared.AABB& aabb, Microsoft.Xna.Framework.Vector2 displacement) [0x000ec] in <c3efdc13b7e6400c9c641ddb721649e0>:0                    
  at VelcroPhysics.Collision.Broadphase.DynamicTreeBroadPhase.MoveProxy (System.Int32 proxyId, VelcroPhysics.Shared.AABB& aabb, Microsoft.Xna.Framework.Vector2 displacement) [0x00000] in <c3efdc13b7e6400c9c641ddb721649e0>:0               
  at VelcroPhysics.Dynamics.Fixture.Synchronize (VelcroPhysics.Collision.Broadphase.IBroadPhase broadPhase, VelcroPhysics.Shared.Transform& transform1, VelcroPhysics.Shared.Transform& transform2) [0x00065] in <c3efdc13b7e6400c9c641ddb7216
49e0>:0                                             
  at VelcroPhysics.Dynamics.Body.SetTransformIgnoreContacts (Microsoft.Xna.Framework.Vector2& position, System.Single angle) [0x00092] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                
  at VelcroPhysics.Dynamics.Body.SetTransform (Microsoft.Xna.Framework.Vector2& position, System.Single rotation) [0x00000] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                           
  at VelcroPhysics.Dynamics.Body.set_Position (Microsoft.Xna.Framework.Vector2 value) [0x00009] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                                                       
  at BurningKnight.entity.component.BodyComponent.PositionChangedListener () [0x00024] in <5e0744e47e7d4962992b6081dba890b8>:0  12:51:24 PositionChangedListener() <= set_Y()                                                                 
System.NullReferenceException: Object reference not set to an instance of an object                                    
  at VelcroPhysics.Collision.Broadphase.DynamicTree`1[T].AllocateNode () [0x00068] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                                                                    
  at VelcroPhysics.Collision.Broadphase.DynamicTree`1[T].AddProxy (VelcroPhysics.Shared.AABB& aabb, T userData) [0x00000] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                             
  at VelcroPhysics.Collision.Broadphase.DynamicTreeBroadPhase.AddProxy (VelcroPhysics.Dynamics.FixtureProxy& proxy) [0x00000] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                         
  at VelcroPhysics.Dynamics.Fixture.CreateProxies (VelcroPhysics.Collision.Broadphase.IBroadPhase broadPhase, VelcroPhysics.Shared.Transform& xf) [0x00041] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                           
  at VelcroPhysics.Dynamics.Fixture.RegisterFixture () [0x00048] in <c3efdc13b7e6400c9c641ddb721649e0>:0 
  at VelcroPhysics.Dynamics.Fixture..ctor (VelcroPhysics.Dynamics.Body body, VelcroPhysics.Templates.FixtureTemplate template) [0x0004e] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                              
  at VelcroPhysics.Dynamics.Body.CreateFixture (VelcroPhysics.Templates.FixtureTemplate template) [0x00000] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                                           
  at VelcroPhysics.Dynamics.Body.CreateFixture (VelcroPhysics.Collision.Shapes.Shape shape, System.Object userData) [0x00014] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                         
  at VelcroPhysics.Factories.FixtureFactory.AttachPolygon (VelcroPhysics.Shared.Vertices vertices, System.Single density, VelcroPhysics.Dynamics.Body body, System.Object userData) [0x00021] in <c3efdc13b7e6400c9c641ddb721649e0>:0         
  at BurningKnight.entity.component.RectBodyComponent..ctor (System.Single x, System.Single y, System.Single w, System.Single h, VelcroPhysics.Dynamics.BodyType type, System.Boolean sensor, System.Boolean center) [0x000d3] in <5e0744e47e7
d4962992b6081dba890b8>:0                                                                                               
  at BurningKnight.entity.room.controllable.spikes.Spikes.AddComponents () [0x00094] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                                                                  
  at Lens.entity.Entity.Init () [0x00013] in <f58f613c108b4decb723703b386f614d>:0                                                                                                                                                             
  at BurningKnight.entity.room.controllable.spikes.Spikes.Init () [0x00000] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                                                                           
  at Lens.entity.Area.Add (Lens.entity.Entity entity, System.Boolean postInit) [0x00055] in <f58f613c108b4decb723703b386f614d>:0                                                                                                              
  at BurningKnight.level.Painter.ReplaceTiles (BurningKnight.level.Level Level, BurningKnight.level.rooms.RoomDef Room) [0x0009b] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                     
  at BurningKnight.level.Painter.Paint (BurningKnight.level.Level Level, System.Collections.Generic.List`1[T] Rooms) [0x008f6] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                        
  at BurningKnight.level.RegularLevel.Paint () [0x0001d] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                                                                                              
  at BurningKnight.level.RegularLevel.Generate () [0x00080] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                                                                                           
  at BurningKnight.save.LevelSave.GenerationThread (Lens.entity.Area area, System.Int32 c) [0x0007a] in <5e0744e47e7d4962992b6081dba890b8>:0  12:51:24 GenerationThread() <= <Generate>b__0()                                                 
System.NullReferenceException: Object reference not set to an instance of an object.                                   
  at VelcroPhysics.Collision.Broadphase.DynamicTree`1[T].Query (System.Func`2[T,TResult] callback, VelcroPhysics.Shared.AABB& aabb) [0x00037] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                         
  at VelcroPhysics.Collision.Broadphase.DynamicTreeBroadPhase.UpdatePairs (VelcroPhysics.Collision.Handlers.BroadphaseHandler callback) [0x00035] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                     
  at VelcroPhysics.Collision.ContactSystem.ContactManager.FindNewContacts () [0x00006] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                                                                
  at VelcroPhysics.Dynamics.Body.SetTransform (Microsoft.Xna.Framework.Vector2& position, System.Single rotation) [0x00013] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                           
  at VelcroPhysics.Dynamics.Body.set_Position (Microsoft.Xna.Framework.Vector2 value) [0x00009] in <c3efdc13b7e6400c9c641ddb721649e0>:0                                                                                                       
  at BurningKnight.entity.component.BodyComponent.PositionChangedListener () [0x00024] in <5e0744e47e7d4962992b6081dba890b8>:0  12:51:24 PositionChangedListener() <= set_Y()                                                                 
exception inside UnhandledException handler: (null) assembly:/usr/local/lib/mono/4.5/mscorlib.dll type:NullReferenceException member:(null)                                                                                                   

[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Index and count must refer to a location within the buffer.                                                                                                            
Parameter name: chars                                                                                                  
  at System.Text.EncoderNLS.GetBytes (System.Char[] chars, System.Int32 charIndex, System.Int32 charCount, System.Byte[] bytes, System.Int32 byteIndex, System.Boolean flush) [0x0004c] in <21696c1a094846e38c514da8e2c85acc>:0               
  at System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) [0x00054] in <21696c1a094846e38c514da8e2c85acc>:0                                                                                                 
  at System.IO.StreamWriter.WriteSpan (System.ReadOnlySpan`1[T] buffer, System.Boolean appendNewLine) [0x000a7] in <21696c1a094846e38c514da8e2c85acc>:0                                                                                       
  at System.IO.StreamWriter.WriteLine (System.String value) [0x0000d] in <21696c1a094846e38c514da8e2c85acc>:0          
  at Lens.util.Log.Print (System.Object message, System.ConsoleColor color, System.String type) [0x00070] in <f58f613c108b4decb723703b386f614d>:0                                                                                             
  at Lens.util.Log.Error (System.Object message) [0x00000] in <f58f613c108b4decb723703b386f614d>:0 
  at BurningKnight.save.LevelSave.GenerationThread (Lens.entity.Area area, System.Int32 c) [0x000ec] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                                                  
  at BurningKnight.save.LevelSave+<>c__DisplayClass15_0.<Generate>b__0 () [0x00000] in <5e0744e47e7d4962992b6081dba890b8>:0                                                                                                                   
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <21696c1a094846e38c514da8e2c85acc>:0                                                                                                                
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <21696c1a094846e38c514da8
e2c85acc>:0                                                                                                            
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <21696c1a094846e38c514da8e2c85acc
>:0                                                  
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <21696c1a094846e38c514da8e2c85acc>:0                             
  at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <21696c1a094846e38c514da8e2c85acc>:0                    
AL lib: (EE) alc_cleanup: 1 device not closed                                                                          
thfr@ryz.domain:bk$
rfht commented 4 years ago

Alternatively could be an issue with the version of our mono runtime.

egordorichev commented 4 years ago

I have no idea what's wrong tbh, it's a crash in the physics engine (that is obv not written by me). Whats your mono version?

rfht commented 4 years ago

thanks for chiming in! This is all OpenBSD, and our mono version is 6.8.0.105. I would suspect that to be a factor, as these issues happen quite frequently here... but not on Linux from what I can tell from reviews and forum posts :]

Is Lens the physics engine?

egordorichev commented 4 years ago

No, Lens is my "framework" on top of monogame, it provides some basic utils. The physics engine is the VelcroPhysics. And yeah, on my Linux laptop I don't stumble into this anywhere besides when playing with weird stuff in debug configuration.