question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Mac OS] Shader compilation fails

See original GitHub issue

Describe the bug The latest release release-331 crashes with the following error:

[...]
INFO|PluginManager|Registered 0 plugin instances 
 INFO|PluginManager|Enabled 0 plugins! 
 INFO|Alex|Startup time: 00:00:40.2538415 
Unhandled exception. System.InvalidOperationException: Shader Compilation Failed
   at Microsoft.Xna.Framework.Graphics.Shader.GetShaderHandle()
   at Microsoft.Xna.Framework.Graphics.ShaderProgramCache.Link(Shader vertexShader, Shader pixelShader, Shader hullShader, Shader domainShader, Shader geometryShader, Shader computeShader)
   at Microsoft.Xna.Framework.Graphics.ShaderProgramCache.GetProgram(Shader vertexShader, Shader pixelShader, Shader hullShader, Shader domainShader, Shader geometryShader, Shader computeShader)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.ActivateShaderProgram()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformApplyState(Boolean applyShaders)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformDrawIndexedPrimitives(PrimitiveType primitiveType, Int32 baseVertex, Int32 startIndex, Int32 primitiveCount)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType primitiveType, Int32 baseVertex, Int32 startIndex, Int32 primitiveCount)
   at Alex.Graphics.Models.ModelMeshPart.Draw(GraphicsDevice graphicsDevice, Effect effect)
   at Alex.Graphics.Models.Model.Draw(Matrix world, Matrix view, Matrix projection, Matrix[] matrices, Effect effect)
   at Alex.Entities.Entity.Render(IRenderArgs renderArgs, Boolean useCulling)
   at Alex.Gui.Elements.Context3D.GuiEntityModelView.EntityDrawable.DrawContext3D(IRenderArgs args, IGuiRenderer guiRenderer)
   at Alex.Gui.Elements.Context3D.GuiContext3DElement.OnDraw(GuiSpriteBatch graphics, GameTime gameTime)
   at RocketUI.RocketElement.Draw(GuiSpriteBatch graphics, GameTime gameTime)
   at RocketUI.RocketElement.ForEachChild(Action`1 childAction)
   at RocketUI.RocketElement.Draw(GuiSpriteBatch graphics, GameTime gameTime)
   at RocketUI.GuiManager.Draw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.SortingFilteringCollection`1.ForEachFilteredItem[TUserData](Action`2 action, TUserData userData)
   at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Alex.Program.LaunchGame(LaunchSettings launchSettings)
   at Alex.Program.Main(String[] args)
zsh: abort

Additionally a section of the window flickers red/black before it crashes. Resizing the window by any amount stops that.

To Reproduce Steps to reproduce the behavior:

  1. Start the binary and wait for it to crash after downloading assets.

Expected behavior It should not crash. (and also not flicker)

Screenshots The window does appear but then disappears after the crash. Screenshot 2022-03-03 at 19 14 05 The area in the window that is black flickers between black and red every frame.

Some time before the crash but after resizing to make the flickering go away: Screenshot 2022-03-03 at 19 17 15

Desktop (please complete the following information):

  • OS: macOS 12.2.1 (Monterey)
  • Platform: x64 (CPU: Intel i7 6700K)
  • GPU: AMD Radeon RX 6900 XT
  • Build number: 1.0.0-8919d98

If possible, I would also like to know where Alex stores the downloaded assets and other data.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kennyvvcommented, Apr 14, 2022

Small update, i have a machine i can test this on now. So i will be looking into the issue as soon as i’ve got time to do so!

0reactions
devgocricommented, Jun 12, 2022

When would there be a fix to this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shader compilation issue on Mac Mojave using Xcode and ...
The following code works fine on a Windows PC using Visual Studio, but fails to provide color to the triangles when running on...
Read more >
Shader compiler issue with XCode 12 on iOS 10.1.1
The solution is to run time compile the metal shaders on the target platform with the method: (nullable id <MTLLibrary>)newLibraryWithSource:(NSString *)source ...
Read more >
Shaders fail to build with no error message on mac #7865
But the build fails with no error message. There's only a single shader in the project, and regardless of the contents of the...
Read more >
Issue with the GLSL Compiler on M1 OpenGL driver?
This error is thrown whenever the shader does not know where to access texture data. Basically, you have to make two calls for...
Read more >
Trouble with shader compilation on mac with wine
Hi, I've just tried getting set up for development on mac os, and am having trouble with shader compilation. I'm wondering if anyone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found