Alex
Alex copied to clipboard
[Mac OS] Shader compilation fails
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:
- 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.
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:
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.
Hi @douira , Thanks for the bug report! I sadly don't have a mac available to test on, so it will probably take me a while before i can work on fixing this. Secondly, to answer your question, the assets are stored under your user folder.
On a linux system this would be "~/.config/Alex", i think it's the same on a mac. It's the equivalent of the %appdata% folder on a windows machine.
Thanks for looking into it. If you want me to test something, I can try to help. I suspect this issue has something to do with Apple's implementation of OpenGL on macOS. Additionally, it only has support for OpenGL 4.1.
It's the equivalent of the %appdata% folder on a windows machine.
On macOS the equivalent of the %appdata% folder is ~/Library/Application Support/Alex
. That's also where Minecraft stores it's application data (in it's own folder minecraft
). Putting it in .config
is ok but a little unusual since one wouldn't expect it to be there on macOS.
The latest release has a new version of the library responsible for shader compilation, so if you could test this again, that would be great! Tho i'm not very hopeful it's gonna be fixed
I tried it again now and it still fails on shader compilation.
same thing for me ;)
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!
I wanted to say that I get seemingly the same problem on Guix (Linux). I’m using Mesa (as opposed to CUDA) for OpenGL.
I have a decent idea of what the issue is, just need to take the time to fix it.
It seems like it's todo with the OpenGL version used for the shaders, as i did manage to get it to run when swapping them out for different ones.
When would there be a fix to this?
Any update on this?
Any update?
I think this might have died. Very sad.