icculus / mojoshader

Use Direct3D shaders with other 3D rendering APIs.
https://icculus.org/mojoshader/
zlib License
150 stars 37 forks source link

terraria 1.4.5 crashing on latest mojoshader #43

Closed ghost closed 3 years ago

ghost commented 3 years ago

I am trying to solve a severe memory leak on linux terraria

3/27/2021 9:49:15 PM
System.EntryPointNotFoundException: MOJOSHADER_parseEffect assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) MojoShader.MOJOSHADER_parseEffect(byte[],byte[],uint,MojoShader/MOJOSHADER_swizzle[],uint,MojoShader/MOJOSHADER_samplerMap[],uint,MojoShader/MOJOSHADER_malloc,MojoShader/MOJOSHADER_free,intptr)
  at MojoShader.MOJOSHADER_parseEffect (System.String profile, System.Byte[] buf, System.UInt32 _len, MojoShader+MOJOSHADER_swizzle[] swiz, System.UInt32 swizcount, MojoShader+MOJOSHADER_samplerMap[] smap, System.UInt32 smapcount, MojoShader+MOJOSHADER_malloc m, MojoShader+MOJOSHADER_free f, System.IntPtr d) [0x00006] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Graphics.OpenGLDevice+<>c__DisplayClass154_0.<CreateEffect>b__0 () [0x00000] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Graphics.OpenGLDevice.ForceToMainThread (System.Action action) [0x0001f] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Graphics.OpenGLDevice.CreateEffect (System.Byte[] effectCode) [0x0002a] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Graphics.Effect..ctor (Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice, System.Byte[] effectCode) [0x0007c] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.EffectReader.Read (Microsoft.Xna.Framework.Content.ContentReader input, Microsoft.Xna.Framework.Graphics.Effect existingInstance) [0x00014] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentTypeReader`1[T].Read (Microsoft.Xna.Framework.Content.ContentReader input, System.Object existingInstance) [0x00003] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentReader.InnerReadObject[T] (T existingInstance) [0x00022] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[T] (T existingInstance) [0x00000] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[T] () [0x00000] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[T] () [0x00006] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T] (System.String assetName, System.Action`1[T] recordDisposableObject) [0x001ee] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Content.ContentManager.Load[T] (System.String assetName) [0x0005a] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Terraria.Main.LoadContent () [0x0007e] in <679960b07c8a46409744ba53cb133e48>:0 
  at Microsoft.Xna.Framework.Game.Initialize () [0x00053] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Terraria.Main.Initialize () [0x00141] in <679960b07c8a46409744ba53cb133e48>:0 
  at Microsoft.Xna.Framework.Game.DoInitialize () [0x0000d] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Microsoft.Xna.Framework.Game.Run () [0x0000e] in <a1035c70f97e48978c64759cc73d667a>:0 
  at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x000ac] in <679960b07c8a46409744ba53cb133e48>:0 
flibitijibibo commented 3 years ago

That does not appear to be the latest version of Terraria - the latest should be using FNA3D, this stack trace shows it using the old renderer. You'll know it's the right version when libmojoshader.so is removed from the installation and the game still runs.

ghost commented 3 years ago

But its terraria 1.4.0.5 . I am from linux on ARM on latest mono stable and this works with a mojoshader from 2018 but not with latest.

Yes I noticed its not the latest. Okay